diff options
author | RossC <ross.carter@est.tech> | 2020-05-05 15:02:51 +0100 |
---|---|---|
committer | RossC <ross.carter@est.tech> | 2020-05-05 17:19:25 +0100 |
commit | 14722adc36a48f4e120b3ad9e6287cc939bfd130 (patch) | |
tree | c1c4f674506ee58d93386588e5447ea77ee40ed2 /testsuites/stability/src/main/resources/testplans/stability.jmx | |
parent | 9d43f31c0069421ba3b29315c7232311db74180b (diff) |
Stability tests and scripts for Frankfurt
Issue-ID: POLICY-2458
Change-Id: I193d4ec14aee3313a6ea01bb9c02c048da09dbca
Signed-off-by: RossC <ross.carter@est.tech>
Diffstat (limited to 'testsuites/stability/src/main/resources/testplans/stability.jmx')
-rw-r--r-- | testsuites/stability/src/main/resources/testplans/stability.jmx | 704 |
1 files changed, 480 insertions, 224 deletions
diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx index 00a94b24..4ad3c405 100644 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935"> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.1.1 r1855137"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="stability test plan" enabled="true"> <stringProp name="TestPlan.comments"></stringProp> @@ -8,14 +8,9 @@ <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"> - <elementProp name="PDP_HOST" elementType="Argument"> - <stringProp name="Argument.name">PDP_HOST</stringProp> - <stringProp name="Argument.value">${__P(host,10.239.40.43)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="CSAR_DIR" elementType="Argument"> - <stringProp name="Argument.name">CSAR_DIR</stringProp> - <stringProp name="Argument.value">${__P(csardir, /tmp/policy_distribution/csar)}</stringProp> + <elementProp name="PAP_HOST" elementType="Argument"> + <stringProp name="Argument.name">PAP_HOST</stringProp> + <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="SCRIPT_DIR" elementType="Argument"> @@ -23,11 +18,6 @@ <stringProp name="Argument.value">${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> - <elementProp name="DURATION" elementType="Argument"> - <stringProp name="Argument.name">DURATION</stringProp> - <stringProp name="Argument.value">${__P(duration, 30)}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> <elementProp name="rescode" elementType="Argument"> <stringProp name="Argument.name">rescode</stringProp> <stringProp name="Argument.value">0</stringProp> @@ -48,6 +38,31 @@ <stringProp name="Argument.value">0</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> + <elementProp name="API_HOST" elementType="Argument"> + <stringProp name="Argument.name">API_HOST</stringProp> + <stringProp name="Argument.value">${__P(host,10.2.0.27)}</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="PAP_PORT" elementType="Argument"> + <stringProp name="Argument.name">PAP_PORT</stringProp> + <stringProp name="Argument.value">7000</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="API_PORT" elementType="Argument"> + <stringProp name="Argument.name">API_PORT</stringProp> + <stringProp name="Argument.value">6969</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="TESTCSARLOCATION" elementType="Argument"> + <stringProp name="Argument.name">TESTCSARLOCATION</stringProp> + <stringProp name="Argument.value">${__P(csardir, ${SCRIPT_DIR}/sample_csar_with_apex_policy.csar)}</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + <elementProp name="DURATION" elementType="Argument"> + <stringProp name="Argument.name">DURATION</stringProp> + <stringProp name="Argument.value">${__P(duration, 259200)}</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> </collectionProp> </elementProp> <stringProp name="TestPlan.user_define_classpath"></stringProp> @@ -66,59 +81,148 @@ <stringProp name="ThreadGroup.delay">1</stringProp> </ThreadGroup> <hashTree> - <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="GET_POLICY_HTTP_HEADER" enabled="true"> + <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> <collectionProp name="HeaderManager.headers"> <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Content-Type</stringProp> + <stringProp name="Header.name">Accept</stringProp> <stringProp name="Header.value">application/json</stringProp> </elementProp> <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Accept</stringProp> + <stringProp name="Header.name">Content-Type</stringProp> <stringProp name="Header.value">application/json</stringProp> </elementProp> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">ClientAuth</stringProp> - <stringProp name="Header.value">cHl0aG9uOnRlc3Q=</stringProp> + </collectionProp> + </HeaderManager> + <hashTree/> + <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true"> + <collectionProp name="AuthManager.auth_list"> + <elementProp name="" elementType="Authorization"> + <stringProp name="Authorization.url">https://${PAP_HOST}:7000/policy/pap/v1</stringProp> + <stringProp name="Authorization.username">healthcheck</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> </elementProp> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Authorization</stringProp> - <stringProp name="Header.value">Basic dGVzdHBkcDphbHBoYTEyMw==</stringProp> + <elementProp name="" elementType="Authorization"> + <stringProp name="Authorization.url">https://${API_HOST}:6969/policy/api/v1</stringProp> + <stringProp name="Authorization.username">healthcheck</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> </elementProp> - <elementProp name="" elementType="Header"> - <stringProp name="Header.name">Environment</stringProp> - <stringProp name="Header.value">TEST</stringProp> + <elementProp name="" elementType="Authorization"> + <stringProp name="Authorization.url">http://127.0.0.1:6969/</stringProp> + <stringProp name="Authorization.username">healthcheck</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> </elementProp> </collectionProp> - </HeaderManager> - <hashTree/> - <RandomVariableConfig guiclass="TestBeanGUI" testclass="RandomVariableConfig" testname="Random Variable" enabled="true"> - <stringProp name="maximumValue">100000000</stringProp> - <stringProp name="minimumValue">1</stringProp> - <stringProp name="outputFormat">00000000</stringProp> - <boolProp name="perThread">false</boolProp> - <stringProp name="randomSeed"></stringProp> - <stringProp name="variableName">RESID</stringProp> - </RandomVariableConfig> + <boolProp name="AuthManager.clearEachIteration">true</boolProp> + </AuthManager> <hashTree/> - <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="check if existing policy" enabled="true"/> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Delete Old CSAR" enabled="true"/> + <hashTree> + <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Remove CSAR" enabled="true"> + <boolProp name="SystemSampler.checkReturnCode">false</boolProp> + <stringProp name="SystemSampler.expectedReturnCode">0</stringProp> + <stringProp name="SystemSampler.command">${SCRIPT_DIR}removecsar.sh</stringProp> + <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="SystemSampler.directory"></stringProp> + </SystemSampler> + <hashTree/> + </hashTree> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Add CSAR" enabled="true"/> <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="list_policy" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> + <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Add CSAR script" enabled="true"> + <boolProp name="SystemSampler.checkReturnCode">false</boolProp> + <stringProp name="SystemSampler.expectedReturnCode">0</stringProp> + <stringProp name="SystemSampler.command">${SCRIPT_DIR}addcsar.sh</stringProp> + <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{"policyName": "oofCasablanca.*s3p_${RESID}.*"}</stringProp> + <elementProp name="" elementType="Argument"> + <stringProp name="Argument.name"></stringProp> + <stringProp name="Argument.value">${SCRIPT_DIR}/sample_csar_with_apex_policy.csar</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> </elementProp> - <stringProp name="HTTPSampler.domain">${PDP_HOST}</stringProp> - <stringProp name="HTTPSampler.port">8081</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> + <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="SystemSampler.directory"></stringProp> + </SystemSampler> + <hashTree> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename"></stringProp> + </ResultCollector> + <hashTree/> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="1737356164">CSAR Copied Successfully</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">2</intProp> + </ResponseAssertion> + <hashTree/> + </hashTree> + </hashTree> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">300</stringProp> + </ConstantTimer> + <hashTree/> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="HealthCheck/Statistics" enabled="true"/> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Healthcheck" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp> + <stringProp name="HTTPSampler.port">6969</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/pdp/api/listConfig</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> + <stringProp name="HTTPSampler.path">healthcheck</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -128,161 +232,208 @@ <stringProp name="HTTPSampler.response_timeout"></stringProp> </HTTPSamplerProxy> <hashTree> - <JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">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); -</stringProp> - </JSR223PostProcessor> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49586">200</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">8</intProp> + </ResponseAssertion> <hashTree/> </hashTree> - <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> - <stringProp name="WhileController.condition">${__groovy(vars.getObject('to_delete').size() > 0)}</stringProp> - </WhileController> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Statistics" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="HTTPSampler.domain">127.0.0.1</stringProp> + <stringProp name="HTTPSampler.port">6969</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">statistics</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + </HTTPSamplerProxy> <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="delete_policy_pdp" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "pdpGroup": "default",
 - "policyComponent": "PDP",
 - "policyType": "Optimization",
 - "policyName": "${policyname}"
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${PDP_HOST}</stringProp> - <stringProp name="HTTPSampler.port">8081</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/pdp/api/deletePolicy</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <JSR223PreProcessor guiclass="TestBeanGUI" testclass="JSR223PreProcessor" testname="JSR223 PreProcessor" enabled="true"> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="script">def to_delete = vars.getObject('to_delete'); -def policyname = to_delete.pop() -vars.put('policyname', policyname.toString()); -vars.putObject('to_delete', to_delete); -</stringProp> - <stringProp name="scriptLanguage">groovy</stringProp> - </JSR223PreProcessor> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="delete_policy_pap" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "deleteCondition":"ALL",
 - "policyComponent": "PAP",
 - "policyType": "Optimization",
 - "policyName": "${policyname}"
 -}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${PDP_HOST}</stringProp> - <stringProp name="HTTPSampler.port">8081</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/pdp/api/deletePolicy</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49586">200</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">8</intProp> + </ResponseAssertion> <hashTree/> </hashTree> </hashTree> - <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="generate random csar" enabled="true"/> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Created" enabled="true"/> <hashTree> - <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="Generate_CSAR" enabled="true"> - <boolProp name="SystemSampler.checkReturnCode">true</boolProp> - <stringProp name="SystemSampler.expectedReturnCode">0</stringProp> - <stringProp name="SystemSampler.command">${SCRIPT_DIR}generate.sh</stringProp> - <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="Argument"> - <stringProp name="Argument.name"></stringProp> - <stringProp name="Argument.value">${CSAR_DIR}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="" elementType="Argument"> - <stringProp name="Argument.name"></stringProp> - <stringProp name="Argument.value">${RESID}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CheckPDPGroupQuery" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> </elementProp> - <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + </HTTPSamplerProxy> + <hashTree> + <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy in apex subgroup" enabled="true"> + <stringProp name="JSON_PATH">$.groups[0].pdpSubgroups[0].policies[0].name</stringProp> + <stringProp name="EXPECTED_VALUE">operational.apex.sampledomain</stringProp> + <boolProp name="JSONVALIDATION">true</boolProp> + <boolProp name="EXPECT_NULL">false</boolProp> + <boolProp name="INVERT">false</boolProp> + <boolProp name="ISREGEX">false</boolProp> + </JSONPathAssertion> + <hashTree/> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename"></stringProp> + </ResultCollector> + <hashTree/> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Policy Deployed" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> - <stringProp name="SystemSampler.directory"></stringProp> - </SystemSampler> - <hashTree/> - <JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="Reset Loop" enabled="true"> - <stringProp name="cacheKey">true</stringProp> + <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">policy/pap/v1/policies/deployed</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + </HTTPSamplerProxy> + <hashTree> + <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy Type" enabled="true"> + <stringProp name="JSON_PATH">$[:2].policy-type</stringProp> + <stringProp name="EXPECTED_VALUE">onap.policies.controlloop.operational.Apex</stringProp> + <boolProp name="JSONVALIDATION">true</boolProp> + <boolProp name="EXPECT_NULL">false</boolProp> + <boolProp name="INVERT">false</boolProp> + <boolProp name="ISREGEX">false</boolProp> + </JSONPathAssertion> + <hashTree/> + <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy ID" enabled="true"> + <stringProp name="JSON_PATH">$[:2].policy-id</stringProp> + <stringProp name="EXPECTED_VALUE">operational.apex.sampledomain</stringProp> + <boolProp name="JSONVALIDATION">true</boolProp> + <boolProp name="EXPECT_NULL">false</boolProp> + <boolProp name="INVERT">false</boolProp> + <boolProp name="ISREGEX">false</boolProp> + </JSONPathAssertion> + <hashTree/> + </hashTree> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> <stringProp name="filename"></stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="script">vars.put("rescode", "0"); -vars.put('counter', '0');</stringProp> - <stringProp name="scriptLanguage">groovy</stringProp> - </JSR223Sampler> + </ResultCollector> + <hashTree/> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">10000</stringProp> + </ConstantTimer> <hashTree/> </hashTree> - <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="WC" enabled="true"> - <stringProp name="WhileController.condition">${__javaScript(${counter} < ${RETRY} && "${rescode}" != "200")}</stringProp> - </WhileController> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Clear up Policies" enabled="true"/> <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get_Policy" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{"policyName": "oofCasablanca.*s3p_${RESID}.*"}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy Policy " enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> </elementProp> - <stringProp name="HTTPSampler.domain">${PDP_HOST}</stringProp> - <stringProp name="HTTPSampler.port">8081</stringProp> + <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/pdp/api/getConfig</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> + <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps/policies/operational.apex.sampledomain</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> <boolProp name="HTTPSampler.use_keepalive">true</boolProp> @@ -292,49 +443,154 @@ vars.put('counter', '0');</stringProp> <stringProp name="HTTPSampler.response_timeout"></stringProp> </HTTPSamplerProxy> <hashTree> - <JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true"> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="script">def rescode = prev.getResponseCode(); -vars.put('rescode', rescode);</stringProp> - <stringProp name="scriptLanguage">groovy</stringProp> - </JSR223PostProcessor> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49586">200</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">8</intProp> + </ResponseAssertion> <hashTree/> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">${RETRY_WAIT}</stringProp> - </ConstantTimer> + </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/operational.apex.sampledomain/versions/1.0.0/policies/operational.apex.sampledomain/versions/1.0.0</stringProp> + <stringProp name="HTTPSampler.method">DELETE</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + </HTTPSamplerProxy> + <hashTree> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49586">200</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">8</intProp> + </ResponseAssertion> <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="script">def counter=vars.get('counter').toInteger(); -def retry=vars.get('RETRY').toInteger(); -def rescode = prev.getResponseCode(); - -if (counter >= retry && rescode !='200') { - //log.info('counter: ' + counter); - //log.info('retry: ' + retry); - AssertionResult.setFailure(true); - AssertionResult.setFailureMessage('get policy failed for resource ' + vars.get('RESID')); -} -</stringProp> - <stringProp name="scriptLanguage">groovy</stringProp> - </JSR223Assertion> + </hashTree> + </hashTree> + <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Assert Policy Deleted" enabled="true"/> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="CheckPDPGroupQueryForDeletedPolicy" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + </HTTPSamplerProxy> + <hashTree> + <JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="Assert Policy in apex subgroup" enabled="true"> + <stringProp name="JSON_PATH">$.groups[0].pdpSubgroups[0].policies</stringProp> + <stringProp name="EXPECTED_VALUE">operational.apex.sampledomain</stringProp> + <boolProp name="JSONVALIDATION">false</boolProp> + <boolProp name="EXPECT_NULL">true</boolProp> + <boolProp name="INVERT">false</boolProp> + <boolProp name="ISREGEX">false</boolProp> + </JSONPathAssertion> <hashTree/> </hashTree> - <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter" enabled="true"> - <stringProp name="CounterConfig.start">1</stringProp> - <stringProp name="CounterConfig.end"></stringProp> - <stringProp name="CounterConfig.incr">1</stringProp> - <stringProp name="CounterConfig.name">counter</stringProp> - <stringProp name="CounterConfig.format"></stringProp> - <boolProp name="CounterConfig.per_user">true</boolProp> - <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> - </CounterConfig> - <hashTree/> </hashTree> + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename"></stringProp> + </ResultCollector> + <hashTree/> + <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true"> + <boolProp name="ResultCollector.error_logging">false</boolProp> + <objProp> + <name>saveConfig</name> + <value class="SampleSaveConfiguration"> + <time>true</time> + <latency>true</latency> + <timestamp>true</timestamp> + <success>true</success> + <label>true</label> + <code>true</code> + <message>true</message> + <threadName>true</threadName> + <dataType>true</dataType> + <encoding>false</encoding> + <assertions>true</assertions> + <subresults>true</subresults> + <responseData>false</responseData> + <samplerData>false</samplerData> + <xml>false</xml> + <fieldNames>true</fieldNames> + <responseHeaders>false</responseHeaders> + <requestHeaders>false</requestHeaders> + <responseDataOnError>false</responseDataOnError> + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> + <assertionsResultsToSave>0</assertionsResultsToSave> + <bytes>true</bytes> + <sentBytes>true</sentBytes> + <url>true</url> + <threadCounts>true</threadCounts> + <idleTime>true</idleTime> + <connectTime>true</connectTime> + </value> + </objProp> + <stringProp name="filename">Distribution_Stability_Log</stringProp> + </ResultCollector> + <hashTree/> </hashTree> </hashTree> </hashTree> |