diff options
author | saul.gill <saul.gill@est.tech> | 2023-10-20 12:06:52 +0100 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2023-10-24 15:42:15 +0100 |
commit | babdc373f453258794b29ab6f872d0c20b59d471 (patch) | |
tree | 6b8a23c97ceb207078788a75c7809475a54fe395 /testsuites/performance | |
parent | 73bdb4b3d657c9187d817f7c0691983916268075 (diff) |
Fix stability and performance tests
Issue-ID: POLICY-4840
Change-Id: I88bdb3945beaaef79a10f652ce0e9f974c6168ef
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'testsuites/performance')
-rw-r--r-- | testsuites/performance/src/main/resources/testplans/performance.jmx | 428 |
1 files changed, 381 insertions, 47 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/performance.jmx b/testsuites/performance/src/main/resources/testplans/performance.jmx index 5f5d45ec2..8243cae49 100644 --- a/testsuites/performance/src/main/resources/testplans/performance.jmx +++ b/testsuites/performance/src/main/resources/testplans/performance.jmx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.5"> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.2"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy Clamp AutomationComposition Performance" enabled="true"> <stringProp name="TestPlan.comments">Policy Clamp AutomationComposition Performance Tests</stringProp> @@ -40,7 +40,6 @@ </elementProp> </collectionProp> </elementProp> - <stringProp name="TestPlan.user_define_classpath"></stringProp> </TestPlan> <hashTree> <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true"> @@ -73,8 +72,8 @@ <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> - <boolProp name="LoopController.continue_forever">false</boolProp> <stringProp name="LoopController.loops">1</stringProp> + <boolProp name="LoopController.continue_forever">false</boolProp> </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> @@ -1575,16 +1574,18 @@ <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions</stringProp> <stringProp name="HTTPSampler.method">POST</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1613,22 +1614,25 @@ <hashTree/> </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Register participants" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> <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">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/participants</stringProp> <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1659,16 +1663,18 @@ <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}</stringProp> <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1703,16 +1709,18 @@ <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1773,16 +1781,18 @@ <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances</stringProp> <stringProp name="HTTPSampler.method">POST</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1814,8 +1824,8 @@ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="AutomationComposition Test Flow" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> - <boolProp name="LoopController.continue_forever">false</boolProp> <intProp name="LoopController.loops">-1</intProp> + <boolProp name="LoopController.continue_forever">false</boolProp> </elementProp> <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> @@ -1823,6 +1833,7 @@ <stringProp name="ThreadGroup.duration">7200</stringProp> <stringProp name="ThreadGroup.delay"></stringProp> <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> + <boolProp name="ThreadGroup.delayedStart">false</boolProp> </ThreadGroup> <hashTree> <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> @@ -1831,8 +1842,10 @@ <boolProp name="resetInterpreter">false</boolProp> <stringProp name="script">String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); +vars.put("deployState", deployState); </stringProp> </BeanShellPreProcessor> <hashTree/> @@ -1853,16 +1866,18 @@ vars.put("instanceId", instanceId); <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}</stringProp> <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> @@ -1881,6 +1896,51 @@ vars.put("instanceId", instanceId); </ResponseAssertion> <hashTree/> </hashTree> + <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> + <stringProp name="WhileController.condition">${__javaScript("${deployState}" !== "DEPLOYED")}</stringProp> + </WhileController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Verify acm state" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> + <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">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </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">1</intProp> + </ResponseAssertion> + <hashTree/> + <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true"> + <stringProp name="JSONPostProcessor.referenceNames">deployState</stringProp> + <stringProp name="JSONPostProcessor.jsonPathExprs">$.deployState</stringProp> + <stringProp name="JSONPostProcessor.match_numbers"></stringProp> + <stringProp name="Scope.variable">compositionId</stringProp> + </JSONPostProcessor> + <hashTree/> + </hashTree> + </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy AC instance" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> @@ -1898,16 +1958,18 @@ vars.put("instanceId", instanceId); <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} </stringProp> <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -1926,12 +1988,57 @@ vars.put("instanceId", instanceId); </ConstantTimer> <hashTree/> </hashTree> + <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> + <stringProp name="WhileController.condition">${__javaScript("${deployState}" !== "UNDEPLOYED")}</stringProp> + </WhileController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Verify acm state" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> + <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">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </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">1</intProp> + </ResponseAssertion> + <hashTree/> + <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true"> + <stringProp name="JSONPostProcessor.referenceNames">deployState</stringProp> + <stringProp name="JSONPostProcessor.jsonPathExprs">$.deployState</stringProp> + <stringProp name="JSONPostProcessor.match_numbers"></stringProp> + <stringProp name="Scope.variable">compositionId</stringProp> + </JSONPostProcessor> + <hashTree/> + </hashTree> + </hashTree> </hashTree> <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> - <boolProp name="LoopController.continue_forever">false</boolProp> <stringProp name="LoopController.loops">1</stringProp> + <boolProp name="LoopController.continue_forever">false</boolProp> </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> @@ -1947,33 +2054,137 @@ vars.put("instanceId", instanceId); <boolProp name="resetInterpreter">false</boolProp> <stringProp name="script">String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); +String loopCondition; vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); -</stringProp> +vars.put("deployState", deployState); +vars.put("loopCondition", "true");</stringProp> </BeanShellPreProcessor> <hashTree/> + <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> + <stringProp name="WhileController.condition">${__javaScript("${deployState}" !== "UNDEPLOYED")}</stringProp> + </WhileController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Verify acm state before uninstantiation" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> + <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">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </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">1</intProp> + </ResponseAssertion> + <hashTree/> + <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true"> + <stringProp name="JSONPostProcessor.referenceNames">deployState</stringProp> + <stringProp name="JSONPostProcessor.jsonPathExprs">$.deployState</stringProp> + <stringProp name="JSONPostProcessor.match_numbers"></stringProp> + <stringProp name="Scope.variable">compositionId</stringProp> + </JSONPostProcessor> + <hashTree/> + </hashTree> + <IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true"> + <boolProp name="IfController.evaluateAll">false</boolProp> + <boolProp name="IfController.useExpression">true</boolProp> + <stringProp name="IfController.condition">${__javaScript("${deployState}" === "DEPLOYED")}</stringProp> + </IfController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy AC instance at Teardown" 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">{
 + "deployOrder": "UNDEPLOY"
 +}
 +</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + </collectionProp> + </elementProp> + <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} </stringProp> + <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </HTTPSamplerProxy> + <hashTree> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49588">202</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">true</boolProp> + <intProp name="Assertion.test_type">33</intProp> + </ResponseAssertion> + <hashTree/> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">6000</stringProp> + </ConstantTimer> + <hashTree/> + </hashTree> + </hashTree> + </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Uninstantiate AC instance" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> <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">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> + <stringProp name="49588">202</stringProp> </collectionProp> <stringProp name="Assertion.custom_message"></stringProp> <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> @@ -1982,6 +2193,70 @@ vars.put("instanceId", instanceId); </ResponseAssertion> <hashTree/> </hashTree> + <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> + <stringProp name="WhileController.condition">${__javaScript("${loopCondition}" === "true")}</stringProp> + </WhileController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Verify No Instances" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> + <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">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}/instances</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </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">1</intProp> + <stringProp name="Scope.variable"></stringProp> + </ResponseAssertion> + <hashTree/> + <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true"> + <stringProp name="JSONPostProcessor.referenceNames">automationCompositionList</stringProp> + <stringProp name="JSONPostProcessor.jsonPathExprs">$.automationCompositionList</stringProp> + <stringProp name="JSONPostProcessor.match_numbers"></stringProp> + <stringProp name="Scope.variable">compositionId</stringProp> + </JSONPostProcessor> + <hashTree/> + </hashTree> + <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler" enabled="true"> + <stringProp name="BeanShellSampler.query">// Extracted JSON array +String jsonArray = vars.get("automationCompositionList"); +//String jsonArray = "[]"; + + +log.info("instanceArray: " + jsonArray); +// Check if the JSON array is empty +if (jsonArray.equals("[]")) { + vars.put("loopCondition", "false"); + log.info("condition false"); +} else { + vars.put("loopCondition", "true"); + log.info("condition true"); +}</stringProp> + <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp> + </BeanShellSampler> + <hashTree/> + </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Deprime AC definition" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> @@ -1998,16 +2273,18 @@ vars.put("instanceId", instanceId); <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}</stringProp> <stringProp name="HTTPSampler.method">PUT</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> @@ -2021,23 +2298,80 @@ vars.put("instanceId", instanceId); </ResponseAssertion> <hashTree/> </hashTree> + <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While Controller" enabled="true"> + <stringProp name="WhileController.condition">${__javaScript("${primeState}" !== "COMMISSIONED")}</stringProp> + </WhileController> + <hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Verify Deprimed" 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">{
 + "primeOrder": "COMMISSIONED"
 +}</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> + </collectionProp> + </elementProp> + <stringProp name="HTTPSampler.domain">${RUNTIME_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">http</stringProp> + <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> + </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">1</intProp> + <stringProp name="Scope.variable"></stringProp> + </ResponseAssertion> + <hashTree/> + <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true"> + <stringProp name="JSONPostProcessor.referenceNames">primeState</stringProp> + <stringProp name="JSONPostProcessor.jsonPathExprs">$.state</stringProp> + <stringProp name="JSONPostProcessor.match_numbers"></stringProp> + <stringProp name="Scope.variable">compositionId</stringProp> + </JSONPostProcessor> + <hashTree/> + </hashTree> + </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete AutomationComposition Definition" enabled="true"> + <boolProp name="HTTPSampler.postBodyRaw">false</boolProp> <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">${RUNTIME_HOST}</stringProp> <stringProp name="HTTPSampler.port">${RUNTIME_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/onap/policy/clamp/acm/v2/compositions/${compositionId}</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> + <boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">false</boolProp> + <boolProp name="HTTPSampler.image_parser">false</boolProp> + <boolProp name="HTTPSampler.concurrentDwn">false</boolProp> + <stringProp name="HTTPSampler.concurrentPool">6</stringProp> + <boolProp name="HTTPSampler.md5">false</boolProp> + <intProp name="HTTPSampler.ipSourceType">0</intProp> </HTTPSamplerProxy> <hashTree> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> |