Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3 |
xmlns:jmeter="http://jmeter.apache.org/" |
4 |
> |
5 |
|
6 |
<xsl:strip-space elements="*"/> |
7 |
<!-- |
8 |
Licensed to the Apache Software Foundation (ASF) under one or more |
9 |
contributor license agreements. See the NOTICE file distributed with |
10 |
this work for additional information regarding copyright ownership. |
11 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
12 |
(the "License"); you may not use this file except in compliance with |
13 |
the License. You may obtain a copy of the License at |
14 |
|
15 |
http://www.apache.org/licenses/LICENSE-2.0 |
16 |
|
17 |
Unless required by applicable law or agreed to in writing, software |
18 |
distributed under the License is distributed on an "AS IS" BASIS, |
19 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
20 |
See the License for the specific language governing permissions and |
21 |
limitations under the License. |
22 |
--> |
23 |
|
24 |
<!-- |
25 |
Stylesheet to display details of a JMX test plan for HTTP |
26 |
--> |
27 |
<xsl:template match="jmeterTestPlan"> |
28 |
<html> |
29 |
<title>Schematic view of Test Plan</title> |
30 |
<head> |
31 |
<style> |
32 |
ul.tree, ul.tree ul { |
33 |
list-style-type: none; |
34 |
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAKAQMAAABPHKYJAAAAA1BMVEWIiIhYZW6zAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1ggGExMZBky19AAAAAtJREFUCNdjYMAEAAAUAAHlhrBKAAAAAElFTkSuQmCC') repeat-y; |
35 |
margin: 0; |
36 |
padding: 0; |
37 |
} |
38 |
ul.tree ul { |
39 |
margin-left: 10px; |
40 |
} |
41 |
ul.tree li { |
42 |
margin: 0; |
43 |
padding: 0 12px; |
44 |
line-height: 20px; |
45 |
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAUAQMAAACK1e4oAAAABlBMVEUAAwCIiIgd2JB2AAAAAXRSTlMAQObYZgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YIBhQIJYVaFGwAAAARSURBVAjXY2hgQIf/GTDFGgDSkwqATqpCHAAAAABJRU5ErkJggg==') no-repeat; |
46 |
color: #369; |
47 |
} |
48 |
ul.tree li:last-child { |
49 |
background: #fff url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAUAQMAAACK1e4oAAAABlBMVEUAAwCIiIgd2JB2AAAAAXRSTlMAQObYZgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YIBhQIIhs+gc8AAAAQSURBVAjXY2hgQIf/GbAAAKCTBYBUjWvCAAAAAElFTkSuQmCC') no-repeat; |
50 |
} |
51 |
</style> |
52 |
</head> |
53 |
<body> |
54 |
<xsl:apply-templates/> |
55 |
</body> |
56 |
</html> |
57 |
</xsl:template> |
58 |
|
59 |
<!-- Remove empty nodes --> |
60 |
<xsl:template match="hashTree[count(child::*) = 0]"> |
61 |
</xsl:template> |
62 |
|
63 |
<xsl:template match="jmeterTestPlan/hashTree[1]"> |
64 |
<ul class="tree" id="tree"> |
65 |
<xsl:apply-templates/> |
66 |
</ul> |
67 |
</xsl:template> |
68 |
|
69 |
<xsl:template match="hashTree"> |
70 |
<li><ul><xsl:apply-templates /></ul></li> |
71 |
</xsl:template> |
72 |
|
73 |
<xsl:template match="TestPlan"> |
74 |
<li> |
75 |
<xsl:call-template name="header"/> |
76 |
(globalVars:[<xsl:for-each select='elementProp/collectionProp/elementProp'> |
77 |
"<xsl:value-of select='stringProp[@name="Argument.name"]'/>" |
78 |
<xsl:value-of select='stringProp[@name="Argument.metadata"]'/> |
79 |
"<xsl:value-of select='stringProp[@name="Argument.value"]'/>" |
80 |
<xsl:if test="position() != last()">,</xsl:if> |
81 |
</xsl:for-each>], |
82 |
executeTearDownThreadsOnShutdown: <xsl:value-of select='boolProp[@name="TestPlan.tearDown_on_shutdown"]'/>) |
83 |
<xsl:call-template name="comment"/> |
84 |
</li> |
85 |
</xsl:template> |
86 |
|
87 |
<xsl:template match="Arguments"> |
88 |
<li> |
89 |
<xsl:call-template name="header"/> |
90 |
([<xsl:for-each select='collectionProp/elementProp'> |
91 |
"<xsl:value-of select='stringProp[@name="Argument.name"]'/>" |
92 |
<xsl:value-of select='stringProp[@name="Argument.metadata"]'/> |
93 |
"<xsl:value-of select='stringProp[@name="Argument.value"]'/>" |
94 |
<xsl:if test="position() != last()">,</xsl:if> |
95 |
</xsl:for-each>]) |
96 |
<xsl:call-template name="comment"/> |
97 |
</li> |
98 |
</xsl:template> |
99 |
|
100 |
<xsl:template match="ThreadGroup|SetupThreadGroup|PostThreadGroup"> |
101 |
<li> |
102 |
<xsl:call-template name="header"/> |
103 |
( |
104 |
threads: "<xsl:value-of select='stringProp[@name="ThreadGroup.num_threads"]'/>", |
105 |
loops: "<xsl:value-of select='elementProp/*[@name="LoopController.loops"]'/>", |
106 |
ramp-up: "<xsl:value-of select='stringProp[@name="ThreadGroup.ramp_time"]'/>" |
107 |
) |
108 |
<xsl:call-template name="comment"/> |
109 |
</li> |
110 |
</xsl:template> |
111 |
|
112 |
<xsl:template match="CSVDataSet"> |
113 |
<li> |
114 |
<xsl:call-template name="header"/> |
115 |
(file: "<xsl:value-of select='stringProp[@name="filename"]'/>", |
116 |
vars:"<xsl:value-of select='stringProp[@name="variableNames"]'/>", |
117 |
sharing:"<xsl:value-of select='stringProp[@name="shareMode"]'/>", |
118 |
recycleOnEof:<xsl:value-of select='boolProp[@name="recycle"]'/>, |
119 |
stopThreadOnEof:<xsl:value-of select='boolProp[@name="stopThread"]'/> |
120 |
) |
121 |
<xsl:call-template name="comment"/> |
122 |
<br/> |
123 |
</li> |
124 |
</xsl:template> |
125 |
|
126 |
<xsl:template match="ThroughputController"> |
127 |
<li> |
128 |
<xsl:call-template name="header"/> |
129 |
(pct: "<xsl:value-of select='stringProp[@name="ThroughputController.percentThroughput"]'/>%") |
130 |
<xsl:call-template name="comment"/> |
131 |
<br/> |
132 |
</li> |
133 |
</xsl:template> |
134 |
|
135 |
<xsl:template match="IfController"> |
136 |
<li> |
137 |
<xsl:call-template name="header"/> |
138 |
(condition: "<xsl:value-of select='stringProp[@name="IfController.condition"]'/>") |
139 |
<xsl:call-template name="comment"/> |
140 |
</li> |
141 |
</xsl:template> |
142 |
|
143 |
<xsl:template match="HTTPSamplerProxy"> |
144 |
<li> |
145 |
<xsl:call-template name="header"/> |
146 |
(method: "<xsl:value-of select='stringProp[@name="HTTPSampler.method"]'/>", |
147 |
url: " |
148 |
<xsl:value-of select='stringProp[@name="HTTPSampler.protocol"]'/> |
149 |
<xsl:text>://</xsl:text> |
150 |
<xsl:value-of select='stringProp[@name="HTTPSampler.domain"]'/> |
151 |
<xsl:text>:</xsl:text> |
152 |
<xsl:value-of select='stringProp[@name="HTTPSampler.port"]'/> |
153 |
<xsl:text>/</xsl:text> |
154 |
<xsl:value-of select='stringProp[@name="HTTPSampler.path"]'/>", |
155 |
<xsl:choose> |
156 |
<xsl:when test='boolProp[@name="HTTPSampler.postBodyRaw"] = "true"'> |
157 |
body: "<xsl:value-of select='elementProp/collectionProp/elementProp[@elementType="HTTPArgument"][1]/stringProp[@name="Argument.value"]'/>" |
158 |
</xsl:when> |
159 |
<xsl:otherwise> |
160 |
body: [ |
161 |
<xsl:for-each select='elementProp[@name="HTTPsampler.Arguments"]/collectionProp/elementProp'> |
162 |
"<xsl:value-of select='stringProp[@name="Argument.name"]'/>"= |
163 |
"<xsl:value-of select='stringProp[@name="Argument.value"]'/>" |
164 |
<xsl:if test="position() != last()">,</xsl:if> |
165 |
</xsl:for-each> |
166 |
] |
167 |
</xsl:otherwise> |
168 |
</xsl:choose>, |
169 |
upload-files: [ |
170 |
<xsl:for-each select='elementProp[@name="HTTPsampler.Files"]/collectionProp/elementProp'> |
171 |
{param="<xsl:value-of select='stringProp[@name="File.paramname"]'/>", |
172 |
path="<xsl:value-of select='stringProp[@name="File.path"]'/>", |
173 |
mime-type="<xsl:value-of select='stringProp[@name="File.mimetype"]'/>"} |
174 |
<xsl:if test="position() != last()">,</xsl:if> |
175 |
</xsl:for-each> |
176 |
] |
177 |
) |
178 |
<xsl:call-template name="comment"/> |
179 |
</li> |
180 |
</xsl:template> |
181 |
|
182 |
<xsl:template match="CacheManager"> |
183 |
<li> |
184 |
<xsl:call-template name="header"/> |
185 |
(clearOnEachIteration: <xsl:value-of select='boolProp[@name="clearEachIteration"]'/>, |
186 |
useCacheControlAndExpires: <xsl:value-of select='boolProp[@name="useExpires"]'/>, |
187 |
maxSize: <xsl:value-of select='intProp[@name="maxSize"]'/> |
188 |
) |
189 |
<xsl:call-template name="comment"/> |
190 |
<xsl:call-template name="comment"/> |
191 |
</li> |
192 |
</xsl:template> |
193 |
<xsl:template match="ConfigTestElement[@guiclass='HttpDefaultsGui']"> |
194 |
<li> |
195 |
<xsl:call-template name="header"/> |
196 |
(protocol: "<xsl:value-of select='stringProp[@name="HTTPSampler.protocol"]'/>", |
197 |
domain: "<xsl:value-of select='stringProp[@name="HTTPSampler.domain"]'/>", |
198 |
port: "<xsl:value-of select='stringProp[@name="HTTPSampler.port"]'/>", |
199 |
path: "<xsl:value-of select='stringProp[@name="HTTPSampler.path"]'/>", |
200 |
connectTimeout: "<xsl:value-of select='stringProp[@name="HTTPSampler.connect_timeout"]'/>"ms, |
201 |
responseTimeout: "<xsl:value-of select='stringProp[@name="HTTPSampler.response_timeout"]'/>"ms |
202 |
) |
203 |
<xsl:call-template name="comment"/> |
204 |
</li> |
205 |
</xsl:template> |
206 |
|
207 |
<xsl:template match="ResultCollector"> |
208 |
<li> |
209 |
<xsl:call-template name="header"/> |
210 |
<xsl:if test='stringProp[@name="filename"]!=""'> |
211 |
(filename: "<xsl:value-of select='stringProp[@name="filename"]'/>", |
212 |
xml: <xsl:value-of select='objProp/value/xml'/>, |
213 |
errorsOnly: <xsl:value-of select='boolProp[@name="ResultCollector.error_logging"]'/>, |
214 |
successOnly: <xsl:value-of select='boolProp[@name="ResultCollector.success_only_logging"]'/>) |
215 |
</xsl:if> |
216 |
<xsl:call-template name="comment"/> |
217 |
</li> |
218 |
</xsl:template> |
219 |
|
220 |
<xsl:template match="ResponseAssertion"> |
221 |
<li> |
222 |
<xsl:call-template name="header"/> |
223 |
<b> that (<xsl:value-of select='substring(stringProp[@name="Assertion.test_field"], 11)'/>)</b> |
224 |
<b> |
225 |
<xsl:choose> |
226 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 1'> |
227 |
matches |
228 |
</xsl:when> |
229 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 2'> |
230 |
contains |
231 |
</xsl:when> |
232 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 5'> |
233 |
does not match |
234 |
</xsl:when> |
235 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 6'> |
236 |
does not contain |
237 |
</xsl:when> |
238 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 8'> |
239 |
is equal to |
240 |
</xsl:when> |
241 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 12'> |
242 |
is not equal to |
243 |
</xsl:when> |
244 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 16'> |
245 |
contains |
246 |
</xsl:when> |
247 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 20'> |
248 |
does not contain as substring |
249 |
</xsl:when> |
250 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 37'> |
251 |
does not matches one of |
252 |
</xsl:when> |
253 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 38'> |
254 |
does not contain one of |
255 |
</xsl:when> |
256 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 44'> |
257 |
is not equal to one of |
258 |
</xsl:when> |
259 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 48'> |
260 |
contains one of |
261 |
</xsl:when> |
262 |
<xsl:when test='intProp[@name="Assertion.test_type"] = 52'> |
263 |
does not contain as substring one of |
264 |
</xsl:when> |
265 |
</xsl:choose> |
266 |
</b> |
267 |
[ |
268 |
<xsl:for-each select='collectionProp[@name="Asserion.test_strings"]/stringProp'> |
269 |
"<xsl:value-of select='.'/>" |
270 |
<xsl:if test="position() != last()">,</xsl:if> |
271 |
</xsl:for-each> |
272 |
]) |
273 |
<xsl:call-template name="comment"/> |
274 |
</li> |
275 |
</xsl:template> |
276 |
|
277 |
<xsl:template match="TestAction"> |
278 |
<li> |
279 |
<xsl:call-template name="header"/> |
280 |
<b> |
281 |
<xsl:choose> |
282 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 0'> |
283 |
stop |
284 |
</xsl:when> |
285 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 1'> |
286 |
pause for <xsl:value-of select='stringProp[@name="ActionProcessor.duration"]'/>ms |
287 |
</xsl:when> |
288 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 2'> |
289 |
stop now |
290 |
</xsl:when> |
291 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 3'> |
292 |
go to next iteration of thread loop |
293 |
</xsl:when> |
294 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 4'> |
295 |
go to next iteration of current loop |
296 |
</xsl:when> |
297 |
<xsl:when test='intProp[@name="ActionProcessor.action"] = 5'> |
298 |
break current loop |
299 |
</xsl:when> |
300 |
</xsl:choose> |
301 |
<xsl:choose> |
302 |
<xsl:when test='intProp[@name="ActionProcessor.target"] = 0'> |
303 |
current thread |
304 |
</xsl:when> |
305 |
<xsl:when test='intProp[@name="ActionProcessor.target"] = 2'> |
306 |
test |
307 |
</xsl:when> |
308 |
</xsl:choose> |
309 |
</b> |
310 |
<xsl:call-template name="comment"/> |
311 |
</li> |
312 |
</xsl:template> |
313 |
|
314 |
<xsl:template match="ResultAction"> |
315 |
<li> |
316 |
<xsl:call-template name="header"/> |
317 |
<b> |
318 |
<xsl:choose> |
319 |
<xsl:when test='intProp[@name="OnError.action"] = 0'> |
320 |
continue |
321 |
</xsl:when> |
322 |
<xsl:when test='intProp[@name="OnError.action"] = 1'> |
323 |
stop thread now |
324 |
</xsl:when> |
325 |
<xsl:when test='intProp[@name="OnError.action"] = 2'> |
326 |
shutdown test |
327 |
</xsl:when> |
328 |
<xsl:when test='intProp[@name="OnError.action"] = 3'> |
329 |
stop test now |
330 |
</xsl:when> |
331 |
<xsl:when test='intProp[@name="OnError.action"] = 4'> |
332 |
go to next iteration of thread loop |
333 |
</xsl:when> |
334 |
<xsl:when test='intProp[@name="OnError.action"] = 5'> |
335 |
go to next iteration of current loop |
336 |
</xsl:when> |
337 |
<xsl:when test='intProp[@name="OnError.action"] = 6'> |
338 |
break current loop |
339 |
</xsl:when> |
340 |
</xsl:choose> |
341 |
</b> |
342 |
<xsl:call-template name="comment"/> |
343 |
</li> |
344 |
</xsl:template> |
345 |
|
346 |
<xsl:template match="UserParameters"> |
347 |
<li> |
348 |
<xsl:call-template name="header"/> |
349 |
(names=[ |
350 |
<xsl:for-each select='collectionProp[@name="UserParameters.names"]/stringProp'> |
351 |
"<xsl:value-of select='.'/>" |
352 |
<xsl:if test="position() != last()">,</xsl:if> |
353 |
</xsl:for-each>],values=[ |
354 |
<xsl:for-each select='collectionProp[@name="UserParameters.thread_values"]/collectionProp/stringProp'> |
355 |
"<xsl:value-of select='.'/>" |
356 |
<xsl:if test="position() != last()">,</xsl:if> |
357 |
</xsl:for-each>] |
358 |
) |
359 |
<xsl:call-template name="comment"/> |
360 |
</li> |
361 |
</xsl:template> |
362 |
|
363 |
<xsl:template match="ModuleController"> |
364 |
<li> |
365 |
<xsl:call-template name="header"/> |
366 |
( |
367 |
<xsl:for-each select='collectionProp/stringProp'> |
368 |
<xsl:if test="position()!=1 and position() != last()"> |
369 |
<xsl:value-of select='.'/> |
370 |
</xsl:if> |
371 |
<xsl:if test="position() = last()"> |
372 |
<a><xsl:attribute name="href">#<xsl:value-of select='.'/></xsl:attribute><xsl:value-of select='.'/></a> |
373 |
</xsl:if> |
374 |
<xsl:if test="position()!=1 and position() != last()"> |
375 |
> |
376 |
</xsl:if> |
377 |
</xsl:for-each> |
378 |
) |
379 |
<xsl:call-template name="comment"/> |
380 |
</li> |
381 |
</xsl:template> |
382 |
|
383 |
<xsl:template match="CookieManager"> |
384 |
<li> |
385 |
<xsl:call-template name="header"/> |
386 |
(clearOnEachIteration: <xsl:value-of select='boolProp[@name="CookieManager.clearEachIteration"]'/>, |
387 |
policy: "<xsl:value-of select='stringProp[@name="CookieManager.policy"]'/>", |
388 |
cookies: [ |
389 |
<xsl:for-each select='collectionProp[@name="CookieManager.cookies"]/elementProp[@elementType="Cookie"]'> |
390 |
{ name:"<xsl:value-of select='@name'/>", |
391 |
value:"<xsl:value-of select='stringProp[@name="Cookie.value"]'/>", |
392 |
domain:"<xsl:value-of select='stringProp[@name="Cookie.domain"]'/>", |
393 |
path:"<xsl:value-of select='stringProp[@name="Cookie.path"]'/>", |
394 |
secure:<xsl:value-of select='boolProp[@name="Cookie.secury"]'/>} |
395 |
<xsl:if test="position() != last()">,</xsl:if> |
396 |
</xsl:for-each>]) |
397 |
<xsl:call-template name="comment"/> |
398 |
</li> |
399 |
</xsl:template> |
400 |
|
401 |
<xsl:template match="HeaderManager"> |
402 |
<li> |
403 |
<xsl:call-template name="header"/> |
404 |
(headers:[ |
405 |
<xsl:for-each select='collectionProp[@name="HeaderManager.headers"]/elementProp'> |
406 |
{"<xsl:value-of select='stringProp[@name="Header.name"]'/>"= |
407 |
"<xsl:value-of select='stringProp[@name="Header.value"]'/>" |
408 |
<xsl:if test="position() != last()">,</xsl:if> |
409 |
</xsl:for-each>]) |
410 |
<xsl:call-template name="comment"/> |
411 |
</li> |
412 |
</xsl:template> |
413 |
|
414 |
<xsl:function name="jmeter:showScope"> |
415 |
<xsl:param name="scope"/> |
416 |
<xsl:choose> |
417 |
<xsl:when test="$scope = 'true'"> |
418 |
using response headers |
419 |
</xsl:when> |
420 |
<xsl:when test="$scope = 'false'"> |
421 |
using response body |
422 |
</xsl:when> |
423 |
<xsl:when test="$scope = 'request_headers'"> |
424 |
using request headers |
425 |
</xsl:when> |
426 |
<xsl:when test="$scope = 'unescaped'"> |
427 |
using response body unescaped |
428 |
</xsl:when> |
429 |
<xsl:when test="$scope = 'URL'"> |
430 |
using URL |
431 |
</xsl:when> |
432 |
<xsl:when test="$scope = 'code'"> |
433 |
using response code |
434 |
</xsl:when> |
435 |
<xsl:when test="$scope = 'message'"> |
436 |
using response message |
437 |
</xsl:when> |
438 |
</xsl:choose> |
439 |
</xsl:function> |
440 |
|
441 |
<xsl:template match="XPath2Extractor"> |
442 |
<li> |
443 |
<xsl:call-template name="header"/> |
444 |
<b>using response body</b> |
445 |
(exportedVar: "<xsl:value-of select='stringProp[@name="XPathExtractor2.refname"]'/>", |
446 |
xpathQuery: "<xsl:value-of select='stringProp[@name="XPathExtractor2.xpathQuery"]'/>", |
447 |
fragment: "<xsl:value-of select='stringProp[@name="XPathExtractor2.fragment"]'/>", |
448 |
default: "<xsl:value-of select='stringProp[@name="XPathExtractor2.default"]'/>", |
449 |
matchNr: "<xsl:value-of select='stringProp[@name="XPathExtractor2.matchNumber"]'/>") |
450 |
<xsl:call-template name="comment"/> |
451 |
</li> |
452 |
</xsl:template> |
453 |
|
454 |
<xsl:template match="XPathExtractor"> |
455 |
<li> |
456 |
<xsl:call-template name="header"/> |
457 |
<b>using response body</b> |
458 |
(exportedVar: "<xsl:value-of select='stringProp[@name="XPathExtractor.refname"]'/>", |
459 |
xpathQuery: "<xsl:value-of select='stringProp[@name="XPathExtractor.xpathQuery"]'/>", |
460 |
fragment: "<xsl:value-of select='stringProp[@name="XPathExtractor.fragment"]'/>", |
461 |
default: "<xsl:value-of select='stringProp[@name="XPathExtractor.default"]'/>", |
462 |
matchNr: "<xsl:value-of select='stringProp[@name="XPathExtractor.matchNumber"]'/>") |
463 |
<xsl:call-template name="comment"/> |
464 |
</li> |
465 |
</xsl:template> |
466 |
|
467 |
<xsl:template match="HtmlExtractor"> |
468 |
<li> |
469 |
<xsl:call-template name="header"/> |
470 |
<b>using response body</b> |
471 |
(exportedVar: "<xsl:value-of select='stringProp[@name="HtmlExtractor.refname"]'/>", |
472 |
selector: "<xsl:value-of select='stringProp[@name="HtmlExtractor.expr"]'/>", |
473 |
attribute: "<xsl:value-of select='stringProp[@name="HtmlExtractor.attribute"]'/>", |
474 |
default: "<xsl:value-of select='stringProp[@name="HtmlExtractor.default"]'/>", |
475 |
matchNr: "<xsl:value-of select='stringProp[@name="HtmlExtractor.match_number"]'/>") |
476 |
<xsl:call-template name="comment"/> |
477 |
</li> |
478 |
</xsl:template> |
479 |
|
480 |
<xsl:template match="JSONPostProcessor"> |
481 |
<li> |
482 |
<xsl:call-template name="header"/> |
483 |
<b>using response body</b> |
484 |
(exportedVar: "<xsl:value-of select='stringProp[@name="JSONPostProcessor.referenceNames"]'/>", |
485 |
jsonPaths: "<xsl:value-of select='stringProp[@name="JSONPostProcessor.jsonPathExprs"]'/>", |
486 |
default: "<xsl:value-of select='stringProp[@name="JSONPostProcessor.defaultValues"]'/>", |
487 |
matchNr: "<xsl:value-of select='stringProp[@name="JSONPostProcessor.match_numbers"]'/>") |
488 |
<xsl:call-template name="comment"/> |
489 |
</li> |
490 |
</xsl:template> |
491 |
|
492 |
<xsl:template match="BoundaryExtractor"> |
493 |
<li> |
494 |
<xsl:call-template name="header"/> |
495 |
<b><xsl:value-of select='jmeter:showScope(stringProp[@name="BoundaryExtractor.useHeaders"])'/></b> |
496 |
(exportedVar: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.refname"]'/>", |
497 |
lboundary: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.lboundary"]'/>", |
498 |
rboundary: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.rboundary"]'/>", |
499 |
default: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.default"]'/>", |
500 |
matchNr: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.match_number"]'/>") |
501 |
<xsl:call-template name="comment"/> |
502 |
</li> |
503 |
</xsl:template> |
504 |
|
505 |
<xsl:template match="RegexExtractor"> |
506 |
<li> |
507 |
<xsl:call-template name="header"/> |
508 |
<b><xsl:value-of select='jmeter:showScope(stringProp[@name="RegexExtractor.useHeaders"])'/></b> |
509 |
(exportedVar: "<xsl:value-of select='stringProp[@name="RegexExtractor.refname"]'/>" |
510 |
regex: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.regex"]'/>", |
511 |
template: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.template"]'/>", |
512 |
default: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.default"]'/>", |
513 |
matchNr: "<xsl:value-of select='stringProp[@name="BoundaryExtractor.match_number"]'/>") |
514 |
<xsl:call-template name="comment"/> |
515 |
</li> |
516 |
</xsl:template> |
517 |
|
518 |
<xsl:template match="ConstantTimer"> |
519 |
<li> |
520 |
<xsl:call-template name="header"/> |
521 |
(const:<xsl:value-of select='stringProp[@name="ConstantTimer.delay"]'/>ms) |
522 |
<xsl:call-template name="comment"/> |
523 |
</li> |
524 |
</xsl:template> |
525 |
|
526 |
<xsl:template match="UniformRandomTimer|GaussianRandomTimer|PoissonRandomTimer"> |
527 |
<li> |
528 |
<xsl:call-template name="header"/> |
529 |
(const:<xsl:value-of select='stringProp[@name="ConstantTimer.delay"]'/>ms, |
530 |
variation:<xsl:value-of select='stringProp[@name="RandomTimer.range"]'/>ms) |
531 |
<xsl:call-template name="comment"/> |
532 |
</li> |
533 |
</xsl:template> |
534 |
|
535 |
<xsl:template match="*"> |
536 |
<li> |
537 |
<xsl:call-template name="header"/> |
538 |
<xsl:call-template name="comment"/> |
539 |
</li> |
540 |
</xsl:template> |
541 |
|
542 |
<xsl:template name="comment"> |
543 |
<xsl:if test='stringProp/@name="TestPlan.comments"'> |
544 |
<br/> |
545 |
   Comments: <i style="color:green"> |
546 |
<xsl:value-of select='stringProp[@name="TestPlan.comments"]'/> |
547 |
</i> |
548 |
</xsl:if> |
549 |
</xsl:template> |
550 |
|
551 |
<xsl:template name="header"> |
552 |
<xsl:choose> |
553 |
<xsl:when test="name() = 'GenericController'"> |
554 |
<a> |
555 |
<xsl:attribute name="id"> |
556 |
<xsl:value-of select="@testname"/> |
557 |
</xsl:attribute> |
558 |
<b>container</b></a> |
559 |
</xsl:when> |
560 |
<xsl:when test="name() = 'HTTPSamplerProxy'"> |
561 |
<b>http request</b> |
562 |
</xsl:when> |
563 |
<xsl:when test="name() = 'SetupThreadGroup'"> |
564 |
<b>run before</b> |
565 |
</xsl:when> |
566 |
<xsl:when test="name() = 'ThreadGroup'"> |
567 |
<b>run</b> |
568 |
</xsl:when> |
569 |
<xsl:when test="name() = 'PostThreadGroup'"> |
570 |
<b>run after</b> |
571 |
</xsl:when> |
572 |
<xsl:when test="name() = 'TestFragmentController'"> |
573 |
<b>declare reusable Elements</b> |
574 |
</xsl:when> |
575 |
<xsl:when test="name() = 'ResponseAssertion'"> |
576 |
<b>assert as</b> |
577 |
</xsl:when> |
578 |
<xsl:when test="name() = 'TransactionController'"> |
579 |
<a> |
580 |
<xsl:attribute name="id"> |
581 |
<xsl:value-of select="@testname"/> |
582 |
</xsl:attribute> |
583 |
<b>transaction</b></a> |
584 |
</xsl:when> |
585 |
<xsl:when test="name() = 'ModuleController'"> |
586 |
<b>reuse controller</b> |
587 |
</xsl:when> |
588 |
<xsl:when test="name() = 'UserParameters'"> |
589 |
<b>set variables for thread</b> |
590 |
</xsl:when> |
591 |
<xsl:when test="name() = 'RandomController'"> |
592 |
<a> |
593 |
<xsl:attribute name="id"> |
594 |
<xsl:value-of select="@testname"/> |
595 |
</xsl:attribute> |
596 |
<b>randomly run children</b></a> |
597 |
</xsl:when> |
598 |
<xsl:when test="name() = 'ThroughputController'"> |
599 |
<a> |
600 |
<xsl:attribute name="id"> |
601 |
<xsl:value-of select="@testname"/> |
602 |
</xsl:attribute> |
603 |
<b>run at percentage</b></a> |
604 |
</xsl:when> |
605 |
<xsl:when test="name() = 'IfController'"> |
606 |
<a> |
607 |
<xsl:attribute name="id"> |
608 |
<xsl:value-of select="@testname"/> |
609 |
</xsl:attribute> |
610 |
<b>if</b></a> |
611 |
</xsl:when> |
612 |
<xsl:when test="name() = 'ResultCollector'"> |
613 |
<b>write samples</b> |
614 |
</xsl:when> |
615 |
<xsl:when test="name() = 'ConstantTimer'"> |
616 |
<b>think-time Constant</b> |
617 |
</xsl:when> |
618 |
<xsl:when test="name() = 'UniformRandomTimer' |
619 |
or name() = 'GaussianRandomTimer' |
620 |
or name() = 'PoissonRandomTimer'"> |
621 |
<b>think-time <xsl:value-of select="substring-before(name(),'RandomTimer')" /></b> |
622 |
</xsl:when> |
623 |
<xsl:when test="name() = 'JSR223Sampler'"> |
624 |
<b>jsr223 sampler</b> |
625 |
</xsl:when> |
626 |
<xsl:when test="name() = 'JSR223PreProcessor'"> |
627 |
<b>jsr223 pre-process</b> |
628 |
</xsl:when> |
629 |
<xsl:when test="name() = 'JSR223PostProcessor'"> |
630 |
<b>jsr223 post-process</b> |
631 |
</xsl:when> |
632 |
<xsl:when test="name() = 'CSVDataSet'"> |
633 |
<b>read csv into vars</b> |
634 |
</xsl:when> |
635 |
<xsl:when test="name() = 'HeaderManager'"> |
636 |
<b>add headers</b> |
637 |
</xsl:when> |
638 |
<xsl:when test="name() = 'CookieManager'"> |
639 |
<b>handle cookies</b> |
640 |
</xsl:when> |
641 |
<xsl:when test="name() = 'Arguments'"> |
642 |
<b>globalVars</b> |
643 |
</xsl:when> |
644 |
<xsl:when test="name() = 'TestAction'"> |
645 |
<b>flow control</b> |
646 |
</xsl:when> |
647 |
<xsl:when test="name() = 'ResultAction'"> |
648 |
<b>action after sampler error </b> |
649 |
</xsl:when> |
650 |
<xsl:when test="name() = 'ConfigTestElement' and @guiclass = 'HttpDefaultsGui'"> |
651 |
<b>http defaults</b> |
652 |
</xsl:when> |
653 |
<xsl:when test="name() = 'CacheManager'"> |
654 |
<b>simulate browser cache</b> |
655 |
</xsl:when> |
656 |
<xsl:when test="name() = 'RegexExtractor'"> |
657 |
<b>extract-regexp </b> |
658 |
</xsl:when> |
659 |
<xsl:when test="name() = 'BoundaryExtractor'"> |
660 |
<b>extract-boundary </b> |
661 |
</xsl:when> |
662 |
<xsl:when test="name() = 'HtmlExtractor'"> |
663 |
<b>extract-css-selector </b> |
664 |
</xsl:when> |
665 |
<xsl:when test="name() = 'XPathExtractor'"> |
666 |
<b>extract-xpath </b> |
667 |
</xsl:when> |
668 |
<xsl:when test="name() = 'XPath2Extractor'"> |
669 |
<b>extract-xpath2 </b> |
670 |
</xsl:when> |
671 |
<xsl:when test="name() = 'JSONPostProcessor'"> |
672 |
<b>extract-jsonpath </b> |
673 |
</xsl:when> |
674 |
<xsl:when test="name() = 'TestPlan'"> |
675 |
<b>load test </b> |
676 |
</xsl:when> |
677 |
<xsl:otherwise> |
678 |
<b><xsl:value-of select="name()"/></b> |
679 |
</xsl:otherwise> |
680 |
</xsl:choose> |
681 |
"<xsl:value-of select="@testname"/>" <xsl:call-template name="disabledElement"/> |
682 |
</xsl:template> |
683 |
|
684 |
<xsl:template name="disabledElement"> |
685 |
<xsl:if test="@enabled = 'false'"> |
686 |
<del>(disabled)</del>  |
687 |
</xsl:if> |
688 |
</xsl:template> |
689 |
</xsl:stylesheet> |