Jmeter使用入门

发布时间:2020-04-27 11:58:14 作者:yushiwh
来源:网络 阅读:1284

<jmeterTestPlan version="1.2" properties="1.8">

<hashTree>

<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test" enabled="true">

<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">

<collectionProp name="Arguments.arguments"/>

</elementProp>

<stringProp name="TestPlan.user_define_classpath"></stringProp>

<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>

<boolProp name="TestPlan.functional_mode">false</boolProp>

<stringProp name="TestPlan.comments">Sample test for demonstrating JMeter Ant build script and Schematic stylesheet</stringProp>

</TestPlan>

<hashTree>

<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">

<longProp name="ThreadGroup.start_time">1143889321000</longProp>

<stringProp name="ThreadGroup.delay"></stringProp>

<stringProp name="ThreadGroup.duration"></stringProp>

<stringProp name="ThreadGroup.num_threads">3</stringProp>

<boolProp name="ThreadGroup.scheduler">false</boolProp>

<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">

<stringProp name="LoopController.loops">5</stringProp>

<boolProp name="LoopController.continue_forever">false</boolProp>

</elementProp>

<longProp name="ThreadGroup.end_time">1143889321000</longProp>

<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>

<stringProp name="ThreadGroup.ramp_time">1</stringProp>

</ThreadGroup>

<hashTree>

<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="Counter" enabled="true">

<stringProp name="CounterConfig.start">1</stringProp>

<stringProp name="CounterConfig.incr">1000</stringProp>

<stringProp name="CounterConfig.name">C</stringProp>

<boolProp name="CounterConfig.per_user">false</boolProp>

<stringProp name="CounterConfig.end">1000000</stringProp>

</CounterConfig>

<hashTree/>

<JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Sample 1" enabled="true">

<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">

<collectionProp name="Arguments.arguments">

<elementProp name="Sleep_Time" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">100</stringProp>

<stringProp name="Argument.name">Sleep_Time</stringProp>

</elementProp>

<elementProp name="Sleep_Mask" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">0xFF</stringProp>

<stringProp name="Argument.name">Sleep_Mask</stringProp>

</elementProp>

<elementProp name="Label" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value"></stringProp>

<stringProp name="Argument.name">Label</stringProp>

</elementProp>

<elementProp name="ResponseCode" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">200</stringProp>

<stringProp name="Argument.name">ResponseCode</stringProp>

</elementProp>

<elementProp name="ResponseMessage" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">OK</stringProp>

<stringProp name="Argument.name">ResponseMessage</stringProp>

</elementProp>

<elementProp name="Status" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">OK</stringProp>

<stringProp name="Argument.name">Status</stringProp>

</elementProp>

<elementProp name="SamplerData" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">Request</stringProp>

<stringProp name="Argument.name">SamplerData</stringProp>

</elementProp>

<elementProp name="ResultData" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">Response C=${C}</stringProp>

<stringProp name="Argument.name">ResultData</stringProp>

</elementProp>

</collectionProp>

</elementProp>

<stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>

</JavaSampler>

<hashTree>

<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">

<collectionProp name="Asserion.test_strings">

<stringProp name="51">3</stringProp>

</collectionProp>

<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>

<intProp name="Assertion.test_type">6</intProp>

<stringProp name="Assertion.assume_success">false</stringProp>

</ResponseAssertion>

<hashTree/>

</hashTree>

<JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Sample 2" enabled="true">

<elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">

<collectionProp name="Arguments.arguments">

<elementProp name="Sleep_Time" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">100</stringProp>

<stringProp name="Argument.name">Sleep_Time</stringProp>

</elementProp>

<elementProp name="Sleep_Mask" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">0xFF</stringProp>

<stringProp name="Argument.name">Sleep_Mask</stringProp>

</elementProp>

<elementProp name="Label" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value"></stringProp>

<stringProp name="Argument.name">Label</stringProp>

</elementProp>

<elementProp name="ResponseCode" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">200</stringProp>

<stringProp name="Argument.name">ResponseCode</stringProp>

</elementProp>

<elementProp name="ResponseMessage" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">OK</stringProp>

<stringProp name="Argument.name">ResponseMessage</stringProp>

</elementProp>

<elementProp name="Status" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">OK</stringProp>

<stringProp name="Argument.name">Status</stringProp>

</elementProp>

<elementProp name="SamplerData" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">Request</stringProp>

<stringProp name="Argument.name">SamplerData</stringProp>

</elementProp>

<elementProp name="ResultData" elementType="Argument">

<stringProp name="Argument.metadata">=</stringProp>

<stringProp name="Argument.value">Response C=${C} Tn=${__threadNum}</stringProp>

<stringProp name="Argument.name">ResultData</stringProp>

</elementProp>

</collectionProp>

</elementProp>

<stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>

</JavaSampler>

<hashTree/>

</hashTree>

</hashTree>

</hashTree>

</jmeterTestPlan>

# legitimate values: xml, csv, db. Only xml and csv are currently supported.

#jmeter.save.saveservice.output_format=csv

D:\apache-jmeter-3.0\bin>jmeter -n -t D:\共享\bpintocpin.jmx -l D:\共享\test.jtl

Writing log file to: D:\apache-jmeter-3.0\bin\jmeter.log

Creating summariser <summary>

Created the tree successfully using D:\共享\bpintocpin.jmx

Starting the test @ Fri Jun 17 15:12:21 CST 2016 (1466147541295)

Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445

summary = 1 in 00:00:01 = 0.8/s Avg: 1178 Min: 1178 Max: 1178 Err: 0 (0.00%)

Tidying up ... @ Fri Jun 17 15:12:22 CST 2016 (1466147542649)

... end of run

summary = 1 in 00:00:01 = 0.8/s Avg: 1178 Min: 1178 Max: 1178 Err: 0 (0.00%)


推荐阅读:
  1. JMeter接口压力测试课程入门到高级实战(目录)
  2. 使用JMeter测试MQTT协议

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

jmeter使用 te

上一篇:MySQL数据库总体架构讲义

下一篇:MySQL my.cnf配置文件详情

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》