summaryrefslogtreecommitdiffstats
path: root/testsuites/performance
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-11-16 15:18:28 +0000
committerFrancesco Fiora <francesco.fiora@est.tech>2023-11-29 13:45:09 +0000
commit3b28926870225fce8df70030d931d5027943e775 (patch)
treeba6f6f0f9c81ba3ed89fd65edd9fe364c4ab5c90 /testsuites/performance
parent0fda289f861f95ef897fb1bb4c01cbeb9bed2310 (diff)
Add test prometheus metrics in stability and performance tests
Issue-ID: POLICY-4892 Change-Id: Iea8dc2c8cb0457b08c0a5bf5363cbc8073c62bf1 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'testsuites/performance')
-rwxr-xr-x[-rw-r--r--]testsuites/performance/src/main/resources/testplans/performance.jmx163
1 files changed, 162 insertions, 1 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/performance.jmx b/testsuites/performance/src/main/resources/testplans/performance.jmx
index 8243cae49..3360d1aae 100644..100755
--- a/testsuites/performance/src/main/resources/testplans/performance.jmx
+++ b/testsuites/performance/src/main/resources/testplans/performance.jmx
@@ -18,6 +18,16 @@
<stringProp name="Argument.value">30007</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
+ <elementProp name="POLICY_PARTICIPANT_HOST" elementType="Argument">
+ <stringProp name="Argument.name">POLICY_PARTICIPANT_HOST</stringProp>
+ <stringProp name="Argument.value">localhost</stringProp>
+ <stringProp name="Argument.metadata">=</stringProp>
+ </elementProp>
+ <elementProp name="POLICY_PARTICIPANT_HOST_PORT" elementType="Argument">
+ <stringProp name="Argument.name">POLICY_PARTICIPANT_HOST_PORT</stringProp>
+ <stringProp name="Argument.value">30008</stringProp>
+ <stringProp name="Argument.metadata">=</stringProp>
+ </elementProp>
<elementProp name="HOME_PATH" elementType="Argument">
<stringProp name="Argument.name">HOME_PATH</stringProp>
<stringProp name="Argument.value">./</stringProp>
@@ -45,12 +55,19 @@
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
<collectionProp name="AuthManager.auth_list">
<elementProp name="" elementType="Authorization">
- <stringProp name="Authorization.url">http://${RUNTIME_HOST}:${RUNTIME_PORT}/onap/policy/clamp/acm/v2</stringProp>
+ <stringProp name="Authorization.url">http://${RUNTIME_HOST}:${RUNTIME_PORT}/onap/policy/clamp/acm</stringProp>
<stringProp name="Authorization.username">runtimeUser</stringProp>
<stringProp name="Authorization.password">zb!XztG34</stringProp>
<stringProp name="Authorization.domain"></stringProp>
<stringProp name="Authorization.realm"></stringProp>
</elementProp>
+ <elementProp name="" elementType="Authorization">
+ <stringProp name="Authorization.url">http://${POLICY_PARTICIPANT_HOST}:${POLICY_PARTICIPANT_HOST_PORT}/onap/policyparticipant</stringProp>
+ <stringProp name="Authorization.username">participantUser</stringProp>
+ <stringProp name="Authorization.password">zb!XztG34</stringProp>
+ <stringProp name="Authorization.domain"></stringProp>
+ <stringProp name="Authorization.realm"></stringProp>
+ </elementProp>
</collectionProp>
<boolProp name="AuthManager.clearEachIteration">true</boolProp>
<boolProp name="AuthManager.controlledByThreadGroup">false</boolProp>
@@ -2033,6 +2050,150 @@ vars.put(&quot;deployState&quot;, deployState);
<hashTree/>
</hashTree>
</hashTree>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Metrics acm" 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/prometheus</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">true</boolProp>
+ <intProp name="Assertion.test_type">33</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">true</stringProp>
+ <stringProp name="script">def res = [];
+if (prev.getResponseCode() == &apos;200&apos;) {
+ res = prev.getResponseDataAsString();
+
+ assert res.contains(&quot;http_server_requests_seconds_sum&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_max&quot;)
+ assert res.contains(&quot;spring_data_repository_invocations_seconds_count&quot;)
+ assert res.contains(&quot;spring_data_repository_invocations_seconds_sum&quot;)
+ assert res.contains(&quot;spring_data_repository_invocations_seconds_max&quot;)
+ assert res.contains(&quot;jvm_threads_live_threads&quot;)
+
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;POST\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;201\&quot;,uri=\&quot;/v2/compositions\&quot;,}&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;PUT\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;202\&quot;,uri=\&quot;/v2/compositions/{compositionId}\&quot;,}&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;GET\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;200\&quot;,uri=\&quot;/v2/compositions/{compositionId}\&quot;,}&quot;)
+
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;POST\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;201\&quot;,uri=\&quot;/v2/compositions/{compositionId}/instances\&quot;,}&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;PUT\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;202\&quot;,uri=\&quot;/v2/compositions/{compositionId}/instances/{instanceId}\&quot;,}&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_count{error=\&quot;none\&quot;,exception=\&quot;none\&quot;,method=\&quot;GET\&quot;,outcome=\&quot;SUCCESS\&quot;,status=\&quot;200\&quot;,uri=\&quot;/v2/compositions/{compositionId}/instances/{instanceId}\&quot;,}&quot;)
+
+ assert res.contains(&quot;publisher_automation_composition_state_change_seconds_count&quot;)
+ assert res.contains(&quot;publisher_participant_update_seconds_count&quot;)
+ assert res.contains(&quot;publisher_participant_status_req_seconds_count&quot;)
+ assert res.contains(&quot;publisher_automation_composition_deploy_seconds_count&quot;)
+
+ assert res.contains(&quot;listener_participant_prime_ack_seconds_count&quot;)
+ assert res.contains(&quot;listener_automation_composition_statechange_ack_seconds_count&quot;)
+ assert res.contains(&quot;listener_participant_status_seconds_count&quot;)
+}</stringProp>
+ </JSR223Assertion>
+ <hashTree/>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">Accept</stringProp>
+ <stringProp name="Header.value">text/plain</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ </hashTree>
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Get Metrics participant" 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">${POLICY_PARTICIPANT_HOST}</stringProp>
+ <stringProp name="HTTPSampler.port">${POLICY_PARTICIPANT_HOST_PORT}</stringProp>
+ <stringProp name="HTTPSampler.protocol">http</stringProp>
+ <stringProp name="HTTPSampler.path">/onap/policyparticipant/prometheus</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">true</boolProp>
+ <intProp name="Assertion.test_type">33</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
+ <stringProp name="scriptLanguage">groovy</stringProp>
+ <stringProp name="parameters"></stringProp>
+ <stringProp name="filename"></stringProp>
+ <stringProp name="cacheKey">true</stringProp>
+ <stringProp name="script">def res = [];
+if (prev.getResponseCode() == &apos;200&apos;) {
+ res = prev.getResponseDataAsString();
+
+ assert res.contains(&quot;http_server_requests_seconds_sum&quot;)
+ assert res.contains(&quot;http_server_requests_seconds_max&quot;)
+ assert res.contains(&quot;jvm_threads_live_threads&quot;)
+
+ assert res.contains(&quot;publisher_participant_register_seconds_count&quot;)
+ assert res.contains(&quot;publisher_participant_prime_ack_seconds_count&quot;)
+ assert res.contains(&quot;publisher_participant_status_seconds_count&quot;)
+ assert res.contains(&quot;publisher_automation_composition_update_ack_seconds_count&quot;)
+
+ assert res.contains(&quot;listener_participant_status_req_seconds_count&quot;)
+ assert res.contains(&quot;listener_participant_prime_seconds_count&quot;)
+ assert res.contains(&quot;listener_automation_composition_state_change_seconds_count&quot;)
+ assert res.contains(&quot;listener_automation_composition_update_seconds_count&quot;)
+}</stringProp>
+ </JSR223Assertion>
+ <hashTree/>
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
+ <collectionProp name="HeaderManager.headers">
+ <elementProp name="" elementType="Header">
+ <stringProp name="Header.name">Accept</stringProp>
+ <stringProp name="Header.value">text/plain</stringProp>
+ </elementProp>
+ </collectionProp>
+ </HeaderManager>
+ <hashTree/>
+ </hashTree>
</hashTree>
<PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>