diff options
author | waynedunican <wayne.dunican@est.tech> | 2023-03-01 09:16:04 +0000 |
---|---|---|
committer | Liam Fallon <liam.fallon@est.tech> | 2023-03-01 11:59:55 +0000 |
commit | c6cff6edabdcf657b6b803ac2f8e9ee51703d4b3 (patch) | |
tree | ea005ed8b42ea59ec373bd9a378e385527d65190 | |
parent | 68f739cce7aa53e6547bd51a906779f725224a69 (diff) |
Update S3P documentation
Issue-ID: POLICY-4156
Change-Id: I5d459feebd0c6843784b56e756e30b6e22b9c2d4
Signed-off-by: Wayne Dunican <wayne.dunican@est.tech>
-rw-r--r-- | docs/development/devtools/devtools.rst | 1 | ||||
-rw-r--r-- | docs/development/devtools/run-s3p.rst | 52 |
2 files changed, 53 insertions, 0 deletions
diff --git a/docs/development/devtools/devtools.rst b/docs/development/devtools/devtools.rst index 1ecd2bc4..c84fb746 100644 --- a/docs/development/devtools/devtools.rst +++ b/docs/development/devtools/devtools.rst @@ -310,6 +310,7 @@ familiar with the Policy Framework components and test any local changes. .. toctree:: :maxdepth: 1 + run-s3p.rst api-s3p.rst pap-s3p.rst apex-s3p.rst diff --git a/docs/development/devtools/run-s3p.rst b/docs/development/devtools/run-s3p.rst new file mode 100644 index 00000000..17eba32a --- /dev/null +++ b/docs/development/devtools/run-s3p.rst @@ -0,0 +1,52 @@ +Running the Policy Framework S3P Tests +###################################### + +.. contents:: + :depth: 3 + +Per release, the policy framework team perform stability and performance tests per component of the policy framework. +This testing work involves performing a series of test on a full OOM deployment and updating the various test plans to work towards the given deployment. +This work can take some time to setup before performing any tests to begin with. +For stability testing, a tool called JMeter is used to trigger a series of tests for a period of 72 hours which has to be manually initiated and monitored by the tester. +Likewise, with the performance tests, but in this case for ~2 hours. +As part of the work to make to automate this process a script can be now triggered to bring up a microk8s cluster on a VM, install JMeter, alter the cluster info to match the JMX test plans for JMeter to trigger and gather results at the end. +These S3P tests will be triggered for a shorter period as part of the CSITs to prove the stability and performance of our components. + +There has been recent work completed to trigger our CSIT tests in a K8s environment. +As part of this work, a script has been created to bring up a microk8s cluster for testing purposes which includes all necessary components for our policy framework testing. +For automating the S3Ps, we will use this script to bring up a K8s environment to perform the S3P tests against. +Once this cluster is brought up, a script is called to alter the cluster. +The IPS and PORTS of our policy components are set by this script to ensure consistency in the test plans. +JMeter is installed and the S3P test plans are triggered to run by their respective components. + +.. code-block:: bash + :caption: Start S3P Script + + #===MAIN===# + if [ -z "${WORKSPACE}" ]; then + export WORKSPACE=$(git rev-parse --show-toplevel) + fi + export TESTDIR=${WORKSPACE}/testsuites + export API_PERF_TEST_FILE=$TESTDIR/performance/src/main/resources/testplans/policy_api_performance.jmx + export API_STAB_TEST_FILE=$TESTDIR/stability/src/main/resources/testplans/policy_api_stability.jmx + if [ $1 == "run" ] + then + mkdir automate-performance;cd automate-performance; + git clone "https://gerrit.onap.org/r/policy/docker" + cd docker/csit + if [ $2 == "performance" ] + then + bash start-s3p-tests.sh run $API_PERF_TEST_FILE; + elif [ $2 == "stability" ] + then + bash start-s3p-tests.sh run $API_STAB_TEST_FILE; + else + echo "echo Invalid arguments provided. Usage: $0 [option..] {performance | stability}" + fi + else + echo "Invalid arguments provided. Usage: $0 [option..] {run | uninstall}" + fi + +This script is triggered by each component. +It will export the performance and stability testplans and trigger the start-s3p-test.sh script which will perform the steps to automatically run the s3p tests. + |