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 ++++++++++++++++++--- 1 file changed, 381 insertions(+), 47 deletions(-) (limited to 'testsuites/performance/src/main/resources/testplans/performance.jmx') 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 -- cgit 1.2.3-korg