From f762f7400752c848cba93d666f0b4549b667a134 Mon Sep 17 00:00:00 2001 From: Bilal A Date: Wed, 27 Feb 2019 13:52:05 -0500 Subject: Changes directory structure of S3P Tests Changes Include: a) Moving performance and stability tests into two separate directories. Change-Id: Ib98713b2c37658de16c5eb6ee8918b867bdf5b8a Issue-ID: POLICY-1462 Signed-off-by: Bilal A --- s3p/perf.jmx | 407 ----------------------------------------------------------- 1 file changed, 407 deletions(-) delete mode 100644 s3p/perf.jmx (limited to 's3p/perf.jmx') diff --git a/s3p/perf.jmx b/s3p/perf.jmx deleted file mode 100644 index ac934776..00000000 --- a/s3p/perf.jmx +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - false - true - false - - - - PDP_HOST - ${__P(host,pdp)} - = - - - RETRY - ${__P(retry, 100)} - = - - - PERF_DATA - ${__P(perf_data, perf_data.csv)} - = - - - BASE_DIR - ${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)} - = - - - CSAR_DIR - ${__P(csardir, /tmp/policy_distribution/csar)} - = - - - TOTAL - ${__P(total, 5)} - = - - - - - - - - continue - - false - 1 - - 1 - 1 - false - ${DURATION} - 1 - - - - - - Content-Type - application/json - - - Accept - application/json - - - ClientAuth - cHl0aG9uOnRlc3Q= - - - Authorization - Basic dGVzdHBkcDphbHBoYTEyMw== - - - Environment - TEST - - - - - - - - true - - - - false - {"policyName": "oofCasablanca.*s3p.*"} - = - - - - ${PDP_HOST} - 8081 - https - - /pdp/api/listConfig - POST - true - false - true - false - - - - - - - groovy - - - true - import groovy.json.JsonSlurper; - -def to_delete = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - to_delete = jsonSlurper.parseText(prev.getResponseDataAsString()); -} -vars.putObject('to_delete', to_delete); - - - - - - ${__groovy(vars.getObject('to_delete').size() > 0)} - - - - true - - - - false - { - "pdpGroup": "default", - "policyComponent": "PDP", - "policyType": "Optimization", - "policyName": "${policyname}" -} - = - - - - ${PDP_HOST} - 8081 - https - - /pdp/api/deletePolicy - DELETE - true - false - true - false - - - - - - - groovy - - - true - def to_delete = vars.getObject('to_delete'); -def policyname = to_delete.pop() -vars.put('policyname', policyname.toString()); -vars.putObject('to_delete', to_delete); - - - - - - true - - - - false - { - "deleteCondition":"ALL", - "policyComponent": "PAP", - "policyType": "Optimization", - "policyName": "${policyname}" -} - = - - - - ${PDP_HOST} - 8081 - https - - /pdp/api/deletePolicy - DELETE - true - false - true - false - - - - - - - - - - - false - 0 - ${BASE_DIR}generate_perf.sh - - - - - ${CSAR_DIR} - = - - - - ${TOTAL} - = - - - - - - - - - - - true - - - def data_file=new File(vars.get('BASE_DIR') + vars.get('PERF_DATA')); -def data=data_file.readLines(); -def total=data.size(); - -vars.putObject('data', data); -vars.putObject('total', total); -vars.putObject('idx', 0); -vars.putObject('total_counter', vars.get('RETRY').toInteger() * total); - -SampleResult.setIgnore(); - groovy - - - - - false - true - - - - - - innter_counter - 1 - = - - - rescode - - = - - - counter - 1 - = - - - - - - ${__javaScript(${counter} < ${total_counter} && ${idx} < ${total})} - - - - groovy - - - true - //log.info("idx: " + vars.getObject('idx')); -//log.info("counter: " + vars.get('counter')); -//log.info("total_counter: " + vars.get('total_counter')); - -vars.putObject('inner_counter', 0); -vars.put('rescode', ""); - -SampleResult.setIgnore(); - - - - ${__javaScript(${inner_counter} < ${RETRY} && "${rescode}" != '200')} - - - - true - - - - false - {"policyName": "oofCasablanca.*${resid}.*"} - = - - - - ${PDP_HOST} - 8081 - https - - /pdp/api/getConfig - POST - true - false - true - false - - - - - - - groovy - - - true - def idx=vars.getObject('idx'); -def data=vars.getObject('data'); - -vars.put('resid', data[idx]); -//log.error(data[idx]); - - - - - true - - - def rescode = prev.getResponseCode(); -def idx=vars.getObject('idx'); -def total=vars.getObject('total'); -def inner_counter=vars.getObject('inner_counter'); - -vars.put('rescode', rescode); -//log.info('inner_counter: ' + inner_counter); -//log.info('idx: '+ idx); - -inner_counter += 1; -vars.putObject('inner_counter', inner_counter); - -if (rescode == '200'){ - idx += 1; - vars.putObject('idx', idx); -}else { - -} - - groovy - - - - - 1 - - 1 - counter - - true - true - - - - - - - - - groovy - - - true - def idx=vars.getObject('idx'); -def total=vars.getObject('total'); - -if (idx<total) { - SampleResult.setSuccessful(false); - SampleResult.setResponseCode("410"); - SampleResult.setResponseMessage("Fail at idx " + idx); -}else { - SampleResult.setSuccessful(true); - SampleResult.setResponseCode("200"); - SampleResult.setResponseMessage("Success"); -} - - - - - - - - -- cgit 1.2.3-korg