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) 2019 Nordix Foundation.
8 ================================================================================
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
20 ============LICENSE_END=========================================================
22 <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935">
24 <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy PAP Stability" enabled="true">
25 <stringProp name="TestPlan.comments">Policy PAP Stability Tests</stringProp>
26 <boolProp name="TestPlan.functional_mode">false</boolProp>
27 <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
28 <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
29 <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
30 <collectionProp name="Arguments.arguments">
31 <elementProp name="PAP_HOST" elementType="Argument">
32 <stringProp name="Argument.name">PAP_HOST</stringProp>
33 <stringProp name="Argument.value">10.2.0.43</stringProp>
34 <stringProp name="Argument.metadata">=</stringProp>
36 <elementProp name="PAP_PORT" elementType="Argument">
37 <stringProp name="Argument.name">PAP_PORT</stringProp>
38 <stringProp name="Argument.value">6969</stringProp>
39 <stringProp name="Argument.metadata">=</stringProp>
41 <elementProp name="API_HOST" elementType="Argument">
42 <stringProp name="Argument.name">API_HOST</stringProp>
43 <stringProp name="Argument.value">10.2.0.41</stringProp>
44 <stringProp name="Argument.metadata">=</stringProp>
46 <elementProp name="API_PORT" elementType="Argument">
47 <stringProp name="Argument.name">API_PORT</stringProp>
48 <stringProp name="Argument.value">6969</stringProp>
49 <stringProp name="Argument.metadata">=</stringProp>
53 <stringProp name="TestPlan.user_define_classpath"></stringProp>
56 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
57 <collectionProp name="AuthManager.auth_list">
58 <elementProp name="" elementType="Authorization">
59 <stringProp name="Authorization.url">https://${PAP_HOST}:6969/policy/pap/v1</stringProp>
60 <stringProp name="Authorization.username">healthcheck</stringProp>
61 <stringProp name="Authorization.password">zb!XztG34</stringProp>
62 <stringProp name="Authorization.domain"></stringProp>
63 <stringProp name="Authorization.realm"></stringProp>
65 <elementProp name="" elementType="Authorization">
66 <stringProp name="Authorization.url">https://${API_HOST}:6969/policy/api/v1</stringProp>
67 <stringProp name="Authorization.username">healthcheck</stringProp>
68 <stringProp name="Authorization.password">zb!XztG34</stringProp>
69 <stringProp name="Authorization.domain"></stringProp>
70 <stringProp name="Authorization.realm"></stringProp>
73 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
76 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
77 <collectionProp name="HeaderManager.headers">
78 <elementProp name="" elementType="Header">
79 <stringProp name="Header.name">Accept</stringProp>
80 <stringProp name="Header.value">application/json</stringProp>
82 <elementProp name="" elementType="Header">
83 <stringProp name="Header.name">Content-Type</stringProp>
84 <stringProp name="Header.value">application/json</stringProp>
89 <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true">
90 <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>
91 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
92 <boolProp name="LoopController.continue_forever">false</boolProp>
93 <stringProp name="LoopController.loops">1</stringProp>
95 <stringProp name="ThreadGroup.num_threads">1</stringProp>
96 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
97 <boolProp name="ThreadGroup.scheduler">false</boolProp>
98 <stringProp name="ThreadGroup.duration"></stringProp>
99 <stringProp name="ThreadGroup.delay"></stringProp>
102 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type" enabled="true">
103 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
104 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
105 <collectionProp name="Arguments.arguments">
106 <elementProp name="" elementType="HTTPArgument">
107 <boolProp name="HTTPArgument.always_encode">false</boolProp>
108 <stringProp name="Argument.value">{
109 "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
110 "policy_types": [
112 "onap.policies.controlloop.operational.Apex": {
113 "version": "1.0.0",
114 "description": "Operational Policy for Control Loops using the APEX PDP",
115 "properties": {
116 "engine_service": {
117 "type": "onap.datatypes.policies.controlloop.operational.apex.EngineService",
118 "description": "APEX Engine Service Parameters"
120 "inputs": {
121 "type": "map",
122 "description": "Inputs for handling events coming into the APEX engine",
123 "entry_schema": {
124 "type": "onap.datatypes.policies.controlloop.operational.apex.EventHandler"
127 "outputs": {
128 "type": "map",
129 "description": "Outputs for handling events going out of the APEX engine",
130 "entry_schema": {
131 "type": "onap.datatypes.policies.controlloop.operational.apex.EventHandler"
134 "environment": {
135 "type": "list",
136 "description": "Envioronmental parameters for the APEX engine",
137 "entry_schema": {
138 "type": "onap.datatypes.policies.controlloop.operational.apex.Environment"
145 "data_types": [
147 "onap.datatypes.policies.controlloop.operational.apex.EngineService": {
148 "derived_from": "tosca.datatypes.Root",
149 "properties": {
150 "name": {
151 "type": "string",
152 "description": "Specifies the engine name",
153 "required": false,
154 "default": "ApexEngineService"
156 "version": {
157 "type": "string",
158 "description": "Specifies the engine version in double dotted format",
159 "required": false,
160 "default": "1.0.0"
162 "id": {
163 "type": "int",
164 "description": "Specifies the engine id",
165 "required": true
167 "instance_count": {
168 "type": "int",
169 "description": "Specifies the number of engine threads that should be run",
170 "required": true
172 "deployment_port": {
173 "type": "int",
174 "description": "Specifies the port to connect to for engine administration",
175 "required": false,
176 "default": 1
178 "policy_model_file_name": {
179 "type": "string",
180 "description": "The name of the file from which to read the APEX policy model",
181 "required": false,
182 "default": ""
184 "policy_type_impl": {
185 "type": "string",
186 "description": "The policy type implementation from which to read the APEX policy model",
187 "required": false,
188 "default": ""
190 "periodic_event_period": {
191 "type": "string",
192 "description": "The time interval in milliseconds for the periodic scanning event, 0 means \"don't scan\"",
193 "required": false,
194 "default": 0
196 "engine": {
197 "type": "onap.datatypes.policies.controlloop.operational.apex.engineservice.Engine",
198 "description": "The parameters for all engines in the APEX engine service",
199 "required": true
205 "onap.datatypes.policies.controlloop.operational.apex.EventHandler": {
206 "derived_from": "tosca.datatypes.Root",
207 "properties": {
208 "name": {
209 "type": "string",
210 "description": "Specifies the event handler name, if not specified this is set to the key name",
211 "required": false
213 "carrier_technology": {
214 "type": "onap.datatypes.policies.controlloop.operational.apex.CarrierTechnology",
215 "description": "Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)",
216 "required": true
218 "event_protocol": {
219 "type": "onap.datatypes.policies.controlloop.operational.apex.EventProtocol",
220 "description": "Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)",
221 "required": true
223 "event_name": {
224 "type": "string",
225 "description": "Specifies the event name for events on this event handler, if not specified, the event name is read from or written to the event being received or sent",
226 "required": false
228 "event_name_filter": {
229 "type": "string",
230 "description": "Specifies a filter as a regular expression, events that do not match the filter are dropped, the default is to let all events through",
231 "required": false
233 "synchronous_mode": {
234 "type": "bool",
235 "description": "Specifies the event handler is syncronous (receive event and send response)",
236 "required": false,
237 "default": false
239 "synchronous_peer": {
240 "type": "string",
241 "description": "The peer event handler (output for input or input for output) of this event handler in synchronous mode, this parameter is mandatory if the event handler is in synchronous mode",
242 "required": false,
243 "default": ""
245 "synchronous_timeout": {
246 "type": "int",
247 "description": "The timeout in milliseconds for responses to be issued by APEX torequests, this parameter is mandatory if the event handler is in synchronous mode",
248 "required": false,
249 "default": ""
251 "requestor_mode": {
252 "type": "bool",
253 "description": "Specifies the event handler is in requestor mode (send event and wait for response mode)",
254 "required": false,
255 "default": false
257 "requestor_peer": {
258 "type": "string",
259 "description": "The peer event handler (output for input or input for output) of this event handler in requestor mode, this parameter is mandatory if the event handler is in requestor mode",
260 "required": false,
261 "default": ""
263 "requestor_timeout": {
264 "type": "int",
265 "description": "The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode",
266 "required": false,
267 "default": ""
273 "onap.datatypes.policies.controlloop.operational.apex.CarrierTechnology": {
274 "derived_from": "tosca.datatypes.Root",
275 "properties": {
276 "label": {
277 "type": "string",
278 "description": "The label (name) of the carrier technology (such as REST, Kafka, WebSocket)",
279 "required": true
281 "plugin_parameter_class_name": {
282 "type": "string",
283 "description": "The class name of the class that overrides default handling of event input or output for this carrier technology, defaults to the supplied input or output class",
284 "required": false
290 "onap.datatypes.policies.controlloop.operational.apex.EventProtocol": {
291 "derived_from": "tosca.datatypes.Root",
292 "properties": {
293 "label": {
294 "type": "string",
295 "description": "The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)",
296 "required": true
298 "event_protocol_plugin_class": {
299 "type": "string",
300 "description": "The class name of the class that overrides default handling of the event protocol for this carrier technology, defaults to the supplied event protocol class",
301 "required": false
307 "onap.datatypes.policies.controlloop.operational.apex.Environmental": {
308 "derived_from": "tosca.datatypes.Root",
309 "properties": {
310 "name": {
311 "type": "string",
312 "description": "The name of the environment variable",
313 "required": true
315 "value": {
316 "type": "string",
317 "description": "The value of the environment variable",
318 "required": true
324 "onap.datatypes.policies.controlloop.operational.apex.engineservice.Engine": {
325 "derived_from": "tosca.datatypes.Root",
326 "properties": {
327 "context": {
328 "type": "onap.datatypes.policies.controlloop.operational.apex.engineservice.engine.Context",
329 "description": "The properties for handling context in APEX engines, defaults to using Java maps for context",
330 "required": false
332 "executors": {
333 "type": "map",
334 "description": "The plugins for policy executors used in engines such as javascript, MVEL, Jython",
335 "required": true,
336 "entry_schema": {
337 "description": "The plugin class path for this policy executor",
338 "type": "string"
345 "onap.datatypes.policies.controlloop.operational.apex.engineservice.engine.Context": {
346 "derived_from": "tosca.datatypes.Root",
347 "properties": {
348 "distributor": {
349 "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin",
350 "description": "The plugin to be used for distributing context between APEX PDPs at runtime",
351 "required": false
353 "schemas": {
354 "type": "map",
355 "description": "The plugins for context schemas available in APEX PDPs such as Java and Avro",
356 "required": false,
357 "entry_schema": {
358 "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin"
361 "locking": {
362 "type": "onap.datatypes.policies.controlloop.operational.apex.plugin",
363 "description": "The plugin to be used for locking context in and between APEX PDPs at runtime",
364 "required": false
366 "persistence": {
367 "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin",
368 "description": "The plugin to be used for persisting context for APEX PDPs at runtime",
369 "required": false
375 "onap.datatypes.policies.controlloop.operational.apex.Plugin": {
376 "derived_from": "tosca.datatypes.Root",
377 "properties": {
378 "name": {
379 "type": "string",
380 "description": "The name of the executor such as Javascript, Jython or MVEL",
381 "required": true
383 "plugin_class_name": {
384 "type": "string",
385 "description": "The class path of the plugin class for this executor"
392 <stringProp name="Argument.metadata">=</stringProp>
396 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
397 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
398 <stringProp name="HTTPSampler.protocol">https</stringProp>
399 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
400 <stringProp name="HTTPSampler.path">policy/api/v1/policytypes</stringProp>
401 <stringProp name="HTTPSampler.method">POST</stringProp>
402 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
403 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
404 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
405 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
406 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
407 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
408 <stringProp name="HTTPSampler.response_timeout"></stringProp>
411 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
412 <collectionProp name="Asserion.test_strings">
413 <stringProp name="49586">200</stringProp>
415 <stringProp name="Assertion.custom_message"></stringProp>
416 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
417 <boolProp name="Assertion.assume_success">false</boolProp>
418 <intProp name="Assertion.test_type">1</intProp>
422 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy" enabled="true">
423 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
424 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
425 <collectionProp name="Arguments.arguments">
426 <elementProp name="" elementType="HTTPArgument">
427 <boolProp name="HTTPArgument.always_encode">false</boolProp>
428 <stringProp name="Argument.value">{
429 "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
430 "topology_template": {
431 "policies": [
433 "operational.apex.sampledomain": {
434 "type": "onap.policies.controlloop.operational.Apex",
435 "typeVersion": "1.0.0",
436 "name": "onap.policies.controlloop.operational.apex.Sampledomain",
437 "version": "1.0.0",
438 "properties": {
439 "content": {
440 "engineServiceParameters": {
441 "name": "MyApexEngine",
442 "version": "0.0.1",
443 "id": 45,
444 "instanceCount": 4,
445 "deploymentPort": 12561,
446 "policy_type_impl": {
447 "policy_impl": "There will be an actual policy impl in production"
449 "engineParameters": {
450 "executorParameters": {
451 "JAVASCRIPT": {
452 "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
457 "eventInputParameters": {
458 "FirstConsumer": {
459 "carrierTechnologyParameters": {
460 "carrierTechnology": "RESTSERVER",
461 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters",
462 "parameters": {
463 "standalone": true,
464 "host": "0.0.0.0",
465 "port": 23324
468 "eventProtocolParameters": {
469 "eventProtocol": "JSON"
471 "synchronousMode": true,
472 "synchronousPeer": "FirstProducer",
473 "synchronousTimeout": 2000
476 "eventOutputParameters": {
477 "FirstProducer": {
478 "carrierTechnologyParameters": {
479 "carrierTechnology": "RESTSERVER",
480 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restserver.RestServerCarrierTechnologyParameters"
482 "eventProtocolParameters": {
483 "eventProtocol": "JSON"
485 "synchronousMode": true,
486 "synchronousPeer": "FirstConsumer",
487 "synchronousTimeout": 2000
497 <stringProp name="Argument.metadata">=</stringProp>
501 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
502 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
503 <stringProp name="HTTPSampler.protocol">https</stringProp>
504 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
505 <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies</stringProp>
506 <stringProp name="HTTPSampler.method">POST</stringProp>
507 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
508 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
509 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
510 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
511 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
512 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
513 <stringProp name="HTTPSampler.response_timeout"></stringProp>
516 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
517 <collectionProp name="Asserion.test_strings">
518 <stringProp name="49586">200</stringProp>
520 <stringProp name="Assertion.custom_message"></stringProp>
521 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
522 <boolProp name="Assertion.assume_success">false</boolProp>
523 <intProp name="Assertion.test_type">1</intProp>
528 <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="PAP Test Flow" enabled="true">
529 <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>
530 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
531 <boolProp name="LoopController.continue_forever">false</boolProp>
532 <stringProp name="LoopController.loops">1</stringProp>
534 <stringProp name="ThreadGroup.num_threads">1</stringProp>
535 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
536 <boolProp name="ThreadGroup.scheduler">false</boolProp>
537 <stringProp name="ThreadGroup.duration"></stringProp>
538 <stringProp name="ThreadGroup.delay"></stringProp>
541 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Health" enabled="true">
542 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
543 <collectionProp name="Arguments.arguments"/>
545 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
546 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
547 <stringProp name="HTTPSampler.protocol">https</stringProp>
548 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
549 <stringProp name="HTTPSampler.path">/policy/pap/v1/healthcheck</stringProp>
550 <stringProp name="HTTPSampler.method">GET</stringProp>
551 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
552 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
553 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
554 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
555 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
556 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
557 <stringProp name="HTTPSampler.response_timeout"></stringProp>
558 <stringProp name="TestPlan.comments">Basic Health Check</stringProp>
561 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
562 <collectionProp name="Asserion.test_strings">
563 <stringProp name="49586">200</stringProp>
565 <stringProp name="Assertion.custom_message"></stringProp>
566 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
567 <boolProp name="Assertion.assume_success">false</boolProp>
568 <intProp name="Assertion.test_type">1</intProp>
571 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
572 <stringProp name="scriptLanguage">groovy</stringProp>
573 <stringProp name="parameters"></stringProp>
574 <stringProp name="filename"></stringProp>
575 <stringProp name="cacheKey">true</stringProp>
576 <stringProp name="script">import groovy.json.JsonSlurper;
579 if (prev.getResponseCode() == '200') {
580 def jsonSlurper = new JsonSlurper();
581 res = jsonSlurper.parseText(prev.getResponseDataAsString());
583 assert res instanceof Map;
584 assert res.code == 200;
585 assert res.name == "Policy PAP";
586 assert res.healthy==true;
587 assert res.message=="alive";
593 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Statistics" enabled="true">
594 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
595 <collectionProp name="Arguments.arguments"/>
597 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
598 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
599 <stringProp name="HTTPSampler.protocol">https</stringProp>
600 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
601 <stringProp name="HTTPSampler.path">policy/pap/v1/statistics</stringProp>
602 <stringProp name="HTTPSampler.method">GET</stringProp>
603 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
604 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
605 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
606 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
607 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
608 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
609 <stringProp name="HTTPSampler.response_timeout"></stringProp>
610 <stringProp name="TestPlan.comments">Check Statistics</stringProp>
613 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
614 <collectionProp name="Asserion.test_strings">
615 <stringProp name="49586">200</stringProp>
617 <stringProp name="Assertion.custom_message"></stringProp>
618 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
619 <boolProp name="Assertion.assume_success">false</boolProp>
620 <intProp name="Assertion.test_type">1</intProp>
623 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
624 <stringProp name="scriptLanguage">groovy</stringProp>
625 <stringProp name="parameters"></stringProp>
626 <stringProp name="filename"></stringProp>
627 <stringProp name="cacheKey">true</stringProp>
628 <stringProp name="script">import groovy.json.JsonSlurper;
631 if (prev.getResponseCode() == '200') {
632 def jsonSlurper = new JsonSlurper();
633 res = jsonSlurper.parseText(prev.getResponseDataAsString());
635 assert res instanceof Map;
636 assert res.code == 200;
637 assert res.totalPdpCount == 0;
638 assert res.totalPdpGroupCount==0;
639 assert res.totalPolicyDeployCount==0;
640 assert res.policyDeploySuccessCount==0;
647 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change State to ACTIVE" enabled="true">
648 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
649 <collectionProp name="Arguments.arguments"/>
651 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
652 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
653 <stringProp name="HTTPSampler.protocol">https</stringProp>
654 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
655 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/groups/defaultGroup?state=ACTIVE</stringProp>
656 <stringProp name="HTTPSampler.method">PUT</stringProp>
657 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
658 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
659 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
660 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
661 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
662 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
663 <stringProp name="HTTPSampler.response_timeout"></stringProp>
666 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
667 <collectionProp name="Asserion.test_strings">
668 <stringProp name="49586">200</stringProp>
670 <stringProp name="Assertion.custom_message"></stringProp>
671 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
672 <boolProp name="Assertion.assume_success">false</boolProp>
673 <intProp name="Assertion.test_type">1</intProp>
677 <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
678 <stringProp name="ConstantTimer.delay">200</stringProp>
681 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true">
682 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
683 <collectionProp name="Arguments.arguments"/>
685 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
686 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
687 <stringProp name="HTTPSampler.protocol">https</stringProp>
688 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
689 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp>
690 <stringProp name="HTTPSampler.method">GET</stringProp>
691 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
692 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
693 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
694 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
695 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
696 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
697 <stringProp name="HTTPSampler.response_timeout"></stringProp>
698 <stringProp name="TestPlan.comments">Check PdpGroup Query</stringProp>
701 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
702 <collectionProp name="Asserion.test_strings">
703 <stringProp name="49586">200</stringProp>
705 <stringProp name="Assertion.custom_message"></stringProp>
706 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
707 <boolProp name="Assertion.assume_success">false</boolProp>
708 <intProp name="Assertion.test_type">1</intProp>
711 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
712 <stringProp name="scriptLanguage">groovy</stringProp>
713 <stringProp name="parameters"></stringProp>
714 <stringProp name="filename"></stringProp>
715 <stringProp name="cacheKey">true</stringProp>
716 <stringProp name="script">import groovy.json.JsonSlurper;
719 if (prev.getResponseCode() == '200') {
720 def jsonSlurper = new JsonSlurper();
721 res = jsonSlurper.parseText(prev.getResponseDataAsString());
723 assert res instanceof Map;
724 assert res.groups.size > 0;
725 assert res.groups[0].pdpGroupState== 'ACTIVE';
731 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Deploy Policy" enabled="true">
732 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
733 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
734 <collectionProp name="Arguments.arguments">
735 <elementProp name="" elementType="HTTPArgument">
736 <boolProp name="HTTPArgument.always_encode">false</boolProp>
737 <stringProp name="Argument.value">{
738 "policies" : [
740 "policy-id": "onap.policies.controlloop.operational.apex.Sampledomain",
741 "policy-version": 1
745 <stringProp name="Argument.metadata">=</stringProp>
749 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
750 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
751 <stringProp name="HTTPSampler.protocol">https</stringProp>
752 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
753 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/policies</stringProp>
754 <stringProp name="HTTPSampler.method">POST</stringProp>
755 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
756 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
757 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
758 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
759 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
760 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
761 <stringProp name="HTTPSampler.response_timeout"></stringProp>
764 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
765 <collectionProp name="Asserion.test_strings">
766 <stringProp name="49586">200</stringProp>
768 <stringProp name="Assertion.custom_message"></stringProp>
769 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
770 <boolProp name="Assertion.assume_success">false</boolProp>
771 <intProp name="Assertion.test_type">1</intProp>
775 <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
776 <stringProp name="ConstantTimer.delay">500</stringProp>
779 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy Policy" enabled="true">
780 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
781 <collectionProp name="Arguments.arguments"/>
783 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
784 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
785 <stringProp name="HTTPSampler.protocol">https</stringProp>
786 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
787 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/policies/onap.policies.controlloop.operational.apex.Sampledomain</stringProp>
788 <stringProp name="HTTPSampler.method">DELETE</stringProp>
789 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
790 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
791 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
792 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
793 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
794 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
795 <stringProp name="HTTPSampler.response_timeout"></stringProp>
798 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
799 <collectionProp name="Asserion.test_strings">
800 <stringProp name="49586">200</stringProp>
802 <stringProp name="Assertion.custom_message"></stringProp>
803 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
804 <boolProp name="Assertion.assume_success">false</boolProp>
805 <intProp name="Assertion.test_type">1</intProp>
809 <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
810 <stringProp name="ConstantTimer.delay">500</stringProp>
813 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change State to PASSIVE" enabled="true">
814 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
815 <collectionProp name="Arguments.arguments"/>
817 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
818 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
819 <stringProp name="HTTPSampler.protocol">https</stringProp>
820 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
821 <stringProp name="HTTPSampler.path">policy/pap/v1/pdps/groups/defaultGroup?state=PASSIVE</stringProp>
822 <stringProp name="HTTPSampler.method">PUT</stringProp>
823 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
824 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
825 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
826 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
827 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
828 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
829 <stringProp name="HTTPSampler.response_timeout"></stringProp>
832 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
833 <collectionProp name="Asserion.test_strings">
834 <stringProp name="49586">200</stringProp>
836 <stringProp name="Assertion.custom_message"></stringProp>
837 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
838 <boolProp name="Assertion.assume_success">false</boolProp>
839 <intProp name="Assertion.test_type">1</intProp>
843 <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
844 <stringProp name="ConstantTimer.delay">200</stringProp>
847 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true">
848 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
849 <collectionProp name="Arguments.arguments"/>
851 <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp>
852 <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp>
853 <stringProp name="HTTPSampler.protocol">https</stringProp>
854 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
855 <stringProp name="HTTPSampler.path">/policy/pap/v1/pdps</stringProp>
856 <stringProp name="HTTPSampler.method">GET</stringProp>
857 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
858 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
859 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
860 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
861 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
862 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
863 <stringProp name="HTTPSampler.response_timeout"></stringProp>
864 <stringProp name="TestPlan.comments">Check PdpGroup Query</stringProp>
867 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
868 <collectionProp name="Asserion.test_strings">
869 <stringProp name="49586">200</stringProp>
871 <stringProp name="Assertion.custom_message"></stringProp>
872 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
873 <boolProp name="Assertion.assume_success">false</boolProp>
874 <intProp name="Assertion.test_type">1</intProp>
877 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
878 <stringProp name="scriptLanguage">groovy</stringProp>
879 <stringProp name="parameters"></stringProp>
880 <stringProp name="filename"></stringProp>
881 <stringProp name="cacheKey">true</stringProp>
882 <stringProp name="script">import groovy.json.JsonSlurper;
885 if (prev.getResponseCode() == '200') {
886 def jsonSlurper = new JsonSlurper();
887 res = jsonSlurper.parseText(prev.getResponseDataAsString());
889 assert res instanceof Map;
890 assert res.groups.size > 0;
891 assert res.groups[0].pdpGroupState== 'PASSIVE';
898 <PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true">
899 <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp>
900 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
901 <boolProp name="LoopController.continue_forever">false</boolProp>
902 <stringProp name="LoopController.loops">1</stringProp>
904 <stringProp name="ThreadGroup.num_threads">1</stringProp>
905 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
906 <boolProp name="ThreadGroup.scheduler">false</boolProp>
907 <stringProp name="ThreadGroup.duration"></stringProp>
908 <stringProp name="ThreadGroup.delay"></stringProp>
911 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy" enabled="true">
912 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
913 <collectionProp name="Arguments.arguments"/>
915 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
916 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
917 <stringProp name="HTTPSampler.protocol">https</stringProp>
918 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
919 <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies/onap.policies.controlloop.operational.apex.Sampledomain/versions/1.0.0</stringProp>
920 <stringProp name="HTTPSampler.method">DELETE</stringProp>
921 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
922 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
923 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
924 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
925 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
926 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
927 <stringProp name="HTTPSampler.response_timeout"></stringProp>
930 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
931 <collectionProp name="Asserion.test_strings">
932 <stringProp name="49586">200</stringProp>
934 <stringProp name="Assertion.custom_message"></stringProp>
935 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
936 <boolProp name="Assertion.assume_success">false</boolProp>
937 <intProp name="Assertion.test_type">1</intProp>
941 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type" enabled="true">
942 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
943 <collectionProp name="Arguments.arguments"/>
945 <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp>
946 <stringProp name="HTTPSampler.port">${API_PORT}</stringProp>
947 <stringProp name="HTTPSampler.protocol">https</stringProp>
948 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
949 <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0</stringProp>
950 <stringProp name="HTTPSampler.method">DELETE</stringProp>
951 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
952 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
953 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
954 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
955 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
956 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
957 <stringProp name="HTTPSampler.response_timeout"></stringProp>
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>
972 <ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report" enabled="true">
973 <boolProp name="ResultCollector.error_logging">false</boolProp>
975 <name>saveConfig</name>
976 <value class="SampleSaveConfiguration">
978 <latency>true</latency>
979 <timestamp>true</timestamp>
980 <success>true</success>
983 <message>true</message>
984 <threadName>true</threadName>
985 <dataType>true</dataType>
986 <encoding>false</encoding>
987 <assertions>true</assertions>
988 <subresults>true</subresults>
989 <responseData>false</responseData>
990 <samplerData>false</samplerData>
992 <fieldNames>true</fieldNames>
993 <responseHeaders>false</responseHeaders>
994 <requestHeaders>false</requestHeaders>
995 <responseDataOnError>false</responseDataOnError>
996 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
997 <assertionsResultsToSave>0</assertionsResultsToSave>
999 <sentBytes>true</sentBytes>
1001 <threadCounts>true</threadCounts>
1002 <idleTime>true</idleTime>
1003 <connectTime>true</connectTime>
1006 <stringProp name="filename">C:\Users\eramkve\Desktop\stability.log</stringProp>
1009 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
1010 <boolProp name="ResultCollector.error_logging">false</boolProp>
1012 <name>saveConfig</name>
1013 <value class="SampleSaveConfiguration">
1015 <latency>true</latency>
1016 <timestamp>true</timestamp>
1017 <success>true</success>
1020 <message>true</message>
1021 <threadName>true</threadName>
1022 <dataType>true</dataType>
1023 <encoding>false</encoding>
1024 <assertions>true</assertions>
1025 <subresults>true</subresults>
1026 <responseData>false</responseData>
1027 <samplerData>false</samplerData>
1029 <fieldNames>true</fieldNames>
1030 <responseHeaders>false</responseHeaders>
1031 <requestHeaders>false</requestHeaders>
1032 <responseDataOnError>false</responseDataOnError>
1033 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
1034 <assertionsResultsToSave>0</assertionsResultsToSave>
1036 <sentBytes>true</sentBytes>
1038 <threadCounts>true</threadCounts>
1039 <idleTime>true</idleTime>
1040 <connectTime>true</connectTime>
1043 <stringProp name="filename">C:\Users\eramkve\Desktop\stability.log</stringProp>
1046 <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
1047 <boolProp name="ResultCollector.error_logging">false</boolProp>
1049 <name>saveConfig</name>
1050 <value class="SampleSaveConfiguration">
1052 <latency>true</latency>
1053 <timestamp>true</timestamp>
1054 <success>true</success>
1057 <message>true</message>
1058 <threadName>true</threadName>
1059 <dataType>true</dataType>
1060 <encoding>false</encoding>
1061 <assertions>true</assertions>
1062 <subresults>true</subresults>
1063 <responseData>false</responseData>
1064 <samplerData>false</samplerData>
1066 <fieldNames>true</fieldNames>
1067 <responseHeaders>false</responseHeaders>
1068 <requestHeaders>false</requestHeaders>
1069 <responseDataOnError>false</responseDataOnError>
1070 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
1071 <assertionsResultsToSave>0</assertionsResultsToSave>
1073 <sentBytes>true</sentBytes>
1075 <threadCounts>true</threadCounts>
1076 <idleTime>true</idleTime>
1077 <connectTime>true</connectTime>
1080 <stringProp name="filename">C:\Users\eramkve\Desktop\stability.log</stringProp>