From abd92e42ee2c00fc0cc336527202ac1876926dd7 Mon Sep 17 00:00:00 2001 From: Bilal A Date: Tue, 5 Mar 2019 13:18:49 -0500 Subject: Adds basic stability tests for XACML PDP Includes 1) Basic health check test 2) Statistics API test Change-Id: I41156007dfb70702822d50f5bb32dbaae36bc610 Issue-ID: POLICY-1461 Signed-off-by: Bilal A --- .../src/main/resources/testplans/stability.jmx | 319 +++++++++++++++++++++ 1 file changed, 319 insertions(+) create mode 100644 testsuites/stability/src/main/resources/testplans/stability.jmx (limited to 'testsuites/stability/src/main/resources/testplans/stability.jmx') diff --git a/testsuites/stability/src/main/resources/testplans/stability.jmx b/testsuites/stability/src/main/resources/testplans/stability.jmx new file mode 100644 index 00000000..9a3ad6be --- /dev/null +++ b/testsuites/stability/src/main/resources/testplans/stability.jmx @@ -0,0 +1,319 @@ + + + + + + Policy XACML PDP Stability Tests + false + true + false + + + + POLICY_XACML_PDP_HOST + ${__P(host,127.0.0.1)} + = + + + DURATION + ${__P(duration, 5)} + = + + + USERS + ${__P(users, 1)} + = + + + PORT + ${__P(port, 6969)} + = + + + + + + + + continue + + false + -1 + + ${USERS} + 1 + true + ${DURATION} + 1 + + + + + + + ${POLICY_XACML_PDP_HOST} + 6969 + http + + policy/pdpx/v1/healthcheck + GET + true + false + true + false + + + + Basic Health Check + + + + + 200 + + + Assertion.response_code + false + 1 + + + + groovy + + + true + 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.code == 200; + assert res.name == "Policy Xacml PDP"; + assert res.healthy==true; + assert res.message=="alive"; + +} + + + + + + + Accept + application/json + + + Content-Type + application/json + + + + + + + + http://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/healthcheck + healthcheck + zb!XztG34 + + + + + true + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + continue + + false + -1 + + ${USERS} + 1 + true + ${DURATION} + 1 + + + + + + + ${POLICY_XACML_PDP_HOST} + 6969 + http + + policy/pdpx/v1/statistics + GET + true + false + true + false + + + + Basic Health Check + + + + + 200 + + + Assertion.response_code + false + 1 + + + + groovy + + + true + 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.code == 200; + assert res.totalPoliciesCount == 0; + assert res.permitDecisionsCount == 0; + assert res.denyDecisionsCount == 0; + assert res.indeterminantDecisionsCount == 0; + assert res.notApplicableDecisionsCount == 0; + + + +} + + + + + + + Accept + application/json + + + Content-Type + application/json + + + + + + + + http://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/statistics + healthcheck + zb!XztG34 + + + + + true + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + + -- cgit 1.2.3-korg