From d1d92a580b4e95f02d9fcbd72f8884140d758ca5 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Mon, 16 Oct 2023 17:21:15 +0100 Subject: Add automation for s3p tests Issue-ID: POLICY-4844 Change-Id: Ia6003d5b492d2731fdd0d17342b4fd1c213c4b91 Signed-off-by: saul.gill --- .../src/main/resources/testplans/performance.jmx | 38 +++------------------- .../src/main/resources/testplans/run_test.sh | 13 ++++++-- 2 files changed, 14 insertions(+), 37 deletions(-) (limited to 'testsuites/performance') 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 @@ - + @@ -311,7 +311,7 @@ ${PAP_PORT} http - /policy/pap/v1/policies/status/ + /policy/pap/v1/policies/status GET true false @@ -522,7 +522,7 @@ false - + 1000 @@ -558,36 +558,6 @@ - - - - - ${DISTRIBUTION_HOST} - ${DISTRIBUTION_PORT} - http - - statistics - GET - true - false - true - false - - - - - - - - 200 - - - Assertion.response_code - false - 8 - - - @@ -711,4 +681,4 @@ - + \ 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 " + 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 & -- cgit 1.2.3-korg