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">
<elementProp name="" elementType="HTTPArgument">
<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>
</elementProp>
</collectionProp>
@@ -130,138 +130,40 @@
</collectionProp>
</HeaderManager>
<hashTree/>
<ResultAction guiclass="ResultActionGui" testclass="ResultAction" testname="Stop thread if load test users already exist" enabled="true">
<intProp name="OnError.action">1</intProp>
</ResultAction>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SuperUser login to create test users" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;login&quot;:&quot;superuser&quot;,&quot;password&quot;:&quot;l3tm3in&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="51509">401</stringProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port">443</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/api/v8.0/auth</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Referer" elementType="Header">
<stringProp name="Header.name">Referer</stringProp>
<stringProp name="Header.value">${scheme}://test.helloayanova.com/login</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-origin</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">en-US,en;q=0.9,fr-CA;q=0.7,de;q=0.6,en-AU;q=0.4,ar-EG;q=0.3,fr-FR;q=0.1</stringProp>
</elementProp>
<elementProp name="Origin" elementType="Header">
<stringProp name="Header.name">Origin</stringProp>
<stringProp name="Header.value">${scheme}://test.helloayanova.com</stringProp>
</elementProp>
<elementProp name="DNT" elementType="Header">
<stringProp name="Header.name">DNT</stringProp>
<stringProp name="Header.value">1</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Content-Type" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<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="JSON bearer token extraction" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">JToken</stringProp>
<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>
<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">
<collectionProp name="HeaderManager.headers">
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Authorization" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value">Bearer ${JToken}</stringProp>
</elementProp>
<elementProp name="Content-Type" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop and create test users" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">100</stringProp>
</LoopController>
<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>
<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter to generate user login names" enabled="true">
<stringProp name="CounterConfig.start">0</stringProp>
<stringProp name="CounterConfig.end"></stringProp>
<stringProp name="CounterConfig.incr">1</stringProp>
<stringProp name="CounterConfig.name">createuserloopcount</stringProp>
<stringProp name="CounterConfig.format"></stringProp>
<boolProp name="CounterConfig.per_user">false</boolProp>
</CounterConfig>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create users" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SuperUser login to create test users" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;id&quot;:0,&quot;concurrency&quot;:0,&quot;active&quot;:true,&quot;name&quot;:&quot;loadtest${createuserloopcount}&quot;,&quot;roles&quot;:49514,&quot;userType&quot;:1,&quot;employeeNumber&quot;:null,&quot;notes&quot;:null,&quot;customerId&quot;:null,&quot;headOfficeId&quot;:null,&quot;vendorId&quot;:null,&quot;wiki&quot;:null,&quot;customFields&quot;:&quot;{}&quot;,&quot;tags&quot;:[],&quot;lastLogin&quot;:null,&quot;password&quot;:&quot;loadtest${createuserloopcount}&quot;,&quot;login&quot;:&quot;loadtest${createuserloopcount}&quot;}</stringProp>
<stringProp name="Argument.value">{&quot;login&quot;:&quot;superuser&quot;,&quot;password&quot;:&quot;l3tm3in&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
@@ -270,7 +172,7 @@
<stringProp name="HTTPSampler.port">443</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/api/v8.0/user/</stringProp>
<stringProp name="HTTPSampler.path">/api/v8.0/auth</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@@ -280,7 +182,122 @@
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Sec-Fetch-Mode" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Mode</stringProp>
<stringProp name="Header.value">cors</stringProp>
</elementProp>
<elementProp name="Referer" elementType="Header">
<stringProp name="Header.name">Referer</stringProp>
<stringProp name="Header.value">${scheme}://test.helloayanova.com/login</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Site" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Site</stringProp>
<stringProp name="Header.value">same-origin</stringProp>
</elementProp>
<elementProp name="Accept-Language" elementType="Header">
<stringProp name="Header.name">Accept-Language</stringProp>
<stringProp name="Header.value">en-US,en;q=0.9,fr-CA;q=0.7,de;q=0.6,en-AU;q=0.4,ar-EG;q=0.3,fr-FR;q=0.1</stringProp>
</elementProp>
<elementProp name="Origin" elementType="Header">
<stringProp name="Header.name">Origin</stringProp>
<stringProp name="Header.value">${scheme}://test.helloayanova.com</stringProp>
</elementProp>
<elementProp name="DNT" elementType="Header">
<stringProp name="Header.name">DNT</stringProp>
<stringProp name="Header.value">1</stringProp>
</elementProp>
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Content-Type" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Accept-Encoding" elementType="Header">
<stringProp name="Header.name">Accept-Encoding</stringProp>
<stringProp name="Header.value">gzip, deflate, br</stringProp>
</elementProp>
<elementProp name="User-Agent" elementType="Header">
<stringProp name="Header.name">User-Agent</stringProp>
<stringProp name="Header.value">Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0</stringProp>
</elementProp>
<elementProp name="Sec-Fetch-Dest" elementType="Header">
<stringProp name="Header.name">Sec-Fetch-Dest</stringProp>
<stringProp name="Header.value">empty</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON bearer token extraction" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">JToken</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">data.token</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
<stringProp name="Scope.variable">JToken</stringProp>
</JSONPostProcessor>
<hashTree/>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Set Auth" enabled="true">
<collectionProp name="HeaderManager.headers">
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
<elementProp name="Authorization" elementType="Header">
<stringProp name="Header.name">Authorization</stringProp>
<stringProp name="Header.value">Bearer ${JToken}</stringProp>
</elementProp>
<elementProp name="Content-Type" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/json</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
</hashTree>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop and create test users" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">2</stringProp>
</LoopController>
<hashTree>
<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter to generate user login names" enabled="true">
<stringProp name="CounterConfig.start">0</stringProp>
<stringProp name="CounterConfig.end"></stringProp>
<stringProp name="CounterConfig.incr">1</stringProp>
<stringProp name="CounterConfig.name">createuserloopcount</stringProp>
<stringProp name="CounterConfig.format"></stringProp>
<boolProp name="CounterConfig.per_user">false</boolProp>
</CounterConfig>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Create users" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;id&quot;:0,&quot;concurrency&quot;:0,&quot;active&quot;:true,&quot;name&quot;:&quot;loadtest${createuserloopcount}&quot;,&quot;roles&quot;:49514,&quot;userType&quot;:1,&quot;employeeNumber&quot;:null,&quot;notes&quot;:null,&quot;customerId&quot;:null,&quot;headOfficeId&quot;:null,&quot;vendorId&quot;:null,&quot;wiki&quot;:null,&quot;customFields&quot;:&quot;{}&quot;,&quot;tags&quot;:[],&quot;lastLogin&quot;:null,&quot;password&quot;:&quot;loadtest${createuserloopcount}&quot;,&quot;login&quot;:&quot;loadtest${createuserloopcount}&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port">443</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/api/v8.0/user/</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Login and test threadgroup" enabled="true">