diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2020-10-22 12:50:24 +0100 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@bell.ca> | 2020-10-22 13:12:04 +0100 |
commit | f2097279954d4fd3d1118130863a2ec1b63574e3 (patch) | |
tree | d071715c94a2a0f8db96bc8b0470d87bed71444b /testsuites/stability/src | |
parent | c83b18418818c7c20f4a7813088f2818b00a67db (diff) |
Policy-PAP S3P jmx changes
Change-Id: Ie6e57eb0a5f2174cfa934b65db8e1badaad7fe85
Issue-ID: POLICY-2830
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'testsuites/stability/src')
-rw-r--r-- | testsuites/stability/src/main/resources/testplans/stability.jmx | 543 |
1 files changed, 93 insertions, 450 deletions
diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx index 89fbb037..760f4cd8 100644 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -5,6 +5,7 @@ ================================================================================ Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 - 2020 Nordix Foundation. + Modifications Copyright (C) 2020 Bell Canada. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,7 +20,7 @@ limitations under the License. ============LICENSE_END========================================================= --> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2.1"> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.3"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy PAP Stability" enabled="true"> <stringProp name="TestPlan.comments">Policy PAP Stability Tests</stringProp> @@ -30,32 +31,22 @@ <collectionProp name="Arguments.arguments"> <elementProp name="PAP_HOST" elementType="Argument"> <stringProp name="Argument.name">PAP_HOST</stringProp> - <stringProp name="Argument.value">10.2.0.163</stringProp> + <stringProp name="Argument.value">10.2.0.29</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="PAP_PORT" elementType="Argument"> <stringProp name="Argument.name">PAP_PORT</stringProp> - <stringProp name="Argument.value">6969</stringProp> + <stringProp name="Argument.value">30679</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="API_HOST" elementType="Argument"> <stringProp name="Argument.name">API_HOST</stringProp> - <stringProp name="Argument.value">10.2.0.135</stringProp> + <stringProp name="Argument.value">10.2.0.29</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="API_PORT" elementType="Argument"> <stringProp name="Argument.name">API_PORT</stringProp> - <stringProp name="Argument.value">6969</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="DIR" elementType="Argument"> - <stringProp name="Argument.name">DIR</stringProp> - <stringProp name="Argument.value">/home/adityap/pap/testsuites/stability/src/main/resources/testplans/</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - <elementProp name="CONFIG_DIR" elementType="Argument"> - <stringProp name="Argument.name">CONFIG_DIR</stringProp> - <stringProp name="Argument.value">/home/adityap/pap/testsuites/stability/src/main/resources/simulatorsetup/</stringProp> + <stringProp name="Argument.value">30859</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> @@ -111,303 +102,6 @@ <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> </SetupThreadGroup> <hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy Type" enabled="true"> - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="HTTPArgument"> - <boolProp name="HTTPArgument.always_encode">false</boolProp> - <stringProp name="Argument.value">{
 - "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
 - "policy_types": {
 - "onap.policies.controlloop.operational.Apex": {
 - "version": "1.0.0",
 - "description": "Operational Policy for Control Loops using the APEX PDP",
 - "properties": {
 - "engine_service": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.EngineService",
 - "description": "APEX Engine Service Parameters"
 - },
 - "inputs": {
 - "type": "map",
 - "description": "Inputs for handling events coming into the APEX engine",
 - "entry_schema": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.EventHandler"
 - }
 - },
 - "outputs": {
 - "type": "map",
 - "description": "Outputs for handling events going out of the APEX engine",
 - "entry_schema": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.EventHandler"
 - }
 - },
 - "environment": {
 - "type": "list",
 - "description": "Envioronmental parameters for the APEX engine",
 - "entry_schema": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.Environment"
 - }
 - }
 - }
 - }
 - },
 - "data_types": {
 - "onap.datatypes.policies.controlloop.operational.apex.EngineService": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "name": {
 - "type": "string",
 - "description": "Specifies the engine name",
 - "required": false,
 - "default": "ApexEngineService"
 - },
 - "version": {
 - "type": "string",
 - "description": "Specifies the engine version in double dotted format",
 - "required": false,
 - "default": "1.0.0"
 - },
 - "id": {
 - "type": "integer",
 - "description": "Specifies the engine id",
 - "required": true
 - },
 - "instance_count": {
 - "type": "integer",
 - "description": "Specifies the number of engine threads that should be run",
 - "required": true
 - },
 - "deployment_port": {
 - "type": "integer",
 - "description": "Specifies the port to connect to for engine administration",
 - "required": false,
 - "default": 1
 - },
 - "policy_model_file_name": {
 - "type": "string",
 - "description": "The name of the file from which to read the APEX policy model",
 - "required": false
 - },
 - "policy_type_impl": {
 - "type": "string",
 - "description": "The policy type implementation from which to read the APEX policy model",
 - "required": false
 - },
 - "periodic_event_period": {
 - "type": "string",
 - "description": "The time interval in milliseconds for the periodic scanning event, 0 means \"don't scan\"",
 - "required": false,
 - "default": 0
 - },
 - "engine": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.engineservice.Engine",
 - "description": "The parameters for all engines in the APEX engine service",
 - "required": true
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.EventHandler": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "name": {
 - "type": "string",
 - "description": "Specifies the event handler name, if not specified this is set to the key name",
 - "required": false
 - },
 - "carrier_technology": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.CarrierTechnology",
 - "description": "Specifies the carrier technology of the event handler (such as REST/Web Socket/Kafka)",
 - "required": true
 - },
 - "event_protocol": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.EventProtocol",
 - "description": "Specifies the event protocol of events for the event handler (such as Yaml/JSON/XML/POJO)",
 - "required": true
 - },
 - "event_name": {
 - "type": "string",
 - "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",
 - "required": false
 - },
 - "event_name_filter": {
 - "type": "string",
 - "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",
 - "required": false
 - },
 - "synchronous_mode": {
 - "type": "boolean",
 - "description": "Specifies the event handler is syncronous (receive event and send response)",
 - "required": false,
 - "default": false
 - },
 - "synchronous_peer": {
 - "type": "string",
 - "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",
 - "required": false
 - },
 - "synchronous_timeout": {
 - "type": "integer",
 - "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",
 - "required": false
 - },
 - "requestor_mode": {
 - "type": "boolean",
 - "description": "Specifies the event handler is in requestor mode (send event and wait for response mode)",
 - "required": false,
 - "default": false
 - },
 - "requestor_peer": {
 - "type": "string",
 - "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",
 - "required": false
 - },
 - "requestor_timeout": {
 - "type": "integer",
 - "description": "The timeout in milliseconds for wait for responses to requests, this parameter is mandatory if the event handler is in requestor mode",
 - "required": false
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.CarrierTechnology": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "label": {
 - "type": "string",
 - "description": "The label (name) of the carrier technology (such as REST, Kafka, WebSocket)",
 - "required": true
 - },
 - "plugin_parameter_class_name": {
 - "type": "string",
 - "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",
 - "required": false
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.EventProtocol": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "label": {
 - "type": "string",
 - "description": "The label (name) of the event protocol (such as Yaml, JSON, XML, or POJO)",
 - "required": true
 - },
 - "event_protocol_plugin_class": {
 - "type": "string",
 - "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",
 - "required": false
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.Environment": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "name": {
 - "type": "string",
 - "description": "The name of the environment variable",
 - "required": true
 - },
 - "value": {
 - "type": "string",
 - "description": "The value of the environment variable",
 - "required": true
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.engineservice.Engine": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "context": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.engineservice.engine.Context",
 - "description": "The properties for handling context in APEX engines, defaults to using Java maps for context",
 - "required": false
 - },
 - "executors": {
 - "type": "map",
 - "description": "The plugins for policy executors used in engines such as javascript, MVEL, Jython",
 - "required": true,
 - "entry_schema": {
 - "description": "The plugin class path for this policy executor",
 - "type": "string"
 - }
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.engineservice.engine.Context": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "distributor": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin",
 - "description": "The plugin to be used for distributing context between APEX PDPs at runtime",
 - "required": false
 - },
 - "schemas": {
 - "type": "map",
 - "description": "The plugins for context schemas available in APEX PDPs such as Java and Avro",
 - "required": false,
 - "entry_schema": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin"
 - }
 - },
 - "locking": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin",
 - "description": "The plugin to be used for locking context in and between APEX PDPs at runtime",
 - "required": false
 - },
 - "persistence": {
 - "type": "onap.datatypes.policies.controlloop.operational.apex.Plugin",
 - "description": "The plugin to be used for persisting context for APEX PDPs at runtime",
 - "required": false
 - }
 - }
 - },
 - "onap.datatypes.policies.controlloop.operational.apex.Plugin": {
 - "derived_from": "tosca.datatypes.Root",
 - "properties": {
 - "name": {
 - "type": "string",
 - "description": "The name of the executor such as Javascript, Jython or MVEL",
 - "required": true
 - },
 - "plugin_class_name": {
 - "type": "string",
 - "description": "The class path of the plugin class for this executor"
 - }
 - }
 - }
 - }
 -}
 -</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">policy/api/v1/policytypes</stringProp> - <stringProp name="HTTPSampler.method">POST</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create Policy" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> @@ -420,7 +114,7 @@ "policies": [
 {
 "operational.apex.stabilityTestDefaultDomain": {
 - "type": "onap.policies.controlloop.operational.Apex",
 + "type": "onap.policies.controlloop.operational.common.Apex",
 "type_version": "1.0.0",
 "version": "1.0.0",
 "metadata": {
 @@ -7862,7 +7556,7 @@ <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -7896,7 +7590,7 @@ "policies": [
 {
 "operational.apex.stabilityTestSampleDomain": {
 - "type": "onap.policies.controlloop.operational.Apex",
 + "type": "onap.policies.controlloop.operational.common.Apex",
 "type_version": "1.0.0",
 "version": "1.0.0",
 "metadata": {
 @@ -15338,7 +15032,7 @@ <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies</stringProp> <stringProp name="HTTPSampler.method">POST</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -15369,7 +15063,7 @@ </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> - <boolProp name="ThreadGroup.scheduler">true</boolProp> + <boolProp name="ThreadGroup.scheduler">false</boolProp> <stringProp name="ThreadGroup.duration">600</stringProp> <stringProp name="ThreadGroup.delay"></stringProp> <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> @@ -15547,7 +15241,6 @@ if (prev.getResponseCode() == '200') { <stringProp name="filename"></stringProp> <stringProp name="cacheKey">true</stringProp> <stringProp name="script">import groovy.json.JsonSlurper; - def res = []; if (prev.getResponseCode() == '200') { def jsonSlurper = new JsonSlurper(); @@ -15620,11 +15313,11 @@ if (prev.getResponseCode() == '200') { "pdpSubgroups": [
 {
 "pdpType": "apex",
 - "desiredInstanceCount": 2,
 + "desiredInstanceCount": 1,
 "properties": {},
 "supportedPolicyTypes": [
 {
 - "name": "onap.policies.controlloop.operational.Apex",
 + "name": "onap.policies.controlloop.operational.common.Apex",
 "version": "1.0.0"
 }
 ],
 @@ -15665,30 +15358,6 @@ if (prev.getResponseCode() == '200') { </ResponseAssertion> <hashTree/> </hashTree> - <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="OS Process Sampler" enabled="true"> - <boolProp name="SystemSampler.checkReturnCode">false</boolProp> - <stringProp name="SystemSampler.expectedReturnCode">0</stringProp> - <stringProp name="SystemSampler.command">${DIR}pdp_sim_startup.sh</stringProp> - <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"> - <elementProp name="" elementType="Argument"> - <stringProp name="Argument.name"></stringProp> - <stringProp name="Argument.value">${CONFIG_DIR}</stringProp> - <stringProp name="Argument.metadata">=</stringProp> - </elementProp> - </collectionProp> - </elementProp> - <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="SystemSampler.directory">${DIR}</stringProp> - </SystemSampler> - <hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">5000</stringProp> - </ConstantTimer> - <hashTree/> - </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> @@ -15733,34 +15402,33 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.groups.size == 2; - - for(int groupSize=0;groupSize<res.groups.size;groupSize++){ - - - for(int subGrpSize=0;subGrpSize<res.groups.pdpSubgroups.size;subGrpSize++){ - def pdpSubGrp=res.groups[0].pdpSubgroups; - - for(int supportedPolicyTypesSize=0;supportedPolicyTypesSize<pdpSubGrp[subGrpSize].supportedPolicyTypes.size;supportedPolicyTypesSize++){ - - if(pdpSubGrp[subGrpSize].supportedPolicyTypes[supportedPolicyTypesSize].name =='onap.policies.controlloop.operational.Apex'){ + for(int groupSize=0;groupSize<res.groups.size;groupSize++){ - assert pdpSubGrp[subGrpSize].pdpInstances.size > 0; - if (res.groups[0].name == 'defaultGroup') - assert pdpSubGrp[subGrpSize].policies[0].name == 'operational.apex.stabilityTestDefaultDomain'; - }else if(res.groups[0].name == 'sampleGroup' ){ - assert pdpSubGrp[subGrpSize].policies.size == 0; - + for(int subGrpSize=0;subGrpSize<res.groups[groupSize].pdpSubgroups.size;subGrpSize++){ + + def pdpSubGrp=res.groups[groupSize].pdpSubgroups[subGrpSize]; + for(int supportedPolicyTypesSize=0;supportedPolicyTypesSize<pdpSubGrp.supportedPolicyTypes.size;supportedPolicyTypesSize++){ + if(pdpSubGrp.supportedPolicyTypes[supportedPolicyTypesSize].name =='onap.policies.controlloop.operational.common.Apex'){ + assert pdpSubGrp.pdpInstances.size > 0; + if (res.groups[groupSize].name == 'defaultGroup') { + assert pdpSubGrp.policies[0].name == 'operational.apex.stabilityTestDefaultDomain'; + } + else if(res.groups[groupSize].name == 'sampleGroup' ){ + assert pdpSubGrp.policies.size == 0; + } } - } } - } } </stringProp> </JSR223Assertion> <hashTree/> + <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> + <stringProp name="ConstantTimer.delay">120000</stringProp> + </ConstantTimer> + <hashTree/> </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Deployment Update sampleDomain" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> @@ -15817,10 +15485,6 @@ if (prev.getResponseCode() == '200') { </ResponseAssertion> <hashTree/> </hashTree> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">500</stringProp> - </ConstantTimer> - <hashTree/> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check PdpGroup Query" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> @@ -15865,31 +15529,76 @@ if (prev.getResponseCode() == '200') { assert res instanceof Map; assert res.groups.size == 2; - for(int groupSize=0;groupSize<res.groups.size;groupSize++){ - for(int subGrpSize=0;subGrpSize<res.groups.pdpSubgroups.size;subGrpSize++){ + for(int groupSize=0;groupSize<res.groups.size;groupSize++){ - def pdpSubGrp=res.groups[0].pdpSubgroups; - - for(int supportedPolicyTypesSize=0;supportedPolicyTypesSize<pdpSubGrp[subGrpSize].supportedPolicyTypes.size;supportedPolicyTypesSize++){ - - if(pdpSubGrp[subGrpSize].supportedPolicyTypes[supportedPolicyTypesSize].name =='onap.policies.controlloop.operational.Apex'){ + for(int subGrpSize=0;subGrpSize<res.groups[groupSize].pdpSubgroups.size;subGrpSize++){ - if (res.groups[0].name == 'defaultGroup') - assert pdpSubGrp[subGrpSize].policies[0].name == 'operational.apex.stabilityTestDefaultDomain'; - }else if(res.groups[0].name == 'sampleGroup' ){ - assert pdpSubGrp[subGrpSize].policies[0].name == 'operational.apex.stabilityTestSampleDomain'; + def pdpSubGrp=res.groups[groupSize].pdpSubgroups[subGrpSize]; + for(int supportedPolicyTypesSize=0;supportedPolicyTypesSize<pdpSubGrp.supportedPolicyTypes.size;supportedPolicyTypesSize++){ + if(pdpSubGrp.supportedPolicyTypes[supportedPolicyTypesSize].name =='onap.policies.controlloop.operational.common.Apex'){ + if (res.groups[groupSize].name == 'defaultGroup') { + assert pdpSubGrp.policies[0].name == 'operational.apex.stabilityTestDefaultDomain'; + }else if(res.groups[groupSize].name == 'sampleGroup' ){ + assert pdpSubGrp.policies[0].name == 'operational.apex.stabilityTestSampleDomain'; } - + } } } - } } </stringProp> </JSR223Assertion> <hashTree/> </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Consolidated Health" enabled="true"> + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> + <collectionProp name="Arguments.arguments"/> + </elementProp> + <stringProp name="HTTPSampler.domain">${PAP_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${PAP_PORT}</stringProp> + <stringProp name="HTTPSampler.protocol">https</stringProp> + <stringProp name="HTTPSampler.contentEncoding"></stringProp> + <stringProp name="HTTPSampler.path">/policy/pap/v1/components/healthcheck</stringProp> + <stringProp name="HTTPSampler.method">GET</stringProp> + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> + <stringProp name="HTTPSampler.connect_timeout"></stringProp> + <stringProp name="HTTPSampler.response_timeout"></stringProp> + <stringProp name="TestPlan.comments">Consolidated Health Check</stringProp> + </HTTPSamplerProxy> + <hashTree> + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> + <collectionProp name="Asserion.test_strings"> + <stringProp name="49586">200</stringProp> + </collectionProp> + <stringProp name="Assertion.custom_message"></stringProp> + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> + <boolProp name="Assertion.assume_success">false</boolProp> + <intProp name="Assertion.test_type">1</intProp> + </ResponseAssertion> + <hashTree/> + <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true"> + <stringProp name="scriptLanguage">groovy</stringProp> + <stringProp name="parameters"></stringProp> + <stringProp name="filename"></stringProp> + <stringProp name="cacheKey">true</stringProp> + <stringProp name="script">import groovy.json.JsonSlurper; + +def res = []; +if (prev.getResponseCode() == '200') { + def jsonSlurper = new JsonSlurper(); + res = jsonSlurper.parseText(prev.getResponseDataAsString()); + assert res instanceof Map; + assert res.healthy==true; +} +</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Deployed Policies" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> @@ -15938,23 +15647,6 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> - <SystemSampler guiclass="SystemSamplerGui" testclass="SystemSampler" testname="OS Process Sampler" enabled="true"> - <boolProp name="SystemSampler.checkReturnCode">false</boolProp> - <stringProp name="SystemSampler.expectedReturnCode">0</stringProp> - <stringProp name="SystemSampler.command">${DIR}pdp_sim_stop.sh</stringProp> - <elementProp name="SystemSampler.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <elementProp name="SystemSampler.environment" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="SystemSampler.directory">${DIR}</stringProp> - </SystemSampler> - <hashTree/> - <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> - <stringProp name="ConstantTimer.delay">500</stringProp> - </ConstantTimer> - <hashTree/> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Undeploy Policy sampleDomain" enabled="true"> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> @@ -16100,25 +15792,6 @@ if (prev.getResponseCode() == '200') { <intProp name="Assertion.test_type">1</intProp> </ResponseAssertion> <hashTree/> - <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="false"> - <stringProp name="scriptLanguage">groovy</stringProp> - <stringProp name="parameters"></stringProp> - <stringProp name="filename"></stringProp> - <stringProp name="cacheKey">true</stringProp> - <stringProp name="script">import groovy.json.JsonSlurper; - -def res = []; -if (prev.getResponseCode() == '200') { - def jsonSlurper = new JsonSlurper(); - res = jsonSlurper.parseText(prev.getResponseDataAsString()); - - assert res instanceof Map; - assert res.groups.size > 0; - assert res.groups[0].pdpGroupState== 'PASSIVE'; -} -</stringProp> - </JSR223Assertion> - <hashTree/> </hashTree> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Change State to PASSIVE(defaultGroup)" enabled="true"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> @@ -16254,7 +15927,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies/operational.apex.stabilityTestDefaultDomain/versions/1.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.stabilityTestDefaultDomain/versions/1.0.0</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -16284,37 +15957,7 @@ if (prev.getResponseCode() == '200') { <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">https</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0/policies/operational.apex.stabilityTestSampleDomain/versions/1.0.0</stringProp> - <stringProp name="HTTPSampler.method">DELETE</stringProp> - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> - <stringProp name="HTTPSampler.connect_timeout"></stringProp> - <stringProp name="HTTPSampler.response_timeout"></stringProp> - </HTTPSamplerProxy> - <hashTree> - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> - <collectionProp name="Asserion.test_strings"> - <stringProp name="49586">200</stringProp> - </collectionProp> - <stringProp name="Assertion.custom_message"></stringProp> - <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> - <boolProp name="Assertion.assume_success">false</boolProp> - <intProp name="Assertion.test_type">1</intProp> - </ResponseAssertion> - <hashTree/> - </hashTree> - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Delete Policy Type" enabled="true"> - <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> - <collectionProp name="Arguments.arguments"/> - </elementProp> - <stringProp name="HTTPSampler.domain">${API_HOST}</stringProp> - <stringProp name="HTTPSampler.port">${API_PORT}</stringProp> - <stringProp name="HTTPSampler.protocol">https</stringProp> - <stringProp name="HTTPSampler.contentEncoding"></stringProp> - <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.Apex/versions/1.0.0</stringProp> + <stringProp name="HTTPSampler.path">/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.stabilityTestSampleDomain/versions/1.0.0</stringProp> <stringProp name="HTTPSampler.method">DELETE</stringProp> <boolProp name="HTTPSampler.follow_redirects">true</boolProp> <boolProp name="HTTPSampler.auto_redirects">false</boolProp> @@ -16371,7 +16014,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/adityap/pap_stability/summary.log</stringProp> + <stringProp name="filename">/home/ubuntu/pap_stability/summary.log</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> @@ -16408,7 +16051,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/adityap/pap_stability/resultTable.log</stringProp> + <stringProp name="filename">/home/ubuntu/pap_stability/resultTree.log</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true"> @@ -16445,7 +16088,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/adityap/pap_stability/resultTree.log</stringProp> + <stringProp name="filename">/home/ubuntu/pap_stability/resultTable.log</stringProp> </ResultCollector> <hashTree/> </hashTree> |