1 <?xml version="1.0" encoding="UTF-8"?>
2 <jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935">
4 <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Policy XACML PDP Stability" enabled="true">
5 <stringProp name="TestPlan.comments">Policy XACML PDP Stability Tests</stringProp>
6 <boolProp name="TestPlan.functional_mode">false</boolProp>
7 <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
8 <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9 <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
10 <collectionProp name="Arguments.arguments">
11 <elementProp name="POLICY_XACML_PDP_HOST" elementType="Argument">
12 <stringProp name="Argument.name">POLICY_XACML_PDP_HOST</stringProp>
13 <stringProp name="Argument.value">${__P(host,10.12.6.164)}</stringProp>
14 <stringProp name="Argument.metadata">=</stringProp>
16 <elementProp name="DURATION" elementType="Argument">
17 <stringProp name="Argument.name">DURATION</stringProp>
18 <stringProp name="Argument.value">${__P(duration, 5)}</stringProp>
19 <stringProp name="Argument.metadata">=</stringProp>
21 <elementProp name="USERS" elementType="Argument">
22 <stringProp name="Argument.name">USERS</stringProp>
23 <stringProp name="Argument.value">${__P(users, 1)}</stringProp>
24 <stringProp name="Argument.metadata">=</stringProp>
26 <elementProp name="PORT" elementType="Argument">
27 <stringProp name="Argument.name">PORT</stringProp>
28 <stringProp name="Argument.value">${__P(port, 6969)}</stringProp>
29 <stringProp name="Argument.metadata">=</stringProp>
33 <stringProp name="TestPlan.user_define_classpath"></stringProp>
36 <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="XACML PDP Health Check Test" enabled="true">
37 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
38 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
39 <boolProp name="LoopController.continue_forever">false</boolProp>
40 <intProp name="LoopController.loops">-1</intProp>
42 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
43 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
44 <boolProp name="ThreadGroup.scheduler">true</boolProp>
45 <stringProp name="ThreadGroup.duration">${DURATION}</stringProp>
46 <stringProp name="ThreadGroup.delay">1</stringProp>
49 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Health" enabled="true">
50 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
51 <collectionProp name="Arguments.arguments"/>
53 <stringProp name="HTTPSampler.domain">${POLICY_XACML_PDP_HOST}</stringProp>
54 <stringProp name="HTTPSampler.port">6969</stringProp>
55 <stringProp name="HTTPSampler.protocol">https</stringProp>
56 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
57 <stringProp name="HTTPSampler.path">policy/pdpx/v1/healthcheck</stringProp>
58 <stringProp name="HTTPSampler.method">GET</stringProp>
59 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
60 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
61 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
62 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
63 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
64 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
65 <stringProp name="HTTPSampler.response_timeout"></stringProp>
66 <stringProp name="TestPlan.comments">Basic Health Check</stringProp>
69 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
70 <collectionProp name="Asserion.test_strings">
71 <stringProp name="49586">200</stringProp>
73 <stringProp name="Assertion.custom_message"></stringProp>
74 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
75 <boolProp name="Assertion.assume_success">false</boolProp>
76 <intProp name="Assertion.test_type">1</intProp>
79 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
80 <stringProp name="scriptLanguage">groovy</stringProp>
81 <stringProp name="parameters"></stringProp>
82 <stringProp name="filename"></stringProp>
83 <stringProp name="cacheKey">true</stringProp>
84 <stringProp name="script">import groovy.json.JsonSlurper;
87 if (prev.getResponseCode() == '200') {
88 def jsonSlurper = new JsonSlurper();
89 res = jsonSlurper.parseText(prev.getResponseDataAsString());
91 assert res instanceof Map;
92 assert res.code == 200;
93 assert res.name == "Policy Xacml PDP";
94 assert res.healthy==true;
95 assert res.message=="alive";
101 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
102 <collectionProp name="HeaderManager.headers">
103 <elementProp name="" elementType="Header">
104 <stringProp name="Header.name">Accept</stringProp>
105 <stringProp name="Header.value">application/json</stringProp>
107 <elementProp name="" elementType="Header">
108 <stringProp name="Header.name">Content-Type</stringProp>
109 <stringProp name="Header.value">application/json</stringProp>
114 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
115 <collectionProp name="AuthManager.auth_list">
116 <elementProp name="" elementType="Authorization">
117 <stringProp name="Authorization.url">https://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/healthcheck</stringProp>
118 <stringProp name="Authorization.username">healthcheck</stringProp>
119 <stringProp name="Authorization.password">zb!XztG34</stringProp>
120 <stringProp name="Authorization.domain"></stringProp>
121 <stringProp name="Authorization.realm"></stringProp>
124 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
127 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
128 <boolProp name="ResultCollector.error_logging">false</boolProp>
130 <name>saveConfig</name>
131 <value class="SampleSaveConfiguration">
133 <latency>true</latency>
134 <timestamp>true</timestamp>
135 <success>true</success>
138 <message>true</message>
139 <threadName>true</threadName>
140 <dataType>true</dataType>
141 <encoding>false</encoding>
142 <assertions>true</assertions>
143 <subresults>true</subresults>
144 <responseData>false</responseData>
145 <samplerData>false</samplerData>
147 <fieldNames>true</fieldNames>
148 <responseHeaders>false</responseHeaders>
149 <requestHeaders>false</requestHeaders>
150 <responseDataOnError>false</responseDataOnError>
151 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
152 <assertionsResultsToSave>0</assertionsResultsToSave>
154 <sentBytes>true</sentBytes>
156 <threadCounts>true</threadCounts>
157 <idleTime>true</idleTime>
158 <connectTime>true</connectTime>
161 <stringProp name="filename"></stringProp>
165 <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="XACML PDP Statistics API" enabled="true">
166 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
167 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
168 <boolProp name="LoopController.continue_forever">false</boolProp>
169 <intProp name="LoopController.loops">-1</intProp>
171 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
172 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
173 <boolProp name="ThreadGroup.scheduler">true</boolProp>
174 <stringProp name="ThreadGroup.duration">${DURATION}</stringProp>
175 <stringProp name="ThreadGroup.delay">1</stringProp>
178 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Statistics" enabled="true">
179 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
180 <collectionProp name="Arguments.arguments"/>
182 <stringProp name="HTTPSampler.domain">${POLICY_XACML_PDP_HOST}</stringProp>
183 <stringProp name="HTTPSampler.port">6969</stringProp>
184 <stringProp name="HTTPSampler.protocol">https</stringProp>
185 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
186 <stringProp name="HTTPSampler.path">policy/pdpx/v1/statistics</stringProp>
187 <stringProp name="HTTPSampler.method">GET</stringProp>
188 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
189 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
190 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
191 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
192 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
193 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
194 <stringProp name="HTTPSampler.response_timeout"></stringProp>
195 <stringProp name="TestPlan.comments">Basic Health Check</stringProp>
198 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
199 <collectionProp name="Asserion.test_strings">
200 <stringProp name="49586">200</stringProp>
202 <stringProp name="Assertion.custom_message"></stringProp>
203 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
204 <boolProp name="Assertion.assume_success">false</boolProp>
205 <intProp name="Assertion.test_type">1</intProp>
208 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
209 <stringProp name="scriptLanguage">groovy</stringProp>
210 <stringProp name="parameters"></stringProp>
211 <stringProp name="filename"></stringProp>
212 <stringProp name="cacheKey">true</stringProp>
213 <stringProp name="script">import groovy.json.JsonSlurper;
216 if (prev.getResponseCode() == '200') {
217 def jsonSlurper = new JsonSlurper();
218 res = jsonSlurper.parseText(prev.getResponseDataAsString());
220 assert res instanceof Map;
221 assert res.code == 200;
222 assert res.totalPoliciesCount == 0;
223 assert res.permitDecisionsCount == 0;
224 assert res.denyDecisionsCount == 0;
225 assert res.indeterminantDecisionsCount == 0;
226 assert res.notApplicableDecisionsCount == 0;
234 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
235 <collectionProp name="HeaderManager.headers">
236 <elementProp name="" elementType="Header">
237 <stringProp name="Header.name">Accept</stringProp>
238 <stringProp name="Header.value">application/json</stringProp>
240 <elementProp name="" elementType="Header">
241 <stringProp name="Header.name">Content-Type</stringProp>
242 <stringProp name="Header.value">application/json</stringProp>
247 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
248 <collectionProp name="AuthManager.auth_list">
249 <elementProp name="" elementType="Authorization">
250 <stringProp name="Authorization.url">https://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/statistics</stringProp>
251 <stringProp name="Authorization.username">healthcheck</stringProp>
252 <stringProp name="Authorization.password">zb!XztG34</stringProp>
253 <stringProp name="Authorization.domain"></stringProp>
254 <stringProp name="Authorization.realm"></stringProp>
257 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
260 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
261 <boolProp name="ResultCollector.error_logging">false</boolProp>
263 <name>saveConfig</name>
264 <value class="SampleSaveConfiguration">
266 <latency>true</latency>
267 <timestamp>true</timestamp>
268 <success>true</success>
271 <message>true</message>
272 <threadName>true</threadName>
273 <dataType>true</dataType>
274 <encoding>false</encoding>
275 <assertions>true</assertions>
276 <subresults>true</subresults>
277 <responseData>false</responseData>
278 <samplerData>false</samplerData>
280 <fieldNames>true</fieldNames>
281 <responseHeaders>false</responseHeaders>
282 <requestHeaders>false</requestHeaders>
283 <responseDataOnError>false</responseDataOnError>
284 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
285 <assertionsResultsToSave>0</assertionsResultsToSave>
287 <sentBytes>true</sentBytes>
289 <threadCounts>true</threadCounts>
290 <idleTime>true</idleTime>
291 <connectTime>true</connectTime>
294 <stringProp name="filename"></stringProp>