diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2022-04-27 18:45:57 +0100 |
---|---|---|
committer | Liam Fallon <liam.fallon@est.tech> | 2022-05-04 08:21:13 +0000 |
commit | 6be0d55c23de2c4f245fce0ae710cfdf24cd1660 (patch) | |
tree | f0920874ed7e8b8aa9217059b23e0059444b70f6 /testsuites/performance | |
parent | 57fbf692d7affd2d93ed7f0d0d782cdfe7cc4cf2 (diff) |
APEX-PDP S3P changes for Jakarta
Update credentials for healthcheck/policyadmin
Use JMeter user defined variables in policies for SIM_HOST,
DMAAP_PORT and CDS_PORT
Issue-ID: POLICY-4010
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I4f44b4721c24b70ef5dac24b8300350a2e34ed5f
Diffstat (limited to 'testsuites/performance')
-rw-r--r-- | testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx | 79 |
1 files changed, 49 insertions, 30 deletions
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx b/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx index 21f7401ea..8c64ff9b7 100644 --- a/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx +++ b/testsuites/performance/performance-benchmark-test/src/main/resources/apexPdpPerformanceTestPlan.jmx @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1"> +<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="APEX PDP STABILITY TEST PLAN" enabled="true"> <stringProp name="TestPlan.comments"></stringProp> @@ -59,17 +59,17 @@ </elementProp> <elementProp name="PAP_PORT" elementType="Argument"> <stringProp name="Argument.name">PAP_PORT</stringProp> - <stringProp name="Argument.value">${__P(PAP_PORT,31262)}</stringProp> + <stringProp name="Argument.value">${__P(PAP_PORT,30442)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="API_PORT" elementType="Argument"> <stringProp name="Argument.name">API_PORT</stringProp> - <stringProp name="Argument.value">${__P(API_PORT,30421)}</stringProp> + <stringProp name="Argument.value">${__P(API_PORT,30240)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="APEX_PORT" elementType="Argument"> <stringProp name="Argument.name">APEX_PORT</stringProp> - <stringProp name="Argument.value">${__P(APEX_PORT,31151)}</stringProp> + <stringProp name="Argument.value">${__P(APEX_PORT,30237)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="DMAAP_PORT" elementType="Argument"> @@ -77,19 +77,24 @@ <stringProp name="Argument.value">${__P(DMAAP_PORT,31054)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> + <elementProp name="CDS_PORT" elementType="Argument"> + <stringProp name="Argument.name">CDS_PORT</stringProp> + <stringProp name="Argument.value">${__P(CDS_PORT,6680)}</stringProp> + <stringProp name="Argument.metadata">=</stringProp> + </elementProp> <elementProp name="HOSTNAME" elementType="Argument"> <stringProp name="Argument.name">HOSTNAME</stringProp> - <stringProp name="Argument.value">${__P(HOSTNAME,172.16.2.18)}</stringProp> + <stringProp name="Argument.value">${__P(HOSTNAME,172.16.1.39)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="LOG_PATH" elementType="Argument"> <stringProp name="Argument.name">LOG_PATH</stringProp> - <stringProp name="Argument.value">${__P(LOG_PATH,/home/asreekumar/jmeter_results/apex_perf)}</stringProp> + <stringProp name="Argument.value">${__P(LOG_PATH,/home/dhanrahan/jmeter_results/apex_perf)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> <elementProp name="SIM_HOST" elementType="Argument"> <stringProp name="Argument.name">SIM_HOST</stringProp> - <stringProp name="Argument.value">${__P(SIM_HOST,172.16.2.18)}</stringProp> + <stringProp name="Argument.value">${__P(SIM_HOST,172.16.2.220)}</stringProp> <stringProp name="Argument.metadata">=</stringProp> </elementProp> </collectionProp> @@ -99,25 +104,39 @@ <collectionProp name="AuthManager.auth_list"> <elementProp name="" elementType="Authorization"> <stringProp name="Authorization.url">https://${HOSTNAME}:${API_PORT}</stringProp> - <stringProp name="Authorization.username">healthcheck</stringProp> + <stringProp name="Authorization.username">policyadmin</stringProp> <stringProp name="Authorization.password">zb!XztG34</stringProp> <stringProp name="Authorization.domain"></stringProp> <stringProp name="Authorization.realm"></stringProp> </elementProp> <elementProp name="" elementType="Authorization"> <stringProp name="Authorization.url">https://${HOSTNAME}:${PAP_PORT}</stringProp> + <stringProp name="Authorization.username">policyadmin</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> + </elementProp> + <elementProp name="" elementType="Authorization"> + <stringProp name="Authorization.url">https://${HOSTNAME}:${APEX_PORT}/policy/apex-pdp/v1/healthcheck</stringProp> <stringProp name="Authorization.username">healthcheck</stringProp> <stringProp name="Authorization.password">zb!XztG34</stringProp> <stringProp name="Authorization.domain"></stringProp> <stringProp name="Authorization.realm"></stringProp> </elementProp> <elementProp name="" elementType="Authorization"> - <stringProp name="Authorization.url">https://${HOSTNAME}:${APEX_PORT}</stringProp> + <stringProp name="Authorization.url">https://${HOSTNAME}:${APEX_PORT}/metrics</stringProp> <stringProp name="Authorization.username">healthcheck</stringProp> <stringProp name="Authorization.password">zb!XztG34</stringProp> <stringProp name="Authorization.domain"></stringProp> <stringProp name="Authorization.realm"></stringProp> </elementProp> + <elementProp name="" elementType="Authorization"> + <stringProp name="Authorization.url">https://${HOSTNAME}:${APEX_PORT}</stringProp> + <stringProp name="Authorization.username">policyadmin</stringProp> + <stringProp name="Authorization.password">zb!XztG34</stringProp> + <stringProp name="Authorization.domain"></stringProp> + <stringProp name="Authorization.realm"></stringProp> + </elementProp> </collectionProp> <boolProp name="AuthManager.controlledByThreadGroup">false</boolProp> </AuthManager> @@ -176,7 +195,7 @@ "taskParameters": [
 {
 "key": "logUrl",
 - "value": "http://172.16.2.18:31054/events/APEX-CL-MGT"
 + "value": "http://${SIM_HOST}:${DMAAP_PORT}/events/APEX-CL-MGT"
 }
 ]
 },
 @@ -1656,7 +1675,7 @@ "taskLogic": {
 "key": "TaskLogic",
 "logicFlavour": "JAVASCRIPT",
 - "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nerrorMessage = errorMessage.replace(/\"/g, '\\\\\\\"')\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}"
 + "logic": "var uuidType = java.util.UUID;\nvar longType = java.lang.Long;\nvar HashMapType = java.util.HashMap;\n\nvar albumID = executor.getExecutionProperties().getProperty(\"albumId\");\n\nvar eventDetailsAlbum = executor.getContextAlbum(\"ApexExample_EventDetailsAlbum\").get(albumID.toString());\nvar commonEventHeader = eventDetailsAlbum.get(\"commonEventHeader\");\nvar timestamp = longType(new Date().getTime())\nvar errorMessage = \"CDS operation failed. Error message from CDS - \" + executor.inFields.get(\"status\").get(\"errorMessage\");\nerrorMessage = errorMessage.replace(/\"/g, '\\\\\\\\\\\\\"')\nsend(commonEventHeader.get(\"eventId\"), \"VNF\", commonEventHeader.get(\"sourceId\"), timestamp, \"FINAL_FAILURE\", \"Failed to process VES event. Reason: \" + errorMessage);\ntrue;\n\nfunction send(id, targetType, targetId, timestamp, status, message) {\n var logData = '{'\n +'\"id\" : \"' + id + '\",'\n +'\"target\" : {'\n +'\"targetType\" : \"' + targetType + '\",'\n +'\"entityInfo\" : {'\n +'\"id\" : \"' + targetId + '\"'\n +'}'\n +'},'\n +'\"component\" : {'\n +'\"name\" : \"Policy\",'\n +'\"flavour\" : \"Apex-PDP\",'\n +'\"timestamp\" : ' + timestamp + ','\n +'\"status\" : \"' + status + '\",'\n +'\"message\" : \"' + message + '\",'\n +'\"artifacts\" : {'\n +'\"policyName\" : \"onap.policies.apex.Example\",'\n +'\"policyVersion\" : \"1.0.0\"'\n +'}'\n +'},'\n +'\"otherFields\" : {'\n +'\"useCaseName\" : \"apex-pdp-policy-example\"'\n +'}'\n +'}';\n\n executor.logger.info(\"sending the status to log.\");\n fireLogEvent(logData);\n}\n\nfunction fireLogEvent(logEvent){\n var headers = new HashMapType();\n executor.logger.info(\"LogEvent:\"+logEvent);\n var response = new org.onap.policy.rest.RestManager().post(\n executor.getParameters().get(\"logUrl\"),\n \"\",\n \"\",\n headers,\n \"application/json\",\n logEvent\n );\n executor.logger.info(\"DMaaP Response after sending LogEvent: \" + response);\n return response;\n}"
 }
 }
 },
 @@ -3193,7 +3212,7 @@ "carrierTechnology": "RESTCLIENT",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 "parameters": {
 - "url": "http://172.16.2.18:31054/events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT/ApexExampleCG1/1?timeout=30000"
 + "url": "http://${SIM_HOST}:${DMAAP_PORT}/events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT/ApexExampleCG1/1?timeout=30000"
 }
 },
 "eventProtocolParameters": {
 @@ -3287,8 +3306,8 @@ "carrierTechnology": "GRPC",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
 "parameters": {
 - "host": "policy-models-simulator",
 - "port": 6680,
 + "host": "${SIM_HOST}",
 + "port": ${CDS_PORT},
 "username": "ccsdkapps",
 "password": "ccsdkapps",
 "timeout": 10
 @@ -3307,8 +3326,8 @@ "carrierTechnology": "GRPC",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
 "parameters": {
 - "host": "policy-models-simulator",
 - "port": 6680,
 + "host": "${SIM_HOST}",
 + "port": ${CDS_PORT},
 "username": "ccsdkapps",
 "password": "ccsdkapps",
 "timeout": 10
 @@ -6141,7 +6160,7 @@ "carrierTechnology": "RESTCLIENT",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 "parameters": {
 - "url": "http://172.16.2.18:31054/events/unauthenticated.DCAE_CL_OUTPUT/cl/apex?timeout=30000"
 + "url": "http://${SIM_HOST}:${DMAAP_PORT}/events/unauthenticated.DCAE_CL_OUTPUT/cl/apex?timeout=30000"
 }
 },
 "eventProtocolParameters": {
 @@ -6222,8 +6241,8 @@ "carrierTechnology": "GRPC",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.grpc.GrpcCarrierTechnologyParameters",
 "parameters": {
 - "host": "policy-models-simulator",
 - "port": 6680,
 + "host": "${SIM_HOST}",
 + "port": ${CDS_PORT},
 "username": "ccsdkapps",
 "password": "ccsdkapps",
 "timeout": 60
 @@ -6242,7 +6261,7 @@ "carrierTechnology": "RESTCLIENT",
 "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
 "parameters": {
 - "url": "http://172.16.2.18:31054/events/APEX-CL-MGT"
 + "url": "http://${SIM_HOST}:${DMAAP_PORT}/events/APEX-CL-MGT"
 }
 },
 "eventProtocolParameters": {
 @@ -7027,7 +7046,7 @@ if (prev.getResponseCode() == '200') { "priority": "High",
 "reportingEntityName": "ibcx0001vm002oam001",
 "sequence": 1,
 - "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
 + "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014${__threadNum}",
 "sourceName": "vfw-cnf-cds-test-2-vnf",
 "startEpochMicrosec": 1413378172000000,
 "timeZoneOffset": "UTC-05:30",
 @@ -7372,7 +7391,7 @@ if (prev.getResponseCode() == '200') { </elementProp> </collectionProp> </elementProp> - <stringProp name="HTTPSampler.domain">${HOSTNAME}</stringProp> + <stringProp name="HTTPSampler.domain">${SIM_HOST}</stringProp> <stringProp name="HTTPSampler.port">${DMAAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> @@ -7409,8 +7428,8 @@ if (prev.getResponseCode() == '200') { <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">172.16.2.173</stringProp> - <stringProp name="HTTPSampler.port">3904</stringProp> + <stringProp name="HTTPSampler.domain">${SIM_HOST}</stringProp> + <stringProp name="HTTPSampler.port">${DMAAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> <stringProp name="HTTPSampler.path">/events/APEX-CL-MGT/cg${__threadNum}/c1?timeout=30000</stringProp> @@ -7463,7 +7482,7 @@ if (prev.getResponseCode() == '200') { <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">${HOSTNAME}</stringProp> + <stringProp name="HTTPSampler.domain">${SIM_HOST}</stringProp> <stringProp name="HTTPSampler.port">${DMAAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> @@ -7516,7 +7535,7 @@ if (prev.getResponseCode() == '200') { <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">${HOSTNAME}</stringProp> + <stringProp name="HTTPSampler.domain">${SIM_HOST}</stringProp> <stringProp name="HTTPSampler.port">${DMAAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> @@ -7582,7 +7601,7 @@ if (prev.getResponseCode() == '200') { <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">${HOSTNAME}</stringProp> + <stringProp name="HTTPSampler.domain">${SIM_HOST}</stringProp> <stringProp name="HTTPSampler.port">${DMAAP_PORT}</stringProp> <stringProp name="HTTPSampler.protocol">http</stringProp> <stringProp name="HTTPSampler.contentEncoding"></stringProp> @@ -7677,7 +7696,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/jmeter_results/apex_perf/summary.log</stringProp> + <stringProp name="filename">/home/dhanrahan/jmeter_results/apex_perf/summary.log</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> @@ -7714,7 +7733,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/jmeter_results/apex_perf/resultTree.log</stringProp> + <stringProp name="filename">/home/dhanrahan/jmeter_results/apex_perf/resultTree.log</stringProp> </ResultCollector> <hashTree/> <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true"> @@ -7751,7 +7770,7 @@ if (prev.getResponseCode() == '200') { <connectTime>true</connectTime> </value> </objProp> - <stringProp name="filename">/home/asreekumar/jmeter_results/apex_perf/resultTable.log</stringProp> + <stringProp name="filename">/home/dhanrahan/jmeter_results/apex_perf/resultTable.log</stringProp> </ResultCollector> <hashTree/> </hashTree> |