This commit is contained in:
2021-10-22 18:16:25 +00:00
parent 53048872a4
commit 6627254784

View File

@@ -61,7 +61,7 @@
<collectionProp name="Arguments.arguments"> <collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument"> <elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp> <boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;login&quot;:&quot;loadtest0&quot;,&quot;password&quot;:&quot;loadtest0&quot;}</stringProp> <stringProp name="Argument.value">{&quot;login&quot;:&quot;xloadtest1&quot;,&quot;password&quot;:&quot;loadtest1&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp> <stringProp name="Argument.metadata">=</stringProp>
</elementProp> </elementProp>
</collectionProp> </collectionProp>
@@ -130,11 +130,33 @@
</collectionProp> </collectionProp>
</HeaderManager> </HeaderManager>
<hashTree/> <hashTree/>
<ResultAction guiclass="ResultActionGui" testclass="ResultAction" testname="Stop thread if load test users already exist" enabled="true"> <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
<intProp name="OnError.action">1</intProp> <collectionProp name="Asserion.test_strings">
</ResultAction> <stringProp name="51509">401</stringProp>
</collectionProp>
<stringProp name="Assertion.custom_message"></stringProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
<boolProp name="Assertion.assume_success">true</boolProp>
<intProp name="Assertion.test_type">8</intProp>
<stringProp name="Assertion.scope">variable</stringProp>
<stringProp name="Scope.variable"></stringProp>
</ResponseAssertion>
<hashTree/>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="extract if test user login successful to variable" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">TESTUSEREXISTSBEARERTOKEN</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">data.token</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
<stringProp name="Scope.variable">JToken</stringProp>
<stringProp name="TestPlan.comments">keep in case go this way with if condition</stringProp>
</JSONPostProcessor>
<hashTree/> <hashTree/>
</hashTree> </hashTree>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="If test user could not login" enabled="true">
<stringProp name="IfController.condition">${JMeterThread.last_sample_ok}==false</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
<boolProp name="IfController.useExpression">true</boolProp>
</IfController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SuperUser login to create test users" enabled="true"> <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SuperUser login to create test users" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp> <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments"> <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
@@ -217,13 +239,6 @@
<stringProp name="Scope.variable">JToken</stringProp> <stringProp name="Scope.variable">JToken</stringProp>
</JSONPostProcessor> </JSONPostProcessor>
<hashTree/> <hashTree/>
</hashTree>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree/>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Auth" enabled="true"> <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Auth" enabled="true">
<collectionProp name="HeaderManager.headers"> <collectionProp name="HeaderManager.headers">
<elementProp name="Accept" elementType="Header"> <elementProp name="Accept" elementType="Header">
@@ -241,9 +256,10 @@
</collectionProp> </collectionProp>
</HeaderManager> </HeaderManager>
<hashTree/> <hashTree/>
</hashTree>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop and create test users" enabled="true"> <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop and create test users" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp> <boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">100</stringProp> <stringProp name="LoopController.loops">2</stringProp>
</LoopController> </LoopController>
<hashTree> <hashTree>
<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter to generate user login names" enabled="true"> <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter to generate user login names" enabled="true">
@@ -283,6 +299,7 @@
<hashTree/> <hashTree/>
</hashTree> </hashTree>
</hashTree> </hashTree>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Login and test threadgroup" enabled="true"> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Login and test threadgroup" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">stoptestnow</stringProp> <stringProp name="ThreadGroup.on_sample_error">stoptestnow</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">