mirror of
https://gitee.com/270580156/weiyu.git
synced 2025-12-30 02:42:25 +00:00
262 lines
14 KiB
XML
262 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
|
|
<hashTree>
|
|
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Bytedesk Quick Login Test" enabled="true">
|
|
<stringProp name="TestPlan.comments">Bytedesk快速登录功能验证测试</stringProp>
|
|
<boolProp name="TestPlan.functional_mode">false</boolProp>
|
|
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp>
|
|
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
|
<elementProp name="TestPlan.arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="host" elementType="Argument">
|
|
<stringProp name="Argument.name">host</stringProp>
|
|
<stringProp name="Argument.value">localhost</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="port" elementType="Argument">
|
|
<stringProp name="Argument.name">port</stringProp>
|
|
<stringProp name="Argument.value">9003</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
<elementProp name="protocol" elementType="Argument">
|
|
<stringProp name="Argument.name">protocol</stringProp>
|
|
<stringProp name="Argument.value">http</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="TestPlan.user_define_classpath"></stringProp>
|
|
</TestPlan>
|
|
<hashTree>
|
|
<!-- HTTP请求默认值 -->
|
|
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP请求默认值" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain">${host}</stringProp>
|
|
<stringProp name="HTTPSampler.port">${port}</stringProp>
|
|
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
|
|
<stringProp name="HTTPSampler.path"></stringProp>
|
|
<stringProp name="HTTPSampler.concurrentPool">6</stringProp>
|
|
<stringProp name="HTTPSampler.connect_timeout">5000</stringProp>
|
|
<stringProp name="HTTPSampler.response_timeout">30000</stringProp>
|
|
</ConfigTestElement>
|
|
<hashTree/>
|
|
|
|
<!-- HTTP头管理器 -->
|
|
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP头管理器" enabled="true">
|
|
<collectionProp name="HeaderManager.headers">
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">Content-Type</stringProp>
|
|
<stringProp name="Header.value">application/json;charset=UTF-8</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">Accept</stringProp>
|
|
<stringProp name="Header.value">application/json</stringProp>
|
|
</elementProp>
|
|
<elementProp name="" elementType="Header">
|
|
<stringProp name="Header.name">User-Agent</stringProp>
|
|
<stringProp name="Header.value">JMeter/5.6.3</stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</HeaderManager>
|
|
<hashTree/>
|
|
|
|
<!-- 快速验证测试线程组 -->
|
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="快速验证测试" enabled="true">
|
|
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
|
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true">
|
|
<boolProp name="LoopController.continue_forever">false</boolProp>
|
|
<stringProp name="LoopController.loops">1</stringProp>
|
|
</elementProp>
|
|
<stringProp name="ThreadGroup.num_threads">5</stringProp>
|
|
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
|
<boolProp name="ThreadGroup.scheduler">false</boolProp>
|
|
<stringProp name="ThreadGroup.duration"></stringProp>
|
|
<stringProp name="ThreadGroup.delay"></stringProp>
|
|
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
|
|
</ThreadGroup>
|
|
<hashTree>
|
|
<!-- 获取验证码 -->
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="获取验证码" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
|
|
<collectionProp name="Arguments.arguments"/>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/kaptcha/api/v1/get</stringProp>
|
|
<stringProp name="HTTPSampler.method">GET</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>
|
|
<!-- JSON提取器 -->
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="提取验证码信息" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">captchaUid,captchaImage</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.data.captchaUid,$.data.captchaImage</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues"></stringProp>
|
|
<boolProp name="JSONPostProcessor.compute_concat">false</boolProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
|
|
<!-- 用户名密码登录 -->
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="用户名密码登录" enabled="true">
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
|
|
<collectionProp name="Arguments.arguments">
|
|
<elementProp name="" elementType="HTTPArgument">
|
|
<boolProp name="HTTPArgument.always_encode">false</boolProp>
|
|
<stringProp name="Argument.value">{
|
|
"username": "admin",
|
|
"password": "admin123",
|
|
"captchaUid": "${captchaUid}",
|
|
"captchaCode": "1234",
|
|
"platform": "BYTEDESK",
|
|
"channel": "WEB",
|
|
"device": "JMeter Quick Test"
|
|
}</stringProp>
|
|
<stringProp name="Argument.metadata">=</stringProp>
|
|
<boolProp name="HTTPArgument.use_equals">true</boolProp>
|
|
<stringProp name="Argument.name"></stringProp>
|
|
</elementProp>
|
|
</collectionProp>
|
|
</elementProp>
|
|
<stringProp name="HTTPSampler.domain"></stringProp>
|
|
<stringProp name="HTTPSampler.port"></stringProp>
|
|
<stringProp name="HTTPSampler.protocol"></stringProp>
|
|
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
<stringProp name="HTTPSampler.path">/auth/v1/login</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>
|
|
<!-- JSON提取器 - 提取token -->
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="提取登录token" enabled="true">
|
|
<stringProp name="JSONPostProcessor.referenceNames">accessToken,refreshToken</stringProp>
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$.data.accessToken,$.data.refreshToken</stringProp>
|
|
<stringProp name="JSONPostProcessor.match_numbers"></stringProp>
|
|
<stringProp name="JSONPostProcessor.defaultValues"></stringProp>
|
|
<boolProp name="JSONPostProcessor.compute_concat">false</boolProp>
|
|
</JSONPostProcessor>
|
|
<hashTree/>
|
|
</hashTree>
|
|
</hashTree>
|
|
|
|
<!-- 监听器 -->
|
|
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="察看结果树" enabled="true">
|
|
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
|
<objProp>
|
|
<name>saveConfig</name>
|
|
<value class="SampleSaveConfiguration">
|
|
<time>true</time>
|
|
<latency>true</latency>
|
|
<timestamp>true</timestamp>
|
|
<success>true</success>
|
|
<label>true</label>
|
|
<code>true</code>
|
|
<message>true</message>
|
|
<threadName>true</threadName>
|
|
<dataType>true</dataType>
|
|
<encoding>false</encoding>
|
|
<assertions>true</assertions>
|
|
<subresults>true</subresults>
|
|
<responseData>true</responseData>
|
|
<samplerData>true</samplerData>
|
|
<xml>false</xml>
|
|
<fieldNames>true</fieldNames>
|
|
<responseHeaders>true</responseHeaders>
|
|
<requestHeaders>true</requestHeaders>
|
|
<responseDataOnError>true</responseDataOnError>
|
|
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
|
<assertionsResultsToSave>0</assertionsResultsToSave>
|
|
<bytes>true</bytes>
|
|
<sentBytes>true</sentBytes>
|
|
<url>true</url>
|
|
<threadCounts>true</threadCounts>
|
|
<idleTime>true</idleTime>
|
|
<connectTime>true</connectTime>
|
|
</value>
|
|
</objProp>
|
|
<stringProp name="filename"></stringProp>
|
|
</ResultCollector>
|
|
<hashTree/>
|
|
|
|
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="聚合报告" enabled="true">
|
|
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
|
<objProp>
|
|
<name>saveConfig</name>
|
|
<value class="SampleSaveConfiguration">
|
|
<time>true</time>
|
|
<latency>true</latency>
|
|
<timestamp>true</timestamp>
|
|
<success>true</success>
|
|
<label>true</label>
|
|
<code>true</code>
|
|
<message>true</message>
|
|
<threadName>true</threadName>
|
|
<dataType>true</dataType>
|
|
<encoding>false</encoding>
|
|
<assertions>true</assertions>
|
|
<subresults>true</subresults>
|
|
<responseData>false</responseData>
|
|
<samplerData>false</samplerData>
|
|
<xml>false</xml>
|
|
<fieldNames>true</fieldNames>
|
|
<responseHeaders>false</responseHeaders>
|
|
<requestHeaders>false</requestHeaders>
|
|
<responseDataOnError>false</responseDataOnError>
|
|
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
|
|
<assertionsResultsToSave>0</assertionsResultsToSave>
|
|
<bytes>true</bytes>
|
|
<sentBytes>true</sentBytes>
|
|
<url>true</url>
|
|
<threadCounts>true</threadCounts>
|
|
<idleTime>true</idleTime>
|
|
<connectTime>true</connectTime>
|
|
</value>
|
|
</objProp>
|
|
<stringProp name="filename"></stringProp>
|
|
</ResultCollector>
|
|
<hashTree/>
|
|
|
|
<!-- 响应断言 -->
|
|
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true">
|
|
<collectionProp name="Asserion.test_strings">
|
|
<stringProp name="49586">200</stringProp>
|
|
</collectionProp>
|
|
<stringProp name="Assertion.custom_message"></stringProp>
|
|
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
|
|
<boolProp name="Assertion.assume_success">false</boolProp>
|
|
<intProp name="Assertion.test_type">8</intProp>
|
|
</ResponseAssertion>
|
|
<hashTree/>
|
|
|
|
<!-- JSON断言 -->
|
|
<JSONPathAssertion guiclass="JSONPathAssertionGui" testclass="JSONPathAssertion" testname="JSON断言" enabled="true">
|
|
<stringProp name="JSON_PATH">$.success</stringProp>
|
|
<stringProp name="EXPECTED_VALUE">true</stringProp>
|
|
<boolProp name="JSONVALIDATION">true</boolProp>
|
|
<boolProp name="EXPECT_NULL">false</boolProp>
|
|
<boolProp name="INVERT">false</boolProp>
|
|
<boolProp name="ISREGEX">false</boolProp>
|
|
</JSONPathAssertion>
|
|
<hashTree/>
|
|
|
|
</hashTree>
|
|
</hashTree>
|
|
</jmeterTestPlan> |