From babdc373f453258794b29ab6f872d0c20b59d471 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Fri, 20 Oct 2023 12:06:52 +0100 Subject: Fix stability and performance tests Issue-ID: POLICY-4840 Change-Id: I88bdb3945beaaef79a10f652ce0e9f974c6168ef Signed-off-by: saul.gill --- .../src/main/resources/testplans/performance.jmx | 428 ++++++++++++++++++--- testsuites/run-s3p-test.sh | 4 +- .../src/main/resources/testplans/stability.jmx | 308 ++++++++++++--- 3 files changed, 629 insertions(+), 111 deletions(-) (limited to 'testsuites') diff --git a/testsuites/performance/src/main/resources/testplans/performance.jmx b/testsuites/performance/src/main/resources/testplans/performance.jmx index 5f5d45ec2..8243cae49 100644 --- a/testsuites/performance/src/main/resources/testplans/performance.jmx +++ b/testsuites/performance/src/main/resources/testplans/performance.jmx @@ -1,5 +1,5 @@ - + Policy Clamp AutomationComposition Performance Tests @@ -40,7 +40,6 @@ - @@ -73,8 +72,8 @@ stoptest - false 1 + false 1 1 @@ -1575,16 +1574,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions POST true false true false - - - + false + false + false + 6 + false + 0 @@ -1613,22 +1614,25 @@ + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/participants PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1659,16 +1663,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1703,16 +1709,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} GET true false true false - - - + false + false + false + 6 + false + 0 @@ -1773,16 +1781,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances POST true false true false - - - + false + false + false + 6 + false + 0 @@ -1814,8 +1824,8 @@ continue - false -1 + false ${USERS} 1 @@ -1823,6 +1833,7 @@ 7200 true + false @@ -1831,8 +1842,10 @@ false String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); +vars.put("deployState", deployState); @@ -1853,16 +1866,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1881,6 +1896,51 @@ vars.put("instanceId", instanceId); + + ${__javaScript("${deployState}" !== "DEPLOYED")} + + + + false + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + deployState + $.deployState + + compositionId + + + + true @@ -1898,16 +1958,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1926,12 +1988,57 @@ vars.put("instanceId", instanceId); + + ${__javaScript("${deployState}" !== "UNDEPLOYED")} + + + + false + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + deployState + $.deployState + + compositionId + + + + stoptest - false 1 + false 1 1 @@ -1947,33 +2054,137 @@ vars.put("instanceId", instanceId); false String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); +String loopCondition; vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); - +vars.put("deployState", deployState); +vars.put("loopCondition", "true"); + + ${__javaScript("${deployState}" !== "UNDEPLOYED")} + + + + false + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + deployState + $.deployState + + compositionId + + + + + false + true + ${__javaScript("${deployState}" === "DEPLOYED")} + + + + true + + + + false + { + "deployOrder": "UNDEPLOY" +} + + = + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + PUT + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 202 + + + Assertion.response_code + true + 33 + + + + 6000 + + + + + + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} DELETE true false true false - - - + false + false + false + 6 + false + 0 - 200 + 202 Assertion.response_code @@ -1982,6 +2193,70 @@ vars.put("instanceId", instanceId); + + ${__javaScript("${loopCondition}" === "true")} + + + + false + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + + automationCompositionList + $.automationCompositionList + + compositionId + + + + + // Extracted JSON array +String jsonArray = vars.get("automationCompositionList"); +//String jsonArray = "[]"; + + +log.info("instanceArray: " + jsonArray); +// Check if the JSON array is empty +if (jsonArray.equals("[]")) { + vars.put("loopCondition", "false"); + log.info("condition false"); +} else { + vars.put("loopCondition", "true"); + log.info("condition true"); +} + false + + + true @@ -1998,16 +2273,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -2021,23 +2298,80 @@ vars.put("instanceId", instanceId); + + ${__javaScript("${primeState}" !== "COMMISSIONED")} + + + + true + + + + false + { + "primeOrder": "COMMISSIONED" +} + = + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + + primeState + $.state + + compositionId + + + + + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} DELETE true false true false - - - + false + false + false + 6 + false + 0 diff --git a/testsuites/run-s3p-test.sh b/testsuites/run-s3p-test.sh index cec230e30..9a4d044f0 100755 --- a/testsuites/run-s3p-test.sh +++ b/testsuites/run-s3p-test.sh @@ -35,10 +35,10 @@ then if [ $2 == "performance" ] then - bash start-s3p-tests.sh run $ACM_PERF_TEST_FILE clamp; + bash start-s3p-tests.sh run $ACM_PERF_TEST_FILE; elif [ $2 == "stability" ] then - bash start-s3p-tests.sh run $ACM_STAB_TEST_FILE clamp; + bash start-s3p-tests.sh run $ACM_STAB_TEST_FILE; else echo "echo Invalid arguments provided. Usage: $0 [option..] {performance | stability}" fi diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx index abf978128..09e0f65f9 100644 --- a/testsuites/stability/src/main/resources/testplans/stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -1,5 +1,5 @@ - + Policy Clamp ACM Stability Tests @@ -30,7 +30,6 @@ - @@ -63,8 +62,8 @@ stoptest - false 1 + false 1 1 @@ -1565,16 +1564,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions POST true false true false - - - + false + false + false + 6 + false + 0 @@ -1603,22 +1604,25 @@ + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/participants PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1649,16 +1653,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1674,7 +1680,7 @@ - ${__javaScript("${primeState}" != "PRIMED")} + ${__javaScript("${primeState}" !== "PRIMED")} @@ -1693,16 +1699,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} GET true false true false - - - + false + false + false + 6 + false + 0 @@ -1763,16 +1771,18 @@ ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances POST true false true false - - - + false + false + false + 6 + false + 0 @@ -1804,15 +1814,16 @@ continue - false -1 + false 1 1 true - 120 + 260000 true + false @@ -1821,8 +1832,10 @@ false String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); +vars.put("deployState", deployState); @@ -1833,7 +1846,7 @@ vars.put("instanceId", instanceId); false { - "deployOrder": "DEPLOY" + "deployOrder": "DEPLOY" } = @@ -1843,16 +1856,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1871,26 +1886,29 @@ vars.put("instanceId", instanceId); - ${__javaScript("${deployState}" != "DEPLOYED")} + ${__javaScript("${deployState}" !== "DEPLOYED")} + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} GET true false true false - - - + false + false + false + 6 + false + 0 @@ -1919,7 +1937,7 @@ vars.put("instanceId", instanceId); false { - "deployOrder": "UNDEPLOY" + "deployOrder": "UNDEPLOY" } = @@ -1929,16 +1947,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -1957,26 +1977,29 @@ vars.put("instanceId", instanceId); - ${__javaScript("${undeployState}" != "UNDEPLOYED")} + ${__javaScript("${deployState}" !== "UNDEPLOYED")} + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} GET true false true false - - - + false + false + false + 6 + false + 0 @@ -1990,7 +2013,7 @@ vars.put("instanceId", instanceId); - undeployState + deployState $.deployState compositionId @@ -2002,8 +2025,8 @@ vars.put("instanceId", instanceId); stoptest - false 1 + false 1 1 @@ -2019,33 +2042,135 @@ vars.put("instanceId", instanceId); false String compositionId = props.get("compositionId"); String instanceId = props.get("instanceId"); +String deployState = props.get("deployState"); vars.put("compositionId", compositionId); vars.put("instanceId", instanceId); - +vars.put("deployState", deployState); + + ${__javaScript("${deployState}" !== "UNDEPLOYED")} + + + + false + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + deployState + $.deployState + + compositionId + + + + + false + true + ${__javaScript("${deployState}" === "DEPLOYED")} + + + + true + + + + false + { + "deployOrder": "UNDEPLOY" +} + + = + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} + PUT + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 202 + + + Assertion.response_code + true + 33 + + + + 6000 + + + + + + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId}/instances/${instanceId} DELETE true false true false - - - + false + false + false + 6 + false + 0 - 200 + 202 Assertion.response_code @@ -2070,16 +2195,18 @@ vars.put("instanceId", instanceId); ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} PUT true false true false - - - + false + false + false + 6 + false + 0 @@ -2093,23 +2220,80 @@ vars.put("instanceId", instanceId); + + ${__javaScript("${primeState}" !== "COMMISSIONED")} + + + + true + + + + false + { + "primeOrder": "COMMISSIONED" +} + = + + + + ${RUNTIME_HOST} + ${RUNTIME_PORT} + http + /onap/policy/clamp/acm/v2/compositions/${compositionId} + GET + true + false + true + false + false + false + false + 6 + false + 0 + + + + + 200 + + + Assertion.response_code + false + 1 + + + + + primeState + $.state + + compositionId + + + + + false ${RUNTIME_HOST} ${RUNTIME_PORT} http - /onap/policy/clamp/acm/v2/compositions/${compositionId} DELETE true false true false - - - + false + false + false + 6 + false + 0 -- cgit 1.2.3-korg