JMeter之JMX文件解释
测试计划
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
</TestPlan>
线程组
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="user_api" enabled="true">
</SetupThreadGroup>
测试名称
testname="user_api"
循环次数
<stringProp name="LoopController.loops">2</stringProp>
并发数(模拟用户数)
<stringProp name="ThreadGroup.num_threads">30</stringProp>
并发时间
<stringProp name="ThreadGroup.ramp_time">5</stringProp>
http request
<stringProp name="HTTPSampler.domain">172.16.100.8</stringProp>
<stringProp name="HTTPSampler.port">80</stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
响应断言
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true">
<stringProp name="49586">200</stringProp>
<stringProp name="Assertion.custom_message"></stringProp> #失败后的信息
<intProp name="Assertion.test_type">1</intProp> #test_type对应类型,如包含、匹配等
结果树
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
聚合报告
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="User Aggregate Report" enabled="true">