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 Performance" enabled="true">
5 <stringProp name="TestPlan.comments">Policy XACML PDP Performance 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">true</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="Policy XACML PDP Health Check " 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;
98 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
99 <collectionProp name="HeaderManager.headers">
100 <elementProp name="" elementType="Header">
101 <stringProp name="Header.name">Accept</stringProp>
102 <stringProp name="Header.value">application/json</stringProp>
104 <elementProp name="" elementType="Header">
105 <stringProp name="Header.name">Content-Type</stringProp>
106 <stringProp name="Header.value">application/json</stringProp>
111 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
112 <collectionProp name="AuthManager.auth_list">
113 <elementProp name="" elementType="Authorization">
114 <stringProp name="Authorization.url">https://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/healthcheck</stringProp>
115 <stringProp name="Authorization.username">healthcheck</stringProp>
116 <stringProp name="Authorization.password">zb!XztG34</stringProp>
117 <stringProp name="Authorization.domain"></stringProp>
118 <stringProp name="Authorization.realm"></stringProp>
121 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
124 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
125 <boolProp name="ResultCollector.error_logging">false</boolProp>
127 <name>saveConfig</name>
128 <value class="SampleSaveConfiguration">
130 <latency>true</latency>
131 <timestamp>true</timestamp>
132 <success>true</success>
135 <message>true</message>
136 <threadName>true</threadName>
137 <dataType>true</dataType>
138 <encoding>false</encoding>
139 <assertions>true</assertions>
140 <subresults>true</subresults>
141 <responseData>false</responseData>
142 <samplerData>false</samplerData>
144 <fieldNames>true</fieldNames>
145 <responseHeaders>false</responseHeaders>
146 <requestHeaders>false</requestHeaders>
147 <responseDataOnError>false</responseDataOnError>
148 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
149 <assertionsResultsToSave>0</assertionsResultsToSave>
151 <sentBytes>true</sentBytes>
153 <threadCounts>true</threadCounts>
154 <idleTime>true</idleTime>
155 <connectTime>true</connectTime>
158 <stringProp name="filename">/tmp/pdpx_perf_health.log</stringProp>
162 <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="XACML PDP Statistics Check " enabled="true">
163 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
164 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
165 <boolProp name="LoopController.continue_forever">false</boolProp>
166 <intProp name="LoopController.loops">-1</intProp>
168 <stringProp name="ThreadGroup.num_threads">${USERS}</stringProp>
169 <stringProp name="ThreadGroup.ramp_time">1</stringProp>
170 <boolProp name="ThreadGroup.scheduler">true</boolProp>
171 <stringProp name="ThreadGroup.duration">${DURATION}</stringProp>
172 <stringProp name="ThreadGroup.delay">1</stringProp>
175 <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Check Statistics" enabled="true">
176 <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
177 <collectionProp name="Arguments.arguments"/>
179 <stringProp name="HTTPSampler.domain">${POLICY_XACML_PDP_HOST}</stringProp>
180 <stringProp name="HTTPSampler.port">6969</stringProp>
181 <stringProp name="HTTPSampler.protocol">https</stringProp>
182 <stringProp name="HTTPSampler.contentEncoding"></stringProp>
183 <stringProp name="HTTPSampler.path">policy/pdpx/v1/statistics</stringProp>
184 <stringProp name="HTTPSampler.method">GET</stringProp>
185 <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
186 <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
187 <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
188 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
189 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
190 <stringProp name="HTTPSampler.connect_timeout"></stringProp>
191 <stringProp name="HTTPSampler.response_timeout"></stringProp>
192 <stringProp name="TestPlan.comments">Basic Health Check</stringProp>
195 <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
196 <collectionProp name="Asserion.test_strings">
197 <stringProp name="49586">200</stringProp>
199 <stringProp name="Assertion.custom_message"></stringProp>
200 <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
201 <boolProp name="Assertion.assume_success">false</boolProp>
202 <intProp name="Assertion.test_type">1</intProp>
205 <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="JSR223 Assertion" enabled="true">
206 <stringProp name="scriptLanguage">groovy</stringProp>
207 <stringProp name="parameters"></stringProp>
208 <stringProp name="filename"></stringProp>
209 <stringProp name="cacheKey">true</stringProp>
210 <stringProp name="script">import groovy.json.JsonSlurper;
213 if (prev.getResponseCode() == '200') {
214 def jsonSlurper = new JsonSlurper();
215 res = jsonSlurper.parseText(prev.getResponseDataAsString());
217 assert res instanceof Map;
218 assert res.code == 200;
225 <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
226 <collectionProp name="HeaderManager.headers">
227 <elementProp name="" elementType="Header">
228 <stringProp name="Header.name">Accept</stringProp>
229 <stringProp name="Header.value">application/json</stringProp>
231 <elementProp name="" elementType="Header">
232 <stringProp name="Header.name">Content-Type</stringProp>
233 <stringProp name="Header.value">application/json</stringProp>
238 <AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
239 <collectionProp name="AuthManager.auth_list">
240 <elementProp name="" elementType="Authorization">
241 <stringProp name="Authorization.url">https://${POLICY_XACML_PDP_HOST}:6969/policy/pdpx/v1/statistics</stringProp>
242 <stringProp name="Authorization.username">healthcheck</stringProp>
243 <stringProp name="Authorization.password">zb!XztG34</stringProp>
244 <stringProp name="Authorization.domain"></stringProp>
245 <stringProp name="Authorization.realm"></stringProp>
248 <boolProp name="AuthManager.clearEachIteration">true</boolProp>
251 <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
252 <boolProp name="ResultCollector.error_logging">false</boolProp>
254 <name>saveConfig</name>
255 <value class="SampleSaveConfiguration">
257 <latency>true</latency>
258 <timestamp>true</timestamp>
259 <success>true</success>
262 <message>true</message>
263 <threadName>true</threadName>
264 <dataType>true</dataType>
265 <encoding>false</encoding>
266 <assertions>true</assertions>
267 <subresults>true</subresults>
268 <responseData>false</responseData>
269 <samplerData>false</samplerData>
271 <fieldNames>true</fieldNames>
272 <responseHeaders>false</responseHeaders>
273 <requestHeaders>false</requestHeaders>
274 <responseDataOnError>false</responseDataOnError>
275 <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
276 <assertionsResultsToSave>0</assertionsResultsToSave>
278 <sentBytes>true</sentBytes>
280 <threadCounts>true</threadCounts>
281 <idleTime>true</idleTime>
282 <connectTime>true</connectTime>
285 <stringProp name="filename">/tmp/pdpx_perf_stats.log</stringProp>