diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2023-11-16 11:48:11 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2023-11-16 11:55:47 +0000 |
commit | 42aa3913332e6e26cdbb327770c837e20ba7adb8 (patch) | |
tree | 42726de11775c091894612df2648adf379a26c3e | |
parent | 38cdc5826c03ac5b7f151cc26c6bf086edc2a699 (diff) |
Fix PAP metrics validation in jmx files
Issue-ID: POLICY-4846
Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech>
Change-Id: I79e17927f9e50f28ba8159d63ad6317eaaa2deaf
-rw-r--r-- | testsuites/performance/src/main/resources/testplans/performance.jmx | 15 | ||||
-rw-r--r-- | testsuites/stability/src/main/resources/testplans/stability.jmx | 20 |
2 files changed, 18 insertions, 17 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/performance.jmx b/testsuites/performance/src/main/resources/testplans/performance.jmx index c88397c7..f2370551 100644 --- a/testsuites/performance/src/main/resources/testplans/performance.jmx +++ b/testsuites/performance/src/main/resources/testplans/performance.jmx @@ -1035,21 +1035,22 @@ if (prev.getResponseCode() == '200') { <stringProp name="script"> if (prev.getResponseCode() == '200') { def res = prev.getResponseDataAsString(); - assert res.contains('http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/healthcheck",}'); + assert res.contains('http_server_requests_seconds_count{error="none",exception="none",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",}'); + def newSimpleDeployAPICount = '0'; - if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/policies",} ')) { - newSimpleDeployAPICount = (res =~ /http_server_requests_seconds_count\{exception="None",method="POST",outcome="SUCCESS",status="202",uri="\/policy\/pap\/v1\/pdps\/policies",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] + if (res.contains('http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="/pdps/policies",} ')) { + newSimpleDeployAPICount = (res =~ /http_server_requests_seconds_count\{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="\/pdps\/policies",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] } def newBatchDeploymentAPICount = '0'; - if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/deployments/batch",} ')) { - newBatchDeploymentAPICount = (res =~ /http_server_requests_seconds_count\{exception="None",method="POST",outcome="SUCCESS",status="202",uri="\/policy\/pap\/v1\/pdps\/deployments\/batch",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] + if (res.contains('http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="/pdps/deployments/batch",} ')) { + newBatchDeploymentAPICount = (res =~ /http_server_requests_seconds_count\{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="\/pdps\/deployments\/batch",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] } assert Long.valueOf(vars.get("simpleDeployAPICount")) < Long.valueOf(newSimpleDeployAPICount); assert Long.valueOf(vars.get("batchDeploymentAPICount")) < Long.valueOf(newBatchDeploymentAPICount); - + }</stringProp> </JSR223Assertion> <hashTree/> @@ -1247,7 +1248,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/s3p/resultTable.log</stringProp> + <stringProp name="filename">/home/ramesh/s3pTestResults.jtl</stringProp> </ResultCollector> <hashTree/> </hashTree> diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx index a7c17b01..d4f95d7f 100644 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -11301,23 +11301,23 @@ if (prev.getResponseCode() == '200') { } def newSimpleDeployAPICount = '0'; - if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/policies",} ')) { - newSimpleDeployAPICount = (res =~ /http_server_requests_seconds_count\{exception="None",method="POST",outcome="SUCCESS",status="202",uri="\/policy\/pap\/v1\/pdps\/policies",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] + if (res.contains('http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="/pdps/policies",} ')) { + newSimpleDeployAPICount = (res =~ /http_server_requests_seconds_count\{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="\/pdps\/policies",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] } def newSimpleUndeployAPICount = '0'; - if (res.contains('http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/policies/{name}",} ')) { - newSimpleUndeployAPICount = (res =~ /http_server_requests_seconds_count\{exception="None",method="DELETE",outcome="SUCCESS",status="202",uri="\/policy\/pap\/v1\/pdps\/policies\/\{name\}",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] + if (res.contains('http_server_requests_seconds_count{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="202",uri="/pdps/policies/{name}",} ')) { + newSimpleUndeployAPICount = (res =~ /http_server_requests_seconds_count\{error="none",exception="none",method="DELETE",outcome="SUCCESS",status="202",uri="\/pdps\/policies\/\{name\}",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] } def newBatchDeploymentAPICount = '0'; - if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/deployments/batch",} ')) { - newBatchDeploymentAPICount = (res =~ /http_server_requests_seconds_count\{exception="None",method="POST",outcome="SUCCESS",status="202",uri="\/policy\/pap\/v1\/pdps\/deployments\/batch",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] + if (res.contains('http_server_requests_seconds_count{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="/pdps/deployments/batch",} ')) { + newBatchDeploymentAPICount = (res =~ /http_server_requests_seconds_count\{error="none",exception="none",method="POST",outcome="SUCCESS",status="202",uri="\/pdps\/deployments\/batch",\} ([0-9]+)?([.]*[0-9]*)?/)[0][1] } log.info("newDeploySuccessCount: "+ newDeploySuccessCount); log.info("newUndeploySuccessCount: "+ newUndeploySuccessCount); log.info("newBatchDeploymentAPICount: "+ newBatchDeploymentAPICount); log.info("newSimpleDeployAPICount: "+ newSimpleDeployAPICount); log.info("newSimpleUndeployAPICount: "+ newSimpleUndeployAPICount); - + assert Long.valueOf(vars.get("deployFailureCount")) == Long.valueOf(newDeployFailureCount); assert Long.valueOf(vars.get("undeployFailureCount")) == Long.valueOf(newUndeployFailureCount); // One policy is deployed/undeployed using batch API and the other one using simple APIs @@ -11326,7 +11326,7 @@ if (prev.getResponseCode() == '200') { assert (Long.valueOf(vars.get("batchDeploymentAPICount"))+2) <= Long.valueOf(newBatchDeploymentAPICount); assert (Long.valueOf(vars.get("deploySuccessCount"))+2) <= Long.valueOf(newDeploySuccessCount); assert (Long.valueOf(vars.get("undeploySuccessCount"))+2) <= Long.valueOf(newUndeploySuccessCount); - + }</stringProp> </JSR223Assertion> <hashTree/> @@ -11563,7 +11563,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/s3p/resultSummary.jtl</stringProp> + <stringProp name="filename">/home/ramesh/s3pTestResults.jtl</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> @@ -11637,7 +11637,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/s3p/resultTable.log</stringProp> + <stringProp name="filename">/home/ramesh/s3pTestResults.jtl</stringProp> </ResultCollector> <hashTree/> </hashTree> |