X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=testsuites%2Fapex-pdp-stability%2Fsrc%2Fmain%2Fresources%2FapexPdpStabilityTestPlan.jmx;fp=testsuites%2Fapex-pdp-stability%2Fsrc%2Fmain%2Fresources%2FapexPdpStabilityTestPlan.jmx;h=0cae77a1912031e7fcbfb8adf9b859e8ab66e621;hb=6be0d55c23de2c4f245fce0ae710cfdf24cd1660;hp=60879c202013bb4927df7afc1a9a461c738f9524;hpb=57fbf692d7affd2d93ed7f0d0d782cdfe7cc4cf2;p=policy%2Fapex-pdp.git diff --git a/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx b/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx index 60879c202..0cae77a19 100644 --- a/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx +++ b/testsuites/apex-pdp-stability/src/main/resources/apexPdpStabilityTestPlan.jmx @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP Apex-PDP ================================================================================ - Copyright (C) 2020-2021 Nordix Foundation.All rights reserved. + Copyright (C) 2020-2022 Nordix Foundation.All rights reserved. Modifications Copyright (C) 2021 Bell Canada. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,7 +19,7 @@ limitations under the License. ============LICENSE_END========================================================= --> - + @@ -79,17 +79,17 @@ PAP_PORT - ${__P(PAP_PORT,31262)} + ${__P(PAP_PORT,30442)} = API_PORT - ${__P(API_PORT,30421)} + ${__P(API_PORT,30240)} = APEX_PORT - ${__P(APEX_PORT,31151)} + ${__P(APEX_PORT,30237)} = @@ -97,19 +97,24 @@ ${__P(DMAAP_PORT,31054)} = + + CDS_PORT + ${__P(CDS_PORT,6680)} + = + HOSTNAME - ${__P(HOSTNAME,172.16.2.18)} + ${__P(HOSTNAME,172.16.1.39)} = LOG_PATH - ${__P(LOG_PATH,/home/asreekumar/jmeter_results/apex_stability)} + ${__P(LOG_PATH,/home/dhanrahan/jmeter_results/apex_stability)} = SIM_HOST - ${__P(SIM_HOST,172.16.2.18)} + ${__P(SIM_HOST,172.16.2.220)} = @@ -119,25 +124,39 @@ https://${HOSTNAME}:${API_PORT} - healthcheck + policyadmin zb!XztG34 https://${HOSTNAME}:${PAP_PORT} + policyadmin + zb!XztG34 + + + + + https://${HOSTNAME}:${APEX_PORT}/policy/apex-pdp/v1/healthcheck healthcheck zb!XztG34 - https://${HOSTNAME}:${APEX_PORT} + https://${HOSTNAME}:${APEX_PORT}/metrics healthcheck zb!XztG34 + + https://${HOSTNAME}:${APEX_PORT} + policyadmin + zb!XztG34 + + + false @@ -196,7 +215,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" } ] }, @@ -1676,7 +1695,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}" } } }, @@ -3213,7 +3232,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": { @@ -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 @@ -3327,8 +3346,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 @@ -6161,7 +6180,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": { @@ -6242,8 +6261,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 @@ -6262,7 +6281,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": { @@ -7047,7 +7066,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", @@ -7392,7 +7411,7 @@ if (prev.getResponseCode() == '200') { - ${HOSTNAME} + ${SIM_HOST} ${DMAAP_PORT} http @@ -7429,8 +7448,8 @@ if (prev.getResponseCode() == '200') { - 172.16.2.173 - 3904 + ${SIM_HOST} + ${DMAAP_PORT} http /events/APEX-CL-MGT/cg${__threadNum}/c1?timeout=30000 @@ -7483,7 +7502,7 @@ if (prev.getResponseCode() == '200') { - ${HOSTNAME} + ${SIM_HOST} ${DMAAP_PORT} http @@ -7536,7 +7555,7 @@ if (prev.getResponseCode() == '200') { - ${HOSTNAME} + ${SIM_HOST} ${DMAAP_PORT} http @@ -7602,7 +7621,7 @@ if (prev.getResponseCode() == '200') { - ${HOSTNAME} + ${SIM_HOST} ${DMAAP_PORT} http @@ -7697,7 +7716,7 @@ if (prev.getResponseCode() == '200') { true - /home/asreekumar/jmeter_results/apex_stability/summary.log + /home/dhanrahan/jmeter_results/apex_stability/summary.log @@ -7734,7 +7753,7 @@ if (prev.getResponseCode() == '200') { true - /home/asreekumar/jmeter_results/apex_stability/resultTree.log + /home/dhanrahan/jmeter_results/apex_stability/resultTree.log @@ -7771,7 +7790,7 @@ if (prev.getResponseCode() == '200') { true - /home/asreekumar/jmeter_results/apex_stability/resultTable.log + /home/dhanrahan/jmeter_results/apex_stability/resultTable.log