Skip to content

Commit 676037d

Browse files
author
admin
committed
fix jmeter vars parse
1 parent ae15f9c commit 676037d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

app/jmeter/bitbucket.jmx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ log.info("GIT_LOG_DIR: " + gitLogDir);
254254
</JSR223PreProcessor>
255255
<hashTree/>
256256
</hashTree>
257-
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="if_os_is_not_windows">
257+
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="if_os_is_not_windows" enabled="true">
258258
<stringProp name="IfController.condition">${__BeanShell(import org.apache.commons.lang3.SystemUtils; !SystemUtils.IS_OS_WINDOWS;)}</stringProp>
259259
<boolProp name="IfController.evaluateAll">false</boolProp>
260260
<boolProp name="IfController.useExpression">true</boolProp>
@@ -303,9 +303,9 @@ else{
303303
<hashTree/>
304304
</hashTree>
305305
</hashTree>
306-
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="add_ssh_key_on_bitbucket"/>
306+
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="add_ssh_key_on_bitbucket" enabled="true"/>
307307
<hashTree>
308-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="10 login.action">
308+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="10 login.action" enabled="true">
309309
<stringProp name="TestPlan.comments">Detected the start of a redirect chain</stringProp>
310310
<stringProp name="HTTPSampler.path">${application.postfix}/login</stringProp>
311311
<stringProp name="HTTPSampler.method">GET</stringProp>
@@ -351,7 +351,7 @@ else{
351351
<intProp name="Assertion.test_type">2</intProp>
352352
</ResponseAssertion>
353353
<hashTree/>
354-
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="legacy login form check">
354+
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="legacy login form check" enabled="true">
355355
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
356356
<stringProp name="RegexExtractor.refname">j_username</stringProp>
357357
<stringProp name="RegexExtractor.regex">j_username</stringProp>
@@ -363,18 +363,18 @@ else{
363363
<boolProp name="RegexExtractor.default_empty_value">false</boolProp>
364364
</RegexExtractor>
365365
<hashTree/>
366-
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="set legacy form type">
366+
<JSR223PostProcessor guiclass="TestBeanGUI" testclass="JSR223PostProcessor" testname="set legacy form type" enabled="true">
367367
<stringProp name="scriptLanguage">groovy</stringProp>
368368
<stringProp name="parameters"></stringProp>
369369
<stringProp name="filename"></stringProp>
370370
<stringProp name="cacheKey">true</stringProp>
371-
<stringProp name="script">String loginform = vars.get(&quot;loginform&quot;);
371+
<stringProp name="script">String loginform = vars.get(&quot;j_username&quot;);
372372

373373
if (&quot;NOT_FOUND&quot;.equals(loginform)) {
374-
vars.put(&quot;legacy_login_form&quot;, &quot;true&quot;);
374+
vars.put(&quot;legacy_login_form&quot;, &quot;false&quot;);
375375
log.info(&quot;legacy login flow detected&quot;);
376376
} else {
377-
vars.put(&quot;legacy_login_form&quot;, &quot;false&quot;);
377+
vars.put(&quot;legacy_login_form&quot;, &quot;true&quot;);
378378
log.info(&quot;2SVlogin flow detected&quot;);
379379
}
380380
</stringProp>
@@ -390,13 +390,13 @@ if (&quot;NOT_FOUND&quot;.equals(loginform)) {
390390
</JSR223PostProcessor>
391391
<hashTree/>
392392
</hashTree>
393-
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="if 2sv login flow">
393+
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="if 2sv login flow" enabled="true">
394394
<stringProp name="IfController.condition">${__groovy(vars.get(&quot;legacy_login_form&quot;) == &apos;false&apos;)}</stringProp>
395395
<boolProp name="IfController.evaluateAll">false</boolProp>
396396
<boolProp name="IfController.useExpression">true</boolProp>
397397
</IfController>
398398
<hashTree>
399-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="15 /rest/tsv/1.0/authenticate">
399+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="15 /rest/tsv/1.0/authenticate" enabled="true">
400400
<stringProp name="TestPlan.comments">2sv login flow</stringProp>
401401
<stringProp name="HTTPSampler.path">${application.postfix}/rest/tsv/1.0/authenticate</stringProp>
402402
<stringProp name="HTTPSampler.method">POST</stringProp>
@@ -438,13 +438,13 @@ if (&quot;NOT_FOUND&quot;.equals(loginform)) {
438438
<hashTree/>
439439
</hashTree>
440440
</hashTree>
441-
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If legacy login flow">
441+
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If legacy login flow" enabled="true">
442442
<stringProp name="IfController.condition">${__groovy(vars.get(&quot;legacy_login_form&quot;) == &apos;true&apos;)}</stringProp>
443443
<boolProp name="IfController.evaluateAll">false</boolProp>
444444
<boolProp name="IfController.useExpression">true</boolProp>
445445
</IfController>
446446
<hashTree>
447-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="login_admin">
447+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="login_admin" enabled="true">
448448
<stringProp name="HTTPSampler.path">${application.postfix}/login</stringProp>
449449
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
450450
<stringProp name="HTTPSampler.method">POST</stringProp>
@@ -470,7 +470,7 @@ if (&quot;NOT_FOUND&quot;.equals(loginform)) {
470470
</elementProp>
471471
</HTTPSamplerProxy>
472472
<hashTree>
473-
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion">
473+
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
474474
<collectionProp name="Asserion.test_strings">
475475
<stringProp name="49586">200</stringProp>
476476
</collectionProp>
@@ -482,7 +482,7 @@ if (&quot;NOT_FOUND&quot;.equals(loginform)) {
482482
<hashTree/>
483483
</hashTree>
484484
</hashTree>
485-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="get_all_ssh_keys_from_bitbucket">
485+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="get_all_ssh_keys_from_bitbucket" enabled="true">
486486
<stringProp name="HTTPSampler.path">${application.postfix}/rest/ssh/1.0/keys</stringProp>
487487
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
488488
<stringProp name="HTTPSampler.method">GET</stringProp>
@@ -514,7 +514,7 @@ vars.put(&quot;SERVER_SSH_KEYS&quot;, result.join(&quot;::&quot;));
514514
</JSR223PostProcessor>
515515
<hashTree/>
516516
</hashTree>
517-
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="read_user_pub_ssh_key_file">
517+
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="read_user_pub_ssh_key_file" enabled="true">
518518
<stringProp name="scriptLanguage">groovy</stringProp>
519519
<stringProp name="parameters"></stringProp>
520520
<stringProp name="filename"></stringProp>
@@ -648,7 +648,7 @@ else{
648648
<stringProp name="shareMode">shareMode.all</stringProp>
649649
</CSVDataSet>
650650
<hashTree/>
651-
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="full_repository_clone_and_push"/>
651+
<GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="full_repository_clone_and_push" enabled="true"/>
652652
<hashTree>
653653
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="set_up_random_variables" enabled="true">
654654
<stringProp name="scriptLanguage">groovy</stringProp>

0 commit comments

Comments
 (0)