1 <?xml version="1.0" encoding="UTF-8"?>
3 ============LICENSE_START=======================================================
5 ================================================================================
6 Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
7 Modifications Copyright (C) 2020-2021 Nordix Foundation.
8 Modifications Copyright (C) 2020,2022 Bell Canada. All rights reserved.
9 ================================================================================
10 Licensed under the Apache License, Version 2.0 (the "License");
11 you may not use this file except in compliance with the License.
12 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
21 <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1">
23 <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy PAP Stability" enabled="true">
24 <stringProp name="TestPlan.comments">Policy PAP Stability Tests</stringProp>
25 <boolProp name="TestPlan.functional_mode">false</boolProp>
26 <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
27 <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
28 <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
29 <collectionProp name="Arguments.arguments">
30 <elementProp name="PAP_HOST" elementType="Argument">
31 <stringProp name="Argument.name">PAP_HOST</stringProp>
32 <stringProp name="Argument.value">172.16.1.204</stringProp>
33 <stringProp name="Argument.metadata">=</stringProp>
35 <elementProp name="PAP_PORT" elementType="Argument">
36 <stringProp name="Argument.name">PAP_PORT</stringProp>
37 <stringProp name="Argument.value">32352</stringProp>
38 <stringProp name="Argument.metadata">=</stringProp>
40 <elementProp name="API_HOST" elementType="Argument">
41 <stringProp name="Argument.name">API_HOST</stringProp>
42 <stringProp name="Argument.value">172.16.1.204</stringProp>
43 <stringProp name="Argument.metadata">=</stringProp>
45 <elementProp name="API_PORT" elementType="Argument">
46 <stringProp name="Argument.name">API_PORT</stringProp>
47 <stringProp name="Argument.value">30263</stringProp>
48 <stringProp name="Argument.metadata">=</stringProp>
50 <elementProp name="USERS" elementType="Argument">
51 <stringProp name="Argument.name">USERS</stringProp>
52 <stringProp name="Argument.value">10</stringProp>
53 <stringProp name="Argument.metadata">=</stringProp>
57 <stringProp name="TestPlan.user_define_classpath"></stringProp>
60 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
61 <collectionProp name="AuthManager.auth_list">
62 <elementProp name="" elementType="Authorization">
63 <stringProp name="Authorization.url">https://${PAP_HOST}:${PAP_PORT}/policy/pap/v1</stringProp>
64 <stringProp name="Authorization.username">policyadmin</stringProp>
65 <stringProp name="Authorization.password">zb!XztG34</stringProp>
66 <stringProp name="Authorization.domain"></stringProp>
67 <stringProp name="Authorization.realm"></stringProp>
69 <elementProp name="" elementType="Authorization">
70 <stringProp name="Authorization.url">https://${API_HOST}:${API_PORT}/policy/api/v1</stringProp>
71 <stringProp name="Authorization.username">policyadmin</stringProp>
72 <stringProp name="Authorization.password">zb!XztG34</stringProp>
73 <stringProp name="Authorization.domain"></stringProp>
74 <stringProp name="Authorization.realm"></stringProp>
76 <elementProp name="" elementType="Authorization">
77 <stringProp name="Authorization.url">https://${PAP_HOST}:${PAP_PORT}/metrics</stringProp>
78 <stringProp name="Authorization.username">policyadmin</stringProp>
79 <stringProp name="Authorization.password">zb!XztG34</stringProp>
80 <stringProp name="Authorization.domain"></stringProp>
81 <stringProp name="Authorization.realm"></stringProp>
84 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
85 <boolProp name="AuthManager.controlledByThreadGroup">false</boolProp>
88 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
89 <collectionProp name="HeaderManager.headers">
90 <elementProp name="" elementType="Header">
91 <stringProp name="Header.name">Content-Type</stringProp>
92 <stringProp name="Header.value">application/json</stringProp>
97 <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true">
98 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
99 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
100 <boolProp name="LoopController.continue_forever">false</boolProp>
101 <stringProp name="LoopController.loops">1</stringProp>
103 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
104 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
105 <boolProp name="ThreadGroup.scheduler">false</boolProp>
106 <stringProp name="ThreadGroup.duration"></stringProp>
107 <stringProp name="ThreadGroup.delay"></stringProp>
108 <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
111 <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter" enabled="true">
112 <stringProp name="CounterConfig.start">1</stringProp>
113 <stringProp name="CounterConfig.end"></stringProp>
114 <stringProp name="CounterConfig.incr">1</stringProp>
115 <stringProp name="CounterConfig.name">threadCount</stringProp>
116 <stringProp name="CounterConfig.format"></stringProp>
117 <boolProp name="CounterConfig.per_user">false</boolProp>
120 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy" enabled="true">
121 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
122 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
123 <collectionProp name="Arguments.arguments">
124 <elementProp name="" elementType="HTTPArgument">
125 <boolProp name="HTTPArgument.always_encode">false</boolProp>
126 <stringProp name="Argument.value">{
127 "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
128 "topology_template": {
129 "policies": [
131 "operational.modifyconfig${threadCount}": {
132 "type": "onap.policies.controlloop.operational.common.Drools",
133 "type_version": "1.0.0",
134 "version": "1.0.0",
135 "metadata": {
136 "policy-id": "operational.modifyconfig${threadCount}"
138 "properties": {
139 "id": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
140 "timeout": 1200,
141 "abatement": false,
142 "trigger": "unique-policy-id-1-modifyConfig",
143 "operations": [
145 "id": "unique-policy-id-1-modifyConfig",
146 "description": "Modify the packet generator",
147 "operation": {
148 "actor": "CDS",
149 "operation": "modify-config",
150 "target": {
151 "targetType": "VNF",
152 "entityIds": {
153 "resourceID": "37b008b9-b367-4359-93fd-74d3ce0ee1a0"
156 "payload":{
157 "artifact_name": "vFW-CDS",
158 "artifact_version": "1.0.0",
159 "data": "{\"active-streams\": \"7\"}"
162 "timeout": 300,
163 "retries": 0,
164 "success": "final_success",
165 "failure": "final_failure",
166 "failure_timeout": "final_failure_timeout",
167 "failure_retries": "final_failure_retries",
168 "failure_exception": "final_failure_exception",
169 "failure_guard": "final_failure_guard"
172 "controllerName": "usecases"
179 <stringProp name="Argument.metadata">=</stringProp>
183 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
184 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
185 <stringProp name="HTTPSampler.protocol">https</stringProp>
186 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
187 <stringProp name="HTTPSampler.path">/policy/api/v1/policies</stringProp>
188 <stringProp name="HTTPSampler.method">POST</stringProp>
189 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
190 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
191 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
192 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
193 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
194 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
195 <stringProp name="HTTPSampler.response_timeout"></stringProp>
198 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
199 <collectionProp name="Asserion.test_strings">
200 <stringProp name="49586">200</stringProp>
202 <stringProp name="Assertion.custom_message"></stringProp>
203 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
204 <boolProp name="Assertion.assume_success">false</boolProp>
205 <intProp name="Assertion.test_type">1</intProp>
209 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change State to ACTIVE (defaultGroup)" enabled="true">
210 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
211 <collectionProp name="Arguments.arguments"/>
213 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
214 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
215 <stringProp name="HTTPSampler.protocol">https</stringProp>
216 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
217 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/groups/defaultGroup?state=ACTIVE</stringProp>
218 <stringProp name="HTTPSampler.method">PUT</stringProp>
219 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
220 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
221 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
222 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
223 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
224 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
225 <stringProp name="HTTPSampler.response_timeout"></stringProp>
228 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
229 <collectionProp name="Asserion.test_strings">
230 <stringProp name="49586">200</stringProp>
232 <stringProp name="Assertion.custom_message"></stringProp>
233 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
234 <boolProp name="Assertion.assume_success">false</boolProp>
235 <intProp name="Assertion.test_type">1</intProp>
240 <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="PAP Test Flow" enabled="true">
241 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
242 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
243 <boolProp name="LoopController.continue_forever">false</boolProp>
244 <intProp name="LoopController.loops">-1</intProp>
246 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
247 <stringProp name="ThreadGroup.ramp_time">0</stringProp>
248 <boolProp name="ThreadGroup.scheduler">true</boolProp>
249 <stringProp name="ThreadGroup.duration">7200</stringProp>
250 <stringProp name="ThreadGroup.delay"></stringProp>
251 <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
254 <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter" enabled="true">
255 <stringProp name="CounterConfig.start">1</stringProp>
256 <stringProp name="CounterConfig.end">${USERS}</stringProp>
257 <stringProp name="CounterConfig.incr">1</stringProp>
258 <stringProp name="CounterConfig.name">threadCount</stringProp>
259 <stringProp name="CounterConfig.format"></stringProp>
260 <boolProp name="CounterConfig.per_user">false</boolProp>
263 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Health" enabled="true">
264 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
265 <collectionProp name="Arguments.arguments"/>
267 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
268 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
269 <stringProp name="HTTPSampler.protocol">https</stringProp>
270 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
271 <stringProp name="HTTPSampler.path">/policy/pap/v1/healthcheck</stringProp>
272 <stringProp name="HTTPSampler.method">GET</stringProp>
273 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
274 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
275 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
276 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
277 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
278 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
279 <stringProp name="HTTPSampler.response_timeout"></stringProp>
280 <stringProp name="TestPlan.comments">Basic Health Check</stringProp>
283 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
284 <collectionProp name="Asserion.test_strings">
285 <stringProp name="49586">200</stringProp>
287 <stringProp name="Assertion.custom_message"></stringProp>
288 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
289 <boolProp name="Assertion.assume_success">false</boolProp>
290 <intProp name="Assertion.test_type">1</intProp>
293 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
294 <stringProp name="scriptLanguage">groovy</stringProp>
295 <stringProp name="parameters"></stringProp>
296 <stringProp name="filename"></stringProp>
297 <stringProp name="cacheKey">true</stringProp>
298 <stringProp name="script">import groovy.json.JsonSlurper;
301 if (prev.getResponseCode() == '200') {
302 def jsonSlurper = new JsonSlurper();
303 res = jsonSlurper.parseText(prev.getResponseDataAsString());
305 assert res instanceof Map;
306 assert res.code == 200;
307 assert res.name == "Policy PAP";
308 assert res.healthy==true;
309 assert res.message=="alive";
315 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PAP Metrics" enabled="true">
316 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
317 <collectionProp name="Arguments.arguments"/>
319 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
320 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
321 <stringProp name="HTTPSampler.protocol">https</stringProp>
322 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
323 <stringProp name="HTTPSampler.path">/metrics</stringProp>
324 <stringProp name="HTTPSampler.method">GET</stringProp>
325 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
326 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
327 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
328 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
329 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
330 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
331 <stringProp name="HTTPSampler.response_timeout"></stringProp>
332 <stringProp name="TestPlan.comments">PAP Metrics</stringProp>
335 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
336 <collectionProp name="Asserion.test_strings">
337 <stringProp name="49586">200</stringProp>
339 <stringProp name="Assertion.custom_message"></stringProp>
340 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
341 <boolProp name="Assertion.assume_success">false</boolProp>
342 <intProp name="Assertion.test_type">1</intProp>
345 <JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="JSR223 PostProcessor" enabled="true">
346 <stringProp name="cacheKey">true</stringProp>
347 <stringProp name="filename"></stringProp>
348 <stringProp name="parameters"></stringProp>
349 <stringProp name="script">
350 if (prev.getResponseCode() == '200') {
351 def res = prev.getResponseDataAsString();
353 def simpleDeployAPICount = '0';
354 if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/policies",} ')) {
355 simpleDeployAPICount = (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]
358 def batchDeploymentAPICount = '0';
359 if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/deployments/batch",} ')) {
360 batchDeploymentAPICount = (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]
363 vars.put("simpleDeployAPICount", simpleDeployAPICount);
364 vars.put("batchDeploymentAPICount", batchDeploymentAPICount);
367 <stringProp name="scriptLanguage">groovy</stringProp>
368 </JSR223PostProcessor>
371 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create/Update PDP Group" enabled="true">
372 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
373 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
374 <collectionProp name="Arguments.arguments">
375 <elementProp name="" elementType="HTTPArgument">
376 <boolProp name="HTTPArgument.always_encode">false</boolProp>
377 <stringProp name="Argument.value">{
378 "groups": [
380 "name": "sampleGroup${threadCount}",
381 "pdpGroupState": "ACTIVE",
382 "properties": {},
383 "pdpSubgroups": [
385 "pdpType": "apex",
386 "desiredInstanceCount": 1,
387 "properties": {},
388 "supportedPolicyTypes": [
390 "name": "onap.policies.native.Apex",
391 "version": "1.0.0"
394 "policies": []
400 <stringProp name="Argument.metadata">=</stringProp>
404 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
405 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
406 <stringProp name="HTTPSampler.protocol">https</stringProp>
407 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
408 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps/groups/batch</stringProp>
409 <stringProp name="HTTPSampler.method">POST</stringProp>
410 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
411 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
412 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
413 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
414 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
415 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
416 <stringProp name="HTTPSampler.response_timeout"></stringProp>
417 <stringProp name="TestPlan.comments">create SampleGroup </stringProp>
420 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
421 <collectionProp name="Asserion.test_strings">
422 <stringProp name="49586">200</stringProp>
424 <stringProp name="Assertion.custom_message"></stringProp>
425 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
426 <boolProp name="Assertion.assume_success">false</boolProp>
427 <intProp name="Assertion.test_type">1</intProp>
431 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true">
432 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
433 <collectionProp name="Arguments.arguments"/>
435 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
436 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
437 <stringProp name="HTTPSampler.protocol">https</stringProp>
438 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
439 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp>
440 <stringProp name="HTTPSampler.method">GET</stringProp>
441 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
442 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
443 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
444 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
445 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
446 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
447 <stringProp name="HTTPSampler.response_timeout"></stringProp>
448 <stringProp name="TestPlan.comments">Check PdpGroup Query</stringProp>
451 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
452 <collectionProp name="Asserion.test_strings">
453 <stringProp name="49586">200</stringProp>
455 <stringProp name="Assertion.custom_message"></stringProp>
456 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
457 <boolProp name="Assertion.assume_success">false</boolProp>
458 <intProp name="Assertion.test_type">1</intProp>
461 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
462 <stringProp name="scriptLanguage">groovy</stringProp>
463 <stringProp name="parameters"></stringProp>
464 <stringProp name="filename"></stringProp>
465 <stringProp name="cacheKey">true</stringProp>
466 <stringProp name="script">import groovy.json.JsonSlurper;
468 if (prev.getResponseCode() == '200') {
469 def jsonSlurper = new JsonSlurper();
470 res = jsonSlurper.parseText(prev.getResponseDataAsString());
472 assert res instanceof Map;
473 assert res.groups.size >= 2;
474 assert res.groups[0].pdpGroupState== 'ACTIVE';
475 assert res.groups[1].pdpGroupState== 'ACTIVE';
481 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Deploy Policy" enabled="true">
482 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
483 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
484 <collectionProp name="Arguments.arguments">
485 <elementProp name="" elementType="HTTPArgument">
486 <boolProp name="HTTPArgument.always_encode">false</boolProp>
487 <stringProp name="Argument.value">{
488 "policies" : [
490 "policy-id": "operational.modifyconfig${threadCount}",
491 "policy-version": "1.0.0"
495 <stringProp name="Argument.metadata">=</stringProp>
499 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
500 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
501 <stringProp name="HTTPSampler.protocol">https</stringProp>
502 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
503 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/policies</stringProp>
504 <stringProp name="HTTPSampler.method">POST</stringProp>
505 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
506 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
507 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
508 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
509 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
510 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
511 <stringProp name="HTTPSampler.response_timeout"></stringProp>
514 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
515 <collectionProp name="Asserion.test_strings">
516 <stringProp name="49588">202</stringProp>
518 <stringProp name="Assertion.custom_message"></stringProp>
519 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
520 <boolProp name="Assertion.assume_success">false</boolProp>
521 <intProp name="Assertion.test_type">1</intProp>
524 <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
525 <stringProp name="ConstantTimer.delay">5000</stringProp>
529 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check status of policy" enabled="true">
530 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
531 <collectionProp name="Arguments.arguments"/>
533 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
534 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
535 <stringProp name="HTTPSampler.protocol">https</stringProp>
536 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
537 <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/status/defaultGroup/operational.modifyconfig${threadCount}/1.0.0</stringProp>
538 <stringProp name="HTTPSampler.method">GET</stringProp>
539 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
540 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
541 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
542 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
543 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
544 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
545 <stringProp name="HTTPSampler.response_timeout"></stringProp>
546 <stringProp name="TestPlan.comments">Query policies status for defaultGroup</stringProp>
549 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
550 <collectionProp name="Asserion.test_strings">
551 <stringProp name="49586">200</stringProp>
553 <stringProp name="Assertion.custom_message"></stringProp>
554 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
555 <boolProp name="Assertion.assume_success">false</boolProp>
556 <intProp name="Assertion.test_type">1</intProp>
560 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check status of PdpGroups" enabled="true">
561 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
562 <collectionProp name="Arguments.arguments"/>
564 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
565 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
566 <stringProp name="HTTPSampler.protocol">https</stringProp>
567 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
568 <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/status</stringProp>
569 <stringProp name="HTTPSampler.method">GET</stringProp>
570 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
571 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
572 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
573 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
574 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
575 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
576 <stringProp name="HTTPSampler.response_timeout"></stringProp>
577 <stringProp name="TestPlan.comments">Query policies status</stringProp>
580 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
581 <collectionProp name="Asserion.test_strings">
582 <stringProp name="49586">200</stringProp>
584 <stringProp name="Assertion.custom_message"></stringProp>
585 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
586 <boolProp name="Assertion.assume_success">false</boolProp>
587 <intProp name="Assertion.test_type">1</intProp>
591 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Audit defaultGroup" enabled="true">
592 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
593 <collectionProp name="Arguments.arguments"/>
595 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
596 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
597 <stringProp name="HTTPSampler.protocol">https</stringProp>
598 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
599 <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/audit/defaultGroup</stringProp>
600 <stringProp name="HTTPSampler.method">GET</stringProp>
601 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
602 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
603 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
604 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
605 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
606 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
607 <stringProp name="HTTPSampler.response_timeout"></stringProp>
608 <stringProp name="TestPlan.comments">Check PdpGroup Audit</stringProp>
611 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
612 <collectionProp name="Asserion.test_strings">
613 <stringProp name="49586">200</stringProp>
615 <stringProp name="Assertion.custom_message"></stringProp>
616 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
617 <boolProp name="Assertion.assume_success">false</boolProp>
618 <intProp name="Assertion.test_type">1</intProp>
622 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Audit Policy (defaultGroup)" enabled="true">
623 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
624 <collectionProp name="Arguments.arguments"/>
626 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
627 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
628 <stringProp name="HTTPSampler.protocol">https</stringProp>
629 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
630 <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/audit/defaultGroup/operational.modifyconfig${threadCount}/1.0.0</stringProp>
631 <stringProp name="HTTPSampler.method">GET</stringProp>
632 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
633 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
634 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
635 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
636 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
637 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
638 <stringProp name="HTTPSampler.response_timeout"></stringProp>
639 <stringProp name="TestPlan.comments">Check PdpGroup Audit</stringProp>
642 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
643 <collectionProp name="Asserion.test_strings">
644 <stringProp name="49586">200</stringProp>
646 <stringProp name="Assertion.custom_message"></stringProp>
647 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
648 <boolProp name="Assertion.assume_success">false</boolProp>
649 <intProp name="Assertion.test_type">1</intProp>
653 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true">
654 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
655 <collectionProp name="Arguments.arguments"/>
657 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
658 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
659 <stringProp name="HTTPSampler.protocol">https</stringProp>
660 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
661 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp>
662 <stringProp name="HTTPSampler.method">GET</stringProp>
663 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
664 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
665 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
666 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
667 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
668 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
669 <stringProp name="HTTPSampler.response_timeout"></stringProp>
670 <stringProp name="TestPlan.comments">Check PdpGroup Query</stringProp>
673 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
674 <collectionProp name="Asserion.test_strings">
675 <stringProp name="49586">200</stringProp>
677 <stringProp name="Assertion.custom_message"></stringProp>
678 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
679 <boolProp name="Assertion.assume_success">false</boolProp>
680 <intProp name="Assertion.test_type">1</intProp>
683 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
684 <stringProp name="scriptLanguage">groovy</stringProp>
685 <stringProp name="parameters"></stringProp>
686 <stringProp name="filename"></stringProp>
687 <stringProp name="cacheKey">true</stringProp>
688 <stringProp name="script">import groovy.json.JsonSlurper;
691 if (prev.getResponseCode() == '200') {
692 def jsonSlurper = new JsonSlurper();
693 res = jsonSlurper.parseText(prev.getResponseDataAsString());
695 assert res instanceof Map;
696 assert res.groups.size >= 2;
698 for(int groupSize=0;groupSize<res.groups.size;groupSize++){
700 for(int subGrpSize=0;subGrpSize<res.groups[groupSize].pdpSubgroups.size;subGrpSize++){
702 def pdpSubGrp=res.groups[groupSize].pdpSubgroups[subGrpSize];
703 if(pdpSubGrp.pdpType =='drools'){
704 assert pdpSubGrp.pdpInstances.size == 1;
705 if (res.groups[groupSize].name == 'defaultGroup') {
706 assert pdpSubGrp.policies.size >= 1;
708 else if(res.groups[groupSize].name == 'sampleGroup' ){
709 assert pdpSubGrp.policies.size == 0;
710 //assert pdpSubGrp.policies[0].name == 'operational.apex.stabilityTestDefaultDomain';
721 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Consolidated Health" enabled="true">
722 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
723 <collectionProp name="Arguments.arguments"/>
725 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
726 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
727 <stringProp name="HTTPSampler.protocol">https</stringProp>
728 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
729 <stringProp name="HTTPSampler.path">/policy/pap/v1/components/healthcheck</stringProp>
730 <stringProp name="HTTPSampler.method">GET</stringProp>
731 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
732 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
733 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
734 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
735 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
736 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
737 <stringProp name="HTTPSampler.response_timeout"></stringProp>
738 <stringProp name="TestPlan.comments">Consolidated Health Check</stringProp>
741 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
742 <collectionProp name="Asserion.test_strings">
743 <stringProp name="49586">200</stringProp>
745 <stringProp name="Assertion.custom_message"></stringProp>
746 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
747 <boolProp name="Assertion.assume_success">false</boolProp>
748 <intProp name="Assertion.test_type">1</intProp>
751 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
752 <stringProp name="scriptLanguage">groovy</stringProp>
753 <stringProp name="parameters"></stringProp>
754 <stringProp name="filename"></stringProp>
755 <stringProp name="cacheKey">true</stringProp>
756 <stringProp name="script">import groovy.json.JsonSlurper;
759 if (prev.getResponseCode() == '200') {
760 def jsonSlurper = new JsonSlurper();
761 res = jsonSlurper.parseText(prev.getResponseDataAsString());
762 assert res instanceof Map;
763 assert res.pdps.xacml!=null;
764 assert res.pdps.drools!=null;
765 assert res.pdps.apex!=null;
771 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Deployed Policies" enabled="true">
772 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
773 <collectionProp name="Arguments.arguments"/>
775 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
776 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
777 <stringProp name="HTTPSampler.protocol">https</stringProp>
778 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
779 <stringProp name="HTTPSampler.path">/policy/pap/v1/policies/deployed</stringProp>
780 <stringProp name="HTTPSampler.method">GET</stringProp>
781 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
782 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
783 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
784 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
785 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
786 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
787 <stringProp name="HTTPSampler.response_timeout"></stringProp>
788 <stringProp name="TestPlan.comments">Query Deployed policies</stringProp>
791 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
792 <collectionProp name="Asserion.test_strings">
793 <stringProp name="49586">200</stringProp>
795 <stringProp name="Assertion.custom_message"></stringProp>
796 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
797 <boolProp name="Assertion.assume_success">false</boolProp>
798 <intProp name="Assertion.test_type">1</intProp>
801 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
802 <stringProp name="scriptLanguage">groovy</stringProp>
803 <stringProp name="parameters"></stringProp>
804 <stringProp name="filename"></stringProp>
805 <stringProp name="cacheKey">true</stringProp>
806 <stringProp name="script">import groovy.json.JsonSlurper;
809 if (prev.getResponseCode() == '200') {
810 def jsonSlurper = new JsonSlurper();
811 res = jsonSlurper.parseText(prev.getResponseDataAsString());
812 assert res.size >1 ;
819 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy Policy" enabled="true">
820 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
821 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
822 <collectionProp name="Arguments.arguments">
823 <elementProp name="" elementType="HTTPArgument">
824 <boolProp name="HTTPArgument.always_encode">false</boolProp>
825 <stringProp name="Argument.value">{
826 "groups": [
828 "name": "defaultGroup",
829 "deploymentSubgroups": [
831 "pdpType": "drools",
832 "action": "DELETE",
833 "policies": [
835 "name": "operational.modifyconfig${threadCount}",
836 "version": "1.0.0"
844 <stringProp name="Argument.metadata">=</stringProp>
848 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
849 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
850 <stringProp name="HTTPSampler.protocol">https</stringProp>
851 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
852 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps/deployments/batch</stringProp>
853 <stringProp name="HTTPSampler.method">POST</stringProp>
854 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
855 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
856 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
857 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
858 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
859 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
860 <stringProp name="HTTPSampler.response_timeout"></stringProp>
863 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
864 <collectionProp name="Asserion.test_strings">
865 <stringProp name="49588">202</stringProp>
867 <stringProp name="Assertion.custom_message"></stringProp>
868 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
869 <boolProp name="Assertion.assume_success">false</boolProp>
870 <intProp name="Assertion.test_type">1</intProp>
874 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change sampleGroup State to PASSIVE" enabled="true">
875 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
876 <collectionProp name="Arguments.arguments"/>
878 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
879 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
880 <stringProp name="HTTPSampler.protocol">https</stringProp>
881 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
882 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/groups/sampleGroup${threadCount}?state=PASSIVE</stringProp>
883 <stringProp name="HTTPSampler.method">PUT</stringProp>
884 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
885 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
886 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
887 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
888 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
889 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
890 <stringProp name="HTTPSampler.response_timeout"></stringProp>
893 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
894 <collectionProp name="Asserion.test_strings">
895 <stringProp name="49586">200</stringProp>
897 <stringProp name="Assertion.custom_message"></stringProp>
898 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
899 <boolProp name="Assertion.assume_success">false</boolProp>
900 <intProp name="Assertion.test_type">1</intProp>
904 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete PdpGroup SampleGroup" enabled="true">
905 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
906 <collectionProp name="Arguments.arguments"/>
908 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
909 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
910 <stringProp name="HTTPSampler.protocol">https</stringProp>
911 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
912 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps/groups/sampleGroup${threadCount}</stringProp>
913 <stringProp name="HTTPSampler.method">DELETE</stringProp>
914 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
915 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
916 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
917 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
918 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
919 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
920 <stringProp name="HTTPSampler.response_timeout"></stringProp>
921 <stringProp name="TestPlan.comments">Delete PdpGroup </stringProp>
924 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
925 <collectionProp name="Asserion.test_strings">
926 <stringProp name="49586">200</stringProp>
928 <stringProp name="Assertion.custom_message"></stringProp>
929 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
930 <boolProp name="Assertion.assume_success">false</boolProp>
931 <intProp name="Assertion.test_type">1</intProp>
935 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true">
936 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
937 <collectionProp name="Arguments.arguments"/>
939 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
940 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
941 <stringProp name="HTTPSampler.protocol">https</stringProp>
942 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
943 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp>
944 <stringProp name="HTTPSampler.method">GET</stringProp>
945 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
946 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
947 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
948 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
949 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
950 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
951 <stringProp name="HTTPSampler.response_timeout"></stringProp>
952 <stringProp name="TestPlan.comments">Check PdpGroup Query</stringProp>
955 <SyncTimer guiclass="TestBeanGUI" testclass="SyncTimer" testname="Synchronizing Timer" enabled="true">
956 <intProp name="groupSize">0</intProp>
957 <longProp name="timeoutInMs">30000</longProp>
960 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
961 <collectionProp name="Asserion.test_strings">
962 <stringProp name="49586">200</stringProp>
964 <stringProp name="Assertion.custom_message"></stringProp>
965 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
966 <boolProp name="Assertion.assume_success">false</boolProp>
967 <intProp name="Assertion.test_type">1</intProp>
970 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
971 <stringProp name="scriptLanguage">groovy</stringProp>
972 <stringProp name="parameters"></stringProp>
973 <stringProp name="filename"></stringProp>
974 <stringProp name="cacheKey">true</stringProp>
975 <stringProp name="script">import groovy.json.JsonSlurper;
978 if (prev.getResponseCode() == '200') {
979 def jsonSlurper = new JsonSlurper();
980 res = jsonSlurper.parseText(prev.getResponseDataAsString());
982 assert res instanceof Map;
983 assert res.groups.size == 1;
985 for(int subGrpSize=0;subGrpSize<res.groups[0].pdpSubgroups.size;subGrpSize++){
987 def pdpSubGrp=res.groups[0].pdpSubgroups[subGrpSize];
988 if(pdpSubGrp.pdpType =='drools'){
989 assert pdpSubGrp.pdpInstances.size == 1;
990 assert pdpSubGrp.policies.size == 0;
1000 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="PAP Metrics after deployments" enabled="true">
1001 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
1002 <collectionProp name="Arguments.arguments"/>
1004 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
1005 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
1006 <stringProp name="HTTPSampler.protocol">https</stringProp>
1007 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
1008 <stringProp name="HTTPSampler.path">/metrics</stringProp>
1009 <stringProp name="HTTPSampler.method">GET</stringProp>
1010 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
1011 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
1012 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
1013 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
1014 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
1015 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
1016 <stringProp name="HTTPSampler.response_timeout"></stringProp>
1017 <stringProp name="TestPlan.comments">PAP Metrics after deployments</stringProp>
1020 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
1021 <collectionProp name="Asserion.test_strings">
1022 <stringProp name="49586">200</stringProp>
1024 <stringProp name="Assertion.custom_message"></stringProp>
1025 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
1026 <boolProp name="Assertion.assume_success">false</boolProp>
1027 <intProp name="Assertion.test_type">1</intProp>
1028 </ResponseAssertion>
1030 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
1031 <stringProp name="scriptLanguage">groovy</stringProp>
1032 <stringProp name="parameters"></stringProp>
1033 <stringProp name="filename"></stringProp>
1034 <stringProp name="cacheKey">true</stringProp>
1035 <stringProp name="script">
1036 if (prev.getResponseCode() == '200') {
1037 def res = prev.getResponseDataAsString();
1038 assert res.contains('http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/pap/v1/healthcheck",}');
1040 def newSimpleDeployAPICount = '0';
1041 if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/policies",} ')) {
1042 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]
1045 def newBatchDeploymentAPICount = '0';
1046 if (res.contains('http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="202",uri="/policy/pap/v1/pdps/deployments/batch",} ')) {
1047 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]
1050 assert Long.valueOf(vars.get("simpleDeployAPICount")) < Long.valueOf(newSimpleDeployAPICount);
1051 assert Long.valueOf(vars.get("batchDeploymentAPICount")) < Long.valueOf(newBatchDeploymentAPICount);
1058 <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true">
1059 <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>
1060 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
1061 <boolProp name="LoopController.continue_forever">false</boolProp>
1062 <stringProp name="LoopController.loops">1</stringProp>
1064 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
1065 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
1066 <boolProp name="ThreadGroup.scheduler">false</boolProp>
1067 <stringProp name="ThreadGroup.duration"></stringProp>
1068 <stringProp name="ThreadGroup.delay"></stringProp>
1069 <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
1072 <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter" enabled="true">
1073 <stringProp name="CounterConfig.start">1</stringProp>
1074 <stringProp name="CounterConfig.end"></stringProp>
1075 <stringProp name="CounterConfig.incr">1</stringProp>
1076 <stringProp name="CounterConfig.name">threadCount</stringProp>
1077 <stringProp name="CounterConfig.format"></stringProp>
1078 <boolProp name="CounterConfig.per_user">false</boolProp>
1081 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change defaultGroup State to PASSIVE" enabled="true">
1082 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
1083 <collectionProp name="Arguments.arguments"/>
1085 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
1086 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
1087 <stringProp name="HTTPSampler.protocol">https</stringProp>
1088 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
1089 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/groups/defaultGroup?state=PASSIVE</stringProp>
1090 <stringProp name="HTTPSampler.method">PUT</stringProp>
1091 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
1092 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
1093 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
1094 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
1095 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
1096 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
1097 <stringProp name="HTTPSampler.response_timeout"></stringProp>
1100 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
1101 <collectionProp name="Asserion.test_strings">
1102 <stringProp name="49586">200</stringProp>
1104 <stringProp name="Assertion.custom_message"></stringProp>
1105 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
1106 <boolProp name="Assertion.assume_success">false</boolProp>
1107 <intProp name="Assertion.test_type">1</intProp>
1108 </ResponseAssertion>
1111 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy" enabled="true">
1112 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
1113 <collectionProp name="Arguments.arguments"/>
1115 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
1116 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
1117 <stringProp name="HTTPSampler.protocol">https</stringProp>
1118 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
1119 <stringProp name="HTTPSampler.path">/policy/api/v1/policies/operational.modifyconfig${threadCount}/versions/1.0.0</stringProp>
1120 <stringProp name="HTTPSampler.method">DELETE</stringProp>
1121 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
1122 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
1123 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
1124 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
1125 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
1126 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
1127 <stringProp name="HTTPSampler.response_timeout"></stringProp>
1130 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
1131 <collectionProp name="Asserion.test_strings">
1132 <stringProp name="49586">200</stringProp>
1134 <stringProp name="Assertion.custom_message"></stringProp>
1135 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
1136 <boolProp name="Assertion.assume_success">false</boolProp>
1137 <intProp name="Assertion.test_type">1</intProp>
1138 </ResponseAssertion>
1142 <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
1143 <boolProp name="ResultCollector.error_logging">false</boolProp>
1145 <name>saveConfig</name>
1146 <value class="SampleSaveConfiguration">
1148 <latency>true</latency>
1149 <timestamp>true</timestamp>
1150 <success>true</success>
1153 <message>true</message>
1154 <threadName>true</threadName>
1155 <dataType>true</dataType>
1156 <encoding>false</encoding>
1157 <assertions>true</assertions>
1158 <subresults>true</subresults>
1159 <responseData>false</responseData>
1160 <samplerData>false</samplerData>
1162 <fieldNames>true</fieldNames>
1163 <responseHeaders>false</responseHeaders>
1164 <requestHeaders>false</requestHeaders>
1165 <responseDataOnError>false</responseDataOnError>
1166 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
1167 <assertionsResultsToSave>0</assertionsResultsToSave>
1169 <sentBytes>true</sentBytes>
1171 <threadCounts>true</threadCounts>
1172 <idleTime>true</idleTime>
1173 <connectTime>true</connectTime>
1176 <stringProp name="filename">/home/asreekumar/s3p/resultSummary.jtl</stringProp>
1179 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
1180 <boolProp name="ResultCollector.error_logging">false</boolProp>
1182 <name>saveConfig</name>
1183 <value class="SampleSaveConfiguration">
1185 <latency>true</latency>
1186 <timestamp>true</timestamp>
1187 <success>true</success>
1190 <message>true</message>
1191 <threadName>true</threadName>
1192 <dataType>true</dataType>
1193 <encoding>false</encoding>
1194 <assertions>true</assertions>
1195 <subresults>true</subresults>
1196 <responseData>false</responseData>
1197 <samplerData>false</samplerData>
1199 <fieldNames>true</fieldNames>
1200 <responseHeaders>false</responseHeaders>
1201 <requestHeaders>false</requestHeaders>
1202 <responseDataOnError>false</responseDataOnError>
1203 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
1204 <assertionsResultsToSave>0</assertionsResultsToSave>
1206 <sentBytes>true</sentBytes>
1208 <threadCounts>true</threadCounts>
1209 <idleTime>true</idleTime>
1210 <connectTime>true</connectTime>
1213 <stringProp name="filename">/home/asreekumar/s3p/resultTree.jtl</stringProp>
1216 <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
1217 <boolProp name="ResultCollector.error_logging">false</boolProp>
1219 <name>saveConfig</name>
1220 <value class="SampleSaveConfiguration">
1222 <latency>true</latency>
1223 <timestamp>true</timestamp>
1224 <success>true</success>
1227 <message>true</message>
1228 <threadName>true</threadName>
1229 <dataType>true</dataType>
1230 <encoding>false</encoding>
1231 <assertions>true</assertions>
1232 <subresults>true</subresults>
1233 <responseData>false</responseData>
1234 <samplerData>false</samplerData>
1236 <fieldNames>true</fieldNames>
1237 <responseHeaders>false</responseHeaders>
1238 <requestHeaders>false</requestHeaders>
1239 <responseDataOnError>false</responseDataOnError>
1240 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
1241 <assertionsResultsToSave>0</assertionsResultsToSave>
1243 <sentBytes>true</sentBytes>
1245 <threadCounts>true</threadCounts>
1246 <idleTime>true</idleTime>
1247 <connectTime>true</connectTime>
1250 <stringProp name="filename">/home/asreekumar/s3p/resultTable.log</stringProp>