diff options
author | Chenfei Gao <cgao@research.att.com> | 2019-10-24 21:26:02 -0400 |
---|---|---|
committer | Chenfei Gao <cgao@research.att.com> | 2019-10-24 21:26:10 -0400 |
commit | cf819e2e193c4678e8693e1b0b4486fb58876139 (patch) | |
tree | fda66c0e3664bcdda6ebbcf350b76950cc314c1c /testsuites/performance | |
parent | dbf35255904b88111ef4ade980d2f7f851ca4ea0 (diff) |
Update S3P for new API endpoint
Issue-ID: POLICY-2185
Change-Id: I2d6e29ab6615734abcb1b16336bc5d6afa9937f1
Signed-off-by: Chenfei Gao <cgao@research.att.com>
Diffstat (limited to 'testsuites/performance')
-rw-r--r-- | testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx | 546 |
1 files changed, 546 insertions, 0 deletions
diff --git a/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx b/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx index 75ff488c..7044bb78 100644 --- a/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx +++ b/testsuites/performance/src/main/resources/testplans/policy_api_performance.jmx @@ -5193,6 +5193,552 @@ if (prev.getResponseCode() == '200') { </JSR223Assertion> <hashTree/> </hashTree> + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Simple Create TCA Policies" 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_0_0",
 + "topology_template": {
 + "policies": [
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "1.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "2.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "3.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "4.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "5.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "6.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "7.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "8.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "9.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "10.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + },
 + {
 + "onap.restart.tca": {
 + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
 + "version": "11.0.0",
 + "type_version": "2.0.0",
 + "metadata": {
 + "policy-id": "onap.restart.tca"
 + },
 + "properties": {
 + "tca_policy": {
 + "domain": "measurementsForVfScaling",
 + "metricsPerEventName": [
 + {
 + "eventName": "Measurement_vGMUX",
 + "controlLoopSchemaType": "VNF",
 + "policyScope": "DCAE",
 + "policyName": "DCAE.Config_tca-hi-lo",
 + "policyVersion": "v0.0.1",
 + "thresholds": [
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "EQUAL",
 + "severity": "MAJOR",
 + "closedLoopEventStatus": "ABATED"
 + },
 + {
 + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
 + "version": "1.0.2",
 + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
 + "thresholdValue": 0,
 + "direction": "GREATER",
 + "severity": "CRITICAL",
 + "closedLoopEventStatus": "ONSET"
 + }
 + ]
 + }
 + ]
 + }
 + }
 + }
 + }
 + ]
 + }
 +}</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/policies</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/> + <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.topology_template.policies instanceof List; + assert res.topology_template.policies.size == 11; + assert res.topology_template.policies[0] instanceof Map; +}</stringProp> + </JSR223Assertion> + <hashTree/> + </hashTree> <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> <stringProp name="ConstantTimer.delay">10000</stringProp> </ConstantTimer> |