Sync from bytedesk-private: Update visitor_flow_test.jmx

This commit is contained in:
jack ning
2024-12-24 16:27:50 +08:00
parent e5a67af4d2
commit 6095d52480

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.5">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Visitor Flow Test Plan">
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments">
@@ -14,44 +14,75 @@
</elementProp>
</collectionProp>
</elementProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Single Visitor Flow">
<elementProp name="ThreadGroup.main_controller" elementType="LoopController">
<boolProp name="LoopController.continue_forever">false</boolProp>
<intProp name="ThreadGroup.num_threads">1</intProp>
<intProp name="ThreadGroup.ramp_time">1</intProp>
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController">
<stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Init Visitor">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<stringProp name="HTTPSampler.domain">${HOST}</stringProp>
<stringProp name="HTTPSampler.port">${PORT}</stringProp>
<stringProp name="HTTPSampler.protocol">http</stringProp>
<stringProp name="HTTPSampler.path">/visitor/api/v1/init</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量">
<collectionProp name="Arguments.arguments">
<elementProp name="sid" elementType="HTTPArgument">
<stringProp name="Argument.name">sid</stringProp>
<stringProp name="Argument.value">df_ag_uid</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="nickname" elementType="HTTPArgument">
<stringProp name="Argument.name">nickname</stringProp>
<stringProp name="Argument.value">Test Visitor</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="uid" elementType="HTTPArgument">
<stringProp name="Argument.name">uid</stringProp>
<stringProp name="Argument.value">visitor_test_uid</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="orgUid" elementType="HTTPArgument">
<stringProp name="Argument.name">orgUid</stringProp>
<stringProp name="Argument.value">df_org_uid</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="type" elementType="HTTPArgument">
<stringProp name="Argument.name">type</stringProp>
<stringProp name="Argument.value">0</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="client" elementType="HTTPArgument">
<stringProp name="Argument.name">client</stringProp>
<stringProp name="Argument.value">TEST</stringProp>
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.path">/visitor/api/v1/init</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager">
@@ -75,7 +106,7 @@
</collectionProp>
</HeaderManager>
<hashTree/>
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor">
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
<stringProp name="JSONPostProcessor.referenceNames">visitorUid;visitorNickname;visitorAvatar</stringProp>
<stringProp name="JSONPostProcessor.jsonPathExprs">$.uid;$.nickname;$.avatar</stringProp>
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
@@ -83,28 +114,30 @@
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Request Thread">
<stringProp name="HTTPSampler.path">/visitor/api/v1/request</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<stringProp name="Argument.value">{
"sid": "df_ag_uid",
"uid": "${visitorUid}",
"nickname": "${visitorNickname}",
"avatar": "${visitorAvatar}",
"orgUid": "df_org_uid",
"type": "0",
"client": "TEST"
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&#xd;
&quot;sid&quot;: &quot;df_ag_uid&quot;,&#xd;
&quot;uid&quot;: &quot;${visitorUid}&quot;,&#xd;
&quot;nickname&quot;: &quot;${visitorNickname}&quot;,&#xd;
&quot;avatar&quot;: &quot;${visitorAvatar}&quot;,&#xd;
&quot;orgUid&quot;: &quot;df_org_uid&quot;,&#xd;
&quot;type&quot;: &quot;0&quot;,&#xd;
&quot;client&quot;: &quot;TEST&quot;&#xd;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.path">/visitor/api/v1/request</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan>
</jmeterTestPlan>