summaryrefslogtreecommitdiffstats
path: root/testsuites/performance/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/performance/src/main')
-rw-r--r--testsuites/performance/src/main/resources/testplans/performance.jmx38
-rwxr-xr-xtestsuites/performance/src/main/resources/testplans/run_test.sh13
2 files changed, 14 insertions, 37 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/performance.jmx b/testsuites/performance/src/main/resources/testplans/performance.jmx
index 7abd7e4e..02ea601a 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.4.1">
+<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.5">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="performance test plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -311,7 +311,7 @@
<stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">http</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
- <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/status/</stringProp>
+ <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/status</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@@ -522,7 +522,7 @@
<boolProp name="AuthManager.controlledByThreadGroup">false</boolProp>
</AuthManager>
<hashTree/>
- <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="HealthCheck/Statistics" enabled="true"/>
+ <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="HealthCheck" enabled="true"/>
<hashTree>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
@@ -558,36 +558,6 @@
</ResponseAssertion>
<hashTree/>
</hashTree>
- <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">${DISTRIBUTION_HOST}</stringProp>
- <stringProp name="HTTPSampler.port">${DISTRIBUTION_PORT}</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>
- <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="Assert Metrics" enabled="true"/>
<hashTree>
@@ -711,4 +681,4 @@
</hashTree>
</hashTree>
</hashTree>
-</jmeterTestPlan>
+</jmeterTestPlan> \ No newline at end of file
diff --git a/testsuites/performance/src/main/resources/testplans/run_test.sh b/testsuites/performance/src/main/resources/testplans/run_test.sh
index 1022a8e6..5ce3e7c4 100755
--- a/testsuites/performance/src/main/resources/testplans/run_test.sh
+++ b/testsuites/performance/src/main/resources/testplans/run_test.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (c) 2021-2022 Nordix Foundation.
+# Copyright (c) 2021-2023 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,14 +17,21 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <duration>"
+ exit 1
+fi
+
+duration="$1"
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-JMETER_HOME=~/jmeter/apache-jmeter-5.4.1
+JMETER_HOME=~/jmeter/apache-jmeter-5.5
POLICY_API_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' policy-api)
POLICY_PAP_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' policy-pap)
POLICY_DISTRIBUTION_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' policy-distribution)
-${JMETER_HOME}/bin/jmeter -n -t "${DIR}"/performance.jmx -Jduration=14400 \
+${JMETER_HOME}/bin/jmeter -n -t "${DIR}"/performance.jmx -Jduration="${duration}" \
-Japihost="${POLICY_API_IP}" \
-Jpaphost="${POLICY_PAP_IP}" \
-Jdisthost="${POLICY_DISTRIBUTION_IP}" -l distribution_performance.jtl &