blob: 6666fe7820e73ed80bd8006dca85a22b09ded73b [file] [log] [blame]
Pamela Dragoshba45dc62020-04-16 09:27:44 -04001.. This work is licensed under a
2.. Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4
5.. _pap-s3p-label:
6
7.. toctree::
8 :maxdepth: 2
9
10Policy PAP component
11~~~~~~~~~~~~~~~~~~~~
12
a.sreekumar43ec4a42020-10-22 11:24:58 +010013Both the Performance and the Stability tests were executed by performing requests
14against Policy components installed as part of a full ONAP OOM deployment in Nordix lab.
Pamela Dragoshba45dc62020-04-16 09:27:44 -040015
a.sreekumar43ec4a42020-10-22 11:24:58 +010016Setup Details
17+++++++++++++
Pamela Dragoshba45dc62020-04-16 09:27:44 -040018
a.sreekumar43ec4a42020-10-22 11:24:58 +010019- Policy-PAP along with all policy components deployed as part of a full ONAP OOM deployment.
20- A second instance of APEX-PDP is spun up in the setup. Update the configuration file(OnapPfConfig.json) such that the PDP can register to the new group created by PAP in the tests.
21- Both tests were run via jMeter, which was installed on a separate VM.
Pamela Dragoshba45dc62020-04-16 09:27:44 -040022
a.sreekumar43ec4a42020-10-22 11:24:58 +010023Stability Test of PAP
24+++++++++++++++++++++
Pamela Dragoshba45dc62020-04-16 09:27:44 -040025
26Test Plan
27---------
a.sreekumar43ec4a42020-10-22 11:24:58 +010028The 72 hours stability test ran the following steps sequentially in a single threaded loop.
Pamela Dragoshba45dc62020-04-16 09:27:44 -040029
a.sreekumar43ec4a42020-10-22 11:24:58 +010030- **Create Policy defaultDomain** - creates an operational policy using policy/api component
31- **Create Policy sampleDomain** - creates an operational policy using policy/api component
Pamela Dragoshba45dc62020-04-16 09:27:44 -040032- **Check Health** - checks the health status of pap
33- **Check Statistics** - checks the statistics of pap
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010034- **Change state to ACTIVE** - changes the state of defaultGroup PdpGroup to ACTIVE
35- **Check PdpGroup Query** - makes a PdpGroup query request and verifies that PdpGroup is in the ACTIVE state.
36- **Deploy defaultDomain Policy** - deploys the policy defaultDomain in the existing PdpGroup
waynedunican4c791c82021-03-30 09:16:46 +010037- **Check status of defaultGroup** - checks the status of defaultGroup PdpGroup with the defaultDomain policy 1.0.0.
waynedunicane4e7f622021-10-15 15:09:35 +010038- **Check PdpGroup Audit defaultGroup** - checks the audit information for the defaultGroup PdpGroup.
39- **Check PdpGroup Audit Policy (defaultGroup)** - checks the audit information for the defaultGroup PdpGroup with the defaultDomain policy 1.0.0.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010040- **Create/Update PDP Group** - creates a new PDPGroup named sampleGroup.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010041- **Check PdpGroup Query** - makes a PdpGroup query request and verifies that 2 PdpGroups are in the ACTIVE state and defaultGroup has a policy deployed on it.
42- **Deployment Update sampleDomain** - deploys the policy sampleDomain in sampleGroup PdpGroup using pap api
waynedunican4c791c82021-03-30 09:16:46 +010043- **Check status of sampleGroup** - checks the status of the sampleGroup PdpGroup.
44- **Check status of PdpGroups** - checks the status of both PdpGroups.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010045- **Check PdpGroup Query** - makes a PdpGroup query request and verifies that the defaultGroup has a policy defaultDomain deployed on it and sampleGroup has policy sampleDomain deployed on it.
waynedunicane4e7f622021-10-15 15:09:35 +010046- **Check Audit** - checks the audit information for all PdpGroups.
a.sreekumar43ec4a42020-10-22 11:24:58 +010047- **Check Consolidated Health** - checks the consolidated health status of all policy components.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010048- **Check Deployed Policies** - checks for all the deployed policies using pap api.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010049- **Undeploy Policy sampleDomain** - undeploys the policy sampleDomain from sampleGroup PdpGroup using pap api
50- **Undeploy Default Policy** - undeploys the policy defaultDomain from PdpGroup
51- **Change state to PASSIVE(sampleGroup)** - changes the state of sampleGroup PdpGroup to PASSIVE
52- **Delete PdpGroup SampleGroup** - delete the sampleGroup PdpGroup using pap api
53- **Change State to PASSIVE(defaultGroup)** - changes the state of defaultGroup PdpGroup to PASSIVE
54- **Check PdpGroup Query** - makes a PdpGroup query request and verifies that PdpGroup is in the PASSIVE state.
55- **Delete Policy defaultDomain** - deletes the operational policy defaultDomain using policy/api component
56- **Delete Policy sampleDomain** - deletes the operational policy sampleDomain using policy/api component
Pamela Dragoshba45dc62020-04-16 09:27:44 -040057
58The following steps can be used to configure the parameters of test plan.
59
60- **HTTP Authorization Manager** - used to store user/password authentication details.
61- **HTTP Header Manager** - used to store headers which will be used for making HTTP requests.
62- **User Defined Variables** - used to store following user defined parameters.
63
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010064=========== ===================================================================
65 **Name** **Description**
66=========== ===================================================================
67 PAP_HOST IP Address or host name of PAP component
68 PAP_PORT Port number of PAP for making REST API calls
69 API_HOST IP Address or host name of API component
70 API_PORT Port number of API for making REST API calls
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010071=========== ===================================================================
Pamela Dragoshba45dc62020-04-16 09:27:44 -040072
a.sreekumar43ec4a42020-10-22 11:24:58 +010073The test was run in the background via "nohup", to prevent it from being interrupted:
Pamela Dragoshba45dc62020-04-16 09:27:44 -040074
a.sreekumar43ec4a42020-10-22 11:24:58 +010075.. code-block:: bash
76
waynedunicane4e7f622021-10-15 15:09:35 +010077 nohup ./jMeter/apache-jmeter-5.3/bin/jmeter.sh -n -t stability.jmx -l testresults.jtl
Pamela Dragoshba45dc62020-04-16 09:27:44 -040078
79Test Results
80------------
81
82**Summary**
83
waynedunicane4e7f622021-10-15 15:09:35 +010084Stability test plan was triggered for 72 hours.
Pamela Dragoshba45dc62020-04-16 09:27:44 -040085
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010086.. Note::
87
88 .. container:: paragraph
89
a.sreekumar43ec4a42020-10-22 11:24:58 +010090 As part of the OOM deployment, another APEX-PDP pod is spun up with the pdpGroup name specified as 'sampleGroup'.
91 After creating the new group called 'sampleGroup' as part of the test, a time delay of 2 minutes is added,
92 so that the pdp is registered to the newly created group.
93 This has resulted in a spike in the Average time taken per request. But, this is required to make proper assertions,
94 and also for the consolidated health check.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +010095
96**Test Statistics**
97
98======================= ================= ================== ==================================
99**Total # of requests** **Success %** **Error %** **Average time taken per request**
100======================= ================= ================== ==================================
waynedunicane4e7f622021-10-15 15:09:35 +010010134053 99.14 % 0.86 % 1051 ms
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +0100102======================= ================= ================== ==================================
103
a.sreekumar43ec4a42020-10-22 11:24:58 +0100104.. Note::
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +0100105
a.sreekumar43ec4a42020-10-22 11:24:58 +0100106 .. container:: paragraph
107
waynedunicane4e7f622021-10-15 15:09:35 +0100108 There were some failures during the 72 hour stability tests. These tests were caused by the apex-pdp pods restarting
109 intermitently due to limited resources in our testing environment. The second apex instance was configured as a
110 replica of the apex-pdp pod and therefore, when it restarted, registered to the "defaultGroup" as the configuration
111 was taken from the original apex-pdp pod. This meant a manual change whenever the pods restarted to make apex-pdp-"2"
112 register with the "sampleGroup".
113 When both pods were running as expected, no errors relating to the pap functionality were observed. These errors are
114 strictly caused by the environment setup and not by pap.
aditya.puthuparambil4bccfbc2020-05-06 11:18:25 +0100115
116**JMeter Screenshot**
117
waynedunicane4e7f622021-10-15 15:09:35 +0100118.. image:: images/pap-s3p-stability-result-jmeter.png
a.sreekumar43ec4a42020-10-22 11:24:58 +0100119
120**Memory and CPU usage**
121
122The memory and CPU usage can be monitored by running "top" command on the PAP pod. A snapshot is taken before and after test execution to monitor the changes in resource utilization.
123
124Memory and CPU usage before test execution:
125
waynedunicane4e7f622021-10-15 15:09:35 +0100126.. image:: images/pap-s3p-mem-bt.png
a.sreekumar43ec4a42020-10-22 11:24:58 +0100127
128Memory and CPU usage after test execution:
129
waynedunicane4e7f622021-10-15 15:09:35 +0100130.. image:: images/pap-s3p-mem-at.png
a.sreekumar43ec4a42020-10-22 11:24:58 +0100131
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100132
133Performance Test of PAP
134++++++++++++++++++++++++
135
136Introduction
137------------
138
139Performance test of PAP has the goal of testing the min/avg/max processing time and rest call throughput for all the requests with multiple requests at the same time.
140
141Setup Details
142-------------
143
144The performance test is performed on a similar setup as Stability test. The JMeter VM will be sending a large number of REST requests to the PAP component and collecting the statistics.
145
a.sreekumar43ec4a42020-10-22 11:24:58 +0100146
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100147Test Plan
148---------
149
150Performance test plan is the same as the stability test plan above except for the few differences listed below.
151
152- Increase the number of threads up to 5 (simulating 5 users' behaviours at the same time).
153- Reduce the test time to 2 hours.
154- Usage of counters to create different groups by the 'Create/Update PDP Group' test case.
a.sreekumar43ec4a42020-10-22 11:24:58 +0100155- Removed the delay to wait for the new PDP to be registered. Also removed the corresponding assertions where the Pdp instance registration to the newly created group is validated.
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100156
157Run Test
158--------
159
160Running/Triggering the performance test will be the same as the stability test. That is, launch JMeter pointing to corresponding *.jmx* test plan. The *API_HOST* , *API_PORT* , *PAP_HOST* , *PAP_PORT* are already set up in *.jmx*.
161
a.sreekumar43ec4a42020-10-22 11:24:58 +0100162.. code-block:: bash
163
waynedunicane4e7f622021-10-15 15:09:35 +0100164 nohup ./jMeter/apache-jmeter-5.3/bin/jmeter.sh -n -t performance.jmx -l perftestresults.jtl
a.sreekumar43ec4a42020-10-22 11:24:58 +0100165
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100166Once the test execution is completed, execute the below script to get the statistics:
167
168.. code-block:: bash
169
170 $ cd /home/ubuntu/pap/testsuites/performance/src/main/resources/testplans
171 $ ./results.sh /home/ubuntu/pap_perf/resultTree.log
172
173Test Results
174------------
175
a.sreekumar43ec4a42020-10-22 11:24:58 +0100176Test results are shown as below.
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100177
178**Test Statistics**
179
waynedunican4c791c82021-03-30 09:16:46 +0100180======================= ================= ================== ==================================
181**Total # of requests** **Success %** **Error %** **Average time taken per request**
182======================= ================= ================== ==================================
waynedunicane4e7f622021-10-15 15:09:35 +010018324092 100 % 0.00 % 2467 ms
waynedunican4c791c82021-03-30 09:16:46 +0100184======================= ================= ================== ==================================
aditya.puthuparambil4750e512020-05-13 11:51:04 +0100185
186**JMeter Screenshot**
187
waynedunicane4e7f622021-10-15 15:09:35 +0100188.. image:: images/pap-s3p-performance-result-jmeter.png