|
@@ -0,0 +1,237 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.1.1 r1855137">
|
|
|
+ <hashTree>
|
|
|
+ <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="weather.com接口测试" enabled="true">
|
|
|
+ <stringProp name="TestPlan.comments"></stringProp>
|
|
|
+ <boolProp name="TestPlan.functional_mode">false</boolProp>
|
|
|
+ <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
|
|
|
+ <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="TestPlan.user_define_classpath"></stringProp>
|
|
|
+ </TestPlan>
|
|
|
+ <hashTree>
|
|
|
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
|
|
|
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
|
|
|
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
|
|
+ <boolProp name="LoopController.continue_forever">false</boolProp>
|
|
|
+ <stringProp name="LoopController.loops">1</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
|
|
|
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
|
|
|
+ <longProp name="ThreadGroup.start_time">1414075768000</longProp>
|
|
|
+ <longProp name="ThreadGroup.end_time">1414075768000</longProp>
|
|
|
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
|
|
|
+ <stringProp name="ThreadGroup.duration"></stringProp>
|
|
|
+ <stringProp name="ThreadGroup.delay"></stringProp>
|
|
|
+ </ThreadGroup>
|
|
|
+ <hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetCityCode" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">toy1.weather.com.cn</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/search?cityname=${city}</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>
|
|
|
+ <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
|
|
|
+ <collectionProp name="HeaderManager.headers">
|
|
|
+ <elementProp name="" elementType="Header">
|
|
|
+ <stringProp name="Header.name">Referer</stringProp>
|
|
|
+ <stringProp name="Header.value">http://www.weather.com.cn</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </HeaderManager>
|
|
|
+ <hashTree/>
|
|
|
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
|
|
|
+ <collectionProp name="Asserion.test_strings">
|
|
|
+ <stringProp name="1206451707">${city}</stringProp>
|
|
|
+ </collectionProp>
|
|
|
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
|
|
|
+ <boolProp name="Assertion.assume_success">false</boolProp>
|
|
|
+ <intProp name="Assertion.test_type">16</intProp>
|
|
|
+ <stringProp name="Assertion.custom_message"></stringProp>
|
|
|
+ </ResponseAssertion>
|
|
|
+ <hashTree/>
|
|
|
+ <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true">
|
|
|
+ <stringProp name="RegexExtractor.useHeaders">false</stringProp>
|
|
|
+ <stringProp name="RegexExtractor.refname">citycode</stringProp>
|
|
|
+ <stringProp name="RegexExtractor.regex">(\d{9}?)~.*?~${city}</stringProp>
|
|
|
+ <stringProp name="RegexExtractor.template">$1$</stringProp>
|
|
|
+ <stringProp name="RegexExtractor.default"></stringProp>
|
|
|
+ <stringProp name="RegexExtractor.match_number">0</stringProp>
|
|
|
+ </RegexExtractor>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GetWeather" enabled="true">
|
|
|
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments"/>
|
|
|
+ </elementProp>
|
|
|
+ <stringProp name="HTTPSampler.domain">www.weather.com.cn</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.port"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.protocol">http</stringProp>
|
|
|
+ <stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
|
|
+ <stringProp name="HTTPSampler.path">/weather2d/${citycode}.shtml</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/>
|
|
|
+ <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" 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>
|
|
|
+ <objProp>
|
|
|
+ <name></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>false</fieldNames>
|
|
|
+ <responseHeaders>false</responseHeaders>
|
|
|
+ <requestHeaders>false</requestHeaders>
|
|
|
+ <responseDataOnError>false</responseDataOnError>
|
|
|
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
|
|
+ <assertionsResultsToSave>0</assertionsResultsToSave>
|
|
|
+ <bytes>true</bytes>
|
|
|
+ </value>
|
|
|
+ </objProp>
|
|
|
+ <stringProp name="filename"></stringProp>
|
|
|
+ </ResultCollector>
|
|
|
+ <hashTree/>
|
|
|
+ <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Results" 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>
|
|
|
+ <objProp>
|
|
|
+ <name></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>false</fieldNames>
|
|
|
+ <responseHeaders>false</responseHeaders>
|
|
|
+ <requestHeaders>false</requestHeaders>
|
|
|
+ <responseDataOnError>false</responseDataOnError>
|
|
|
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
|
|
|
+ <assertionsResultsToSave>0</assertionsResultsToSave>
|
|
|
+ <bytes>true</bytes>
|
|
|
+ </value>
|
|
|
+ </objProp>
|
|
|
+ <stringProp name="filename"></stringProp>
|
|
|
+ </ResultCollector>
|
|
|
+ <hashTree/>
|
|
|
+ <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
|
|
|
+ <collectionProp name="Arguments.arguments">
|
|
|
+ <elementProp name="city" elementType="Argument">
|
|
|
+ <stringProp name="Argument.name">city</stringProp>
|
|
|
+ <stringProp name="Argument.value">北京</stringProp>
|
|
|
+ <stringProp name="Argument.metadata">=</stringProp>
|
|
|
+ </elementProp>
|
|
|
+ </collectionProp>
|
|
|
+ </Arguments>
|
|
|
+ <hashTree/>
|
|
|
+ </hashTree>
|
|
|
+ </hashTree>
|
|
|
+ </hashTree>
|
|
|
+</jmeterTestPlan>
|