项目需求:

需要登录两个用户A、B,用户A操作完后会通知B,然后B再操作,B操作完结束或者再通知A。

实现思路:

1. 设置两个线程组Ⅰ、Ⅱ,组Ⅰ添加cookie管理器,里面添加用户A的操作;组Ⅱ添加cookie管理,里面添加用户B的操作,组Ⅰ和组Ⅱ的请求参数传递交互使用${__setProperty(newstatus,${result_zhxj},)} 这个方法设置,然后${__P(newstatus,)}获取。达到线程组之间的值传递。

2. 组Ⅱ添加while循环,一直等组Ⅰ传值,如果传过来了,就结束循环,往下走。

界面图如下:

脚本如下:

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="综合接续_工号-内部求助_正常_208-1" 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>
<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>
</collectionProp>
</HeaderManager>
<hashTree/>
<kg.apc.jmeter.config.VariablesFromCSV guiclass="kg.apc.jmeter.config.VariablesFromCSVGui" testclass="kg.apc.jmeter.config.VariablesFromCSV" testname="从文本获取自定义变量值" enabled="true">
<collectionProp name="Arguments.arguments"/>
<stringProp name="filename">C:\interfaceauto\a.csv</stringProp>
<stringProp name="variablesPrefix">MyVar_</stringProp>
<stringProp name="delimiter">,</stringProp>
<intProp name="skipLines">0</intProp>
<boolProp name="storeSysProp">false</boolProp>
</kg.apc.jmeter.config.VariablesFromCSV>
<hashTree/>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="ip" elementType="Argument">
<stringProp name="Argument.name">ip</stringProp>
<stringProp name="Argument.value">${MyVar_ip}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="port" elementType="Argument">
<stringProp name="Argument.name">port</stringProp>
<stringProp name="Argument.value">${MyVar_port}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="protocol" elementType="Argument">
<stringProp name="Argument.name">protocol</stringProp>
<stringProp name="Argument.value">${MyVar_protocol}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="agentId" elementType="Argument">
<stringProp name="Argument.name">agentId</stringProp>
<stringProp name="Argument.value">${MyVar_agentId}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">第一视角坐席,自动接听</stringProp>
</elementProp>
<elementProp name="phoneNum" elementType="Argument">
<stringProp name="Argument.name">phoneNum</stringProp>
<stringProp name="Argument.value">${MyVar_phoneNum}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">第一视角坐席,自动接听</stringProp>
</elementProp>
<elementProp name="callerDigits" elementType="Argument">
<stringProp name="Argument.name">callerDigits</stringProp>
<stringProp name="Argument.value">${MyVar_callerDigits}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="calledDigits" elementType="Argument">
<stringProp name="Argument.name">calledDigits</stringProp>
<stringProp name="Argument.value">${MyVar_calledDigits}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">设置自动接听,micsip</stringProp>
</elementProp>
<elementProp name="skillIds1" elementType="Argument">
<stringProp name="Argument.name">skillIds1</stringProp>
<stringProp name="Argument.value">${MyVar_skillIds1}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="skillIds2" elementType="Argument">
<stringProp name="Argument.name">skillIds2</stringProp>
<stringProp name="Argument.value">${MyVar_skillIds2}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="sleepLogin" elementType="Argument">
<stringProp name="Argument.name">sleepLogin</stringProp>
<stringProp name="Argument.value">${MyVar_sleepLogin}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="sleepLogout" elementType="Argument">
<stringProp name="Argument.name">sleepLogout</stringProp>
<stringProp name="Argument.value">${MyVar_sleepLogout}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="sleepPoll" elementType="Argument">
<stringProp name="Argument.name">sleepPoll</stringProp>
<stringProp name="Argument.value">${MyVar_sleepPoll}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="sleepPollagin" elementType="Argument">
<stringProp name="Argument.name">sleepPollagin</stringProp>
<stringProp name="Argument.value">${MyVar_sleepPollagin}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="sleepNormal" elementType="Argument">
<stringProp name="Argument.name">sleepNormal</stringProp>
<stringProp name="Argument.value">${MyVar_sleepNormal}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="agentId_1" elementType="Argument">
<stringProp name="Argument.name">agentId_1</stringProp>
<stringProp name="Argument.value">${MyVar_agentId_1}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">需要设置手动接听</stringProp>
</elementProp>
<elementProp name="phoneNum_1" elementType="Argument">
<stringProp name="Argument.name">phoneNum_1</stringProp>
<stringProp name="Argument.value">${MyVar_phoneNum_1}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">需要设置手动接听</stringProp>
</elementProp>
<elementProp name="calledDigits_1" elementType="Argument">
<stringProp name="Argument.name">calledDigits_1</stringProp>
<stringProp name="Argument.value">${MyVar_calledDigits_1}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">需要设置手动接听,sip</stringProp>
</elementProp>
<elementProp name="agentId_2" elementType="Argument">
<stringProp name="Argument.name">agentId_2</stringProp>
<stringProp name="Argument.value">${MyVar_agentId_2}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">备用,自动接听</stringProp>
</elementProp>
<elementProp name="phoneNum_2" elementType="Argument">
<stringProp name="Argument.name">phoneNum_2</stringProp>
<stringProp name="Argument.value">${MyVar_phoneNum_2}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">备用,自动接听</stringProp>
</elementProp>
<elementProp name="calledDigits_2" elementType="Argument">
<stringProp name="Argument.name">calledDigits_2</stringProp>
<stringProp name="Argument.value">${MyVar_calledDigits_2}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">备用,自动接听</stringProp>
</elementProp>
<elementProp name="calloutpath" elementType="Argument">
<stringProp name="Argument.name">calloutpath</stringProp>
<stringProp name="Argument.value">${MyVar_calloutpath}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">用户呼入exe路径</stringProp>
</elementProp>
<elementProp name="calldownpath" elementType="Argument">
<stringProp name="Argument.name">calldownpath</stringProp>
<stringProp name="Argument.value">${MyVar_calldownpath}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">用户挂机exe路径</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="综合接续_工号-内部求助_正常_208-1_A坐席" 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">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">0</stringProp>
<longProp name="ThreadGroup.start_time">1496284305000</longProp>
<longProp name="ThreadGroup.end_time">1496284305000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie 管理器" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<boolProp name="CookieManager.clearEachIteration">false</boolProp>
<stringProp name="CookieManager.policy">standard</stringProp>
<stringProp name="CookieManager.implementation">org.apache.jmeter.protocol.http.control.HC4CookieHandler</stringProp>
</CookieManager>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席签入" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;ccId&quot;: &quot;1&quot;,
&quot;agentId&quot;: &quot;${agentId_2}&quot;,
&quot;agentState&quot;: &quot;4&quot;,
&quot;skillIds&quot;: [
&quot;${skillIds1}&quot;,
&quot;${skillIds2}&quot;
],
&quot;isAutoAnswer&quot;: true,
&quot;opserialNo&quot;: 1,
&quot;phoneNum&quot;: &quot;${phoneNum_2}&quot;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/agent/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>
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="正则表达式提取器" enabled="true">
<stringProp name="RegexExtractor.useHeaders">true</stringProp>
<stringProp name="RegexExtractor.refname">sessionid1</stringProp>
<stringProp name="RegexExtractor.regex">JSESSIONID=(.*);</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default"></stringProp>
<stringProp name="RegexExtractor.match_number">0</stringProp>
</RegexExtractor>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepLogin}</stringProp>
</ConstantTimer>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席外呼" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callerDigits&quot;:&quot;10086&quot;,
&quot;calledDigits&quot;:&quot;${calledDigits_2}&quot;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/callout</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>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.gui.JSONPathExtractorGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor" testname="jp@gc - JSON Path Extractor" enabled="true">
<stringProp name="VAR">callId</stringProp>
<stringProp name="JSONPATH">$.callId</stringProp>
<stringProp name="DEFAULT"></stringProp>
<stringProp name="VARIABLE"></stringProp>
<stringProp name="SUBJECT">BODY</stringProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor>
<hashTree/>
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">//String callId = bsh.args[0];
//print (callId);
//System.out.println(&quot;userPhone=&quot; + callId);
${__setProperty(newcallId,${callId},)}</stringProp>
</BeanShellPostProcessor>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
</ConstantTimer>
<hashTree/>
</hashTree>
<WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="While间隔3秒判断有没跨线程传值,没有就继续循环,有就结束" enabled="true">
<stringProp name="TestPlan.comments">当另一线程传过来的值 ${__javaScript(&quot;${__P(newstatus,)}&quot;!=&quot;1&quot;)}时结束循环</stringProp>
<stringProp name="WhileController.condition">${__javaScript(${__P(newstatus,)}==1)}</stringProp>
</WhileController>
<hashTree>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">3000</stringProp>
</ConstantTimer>
<hashTree/>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="A坐席间隔3秒等待内部求助" enabled="false">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree>
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">System.out.println(&quot;userPhone=等待应答result&quot; + &quot;${__P(newstatus,)}&quot;);
//System.out.println(&quot;userPhone=222&quot; + &quot;${__P(newcallId,)}&quot;);
</stringProp>
</BeanShellPostProcessor>
<hashTree/>
</hashTree>
<CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="计数器" enabled="true">
<stringProp name="CounterConfig.start">1</stringProp>
<stringProp name="CounterConfig.end">20</stringProp>
<stringProp name="CounterConfig.incr">1</stringProp>
<stringProp name="CounterConfig.name">count</stringProp>
<stringProp name="CounterConfig.format"></stringProp>
<boolProp name="CounterConfig.per_user">false</boolProp>
</CounterConfig>
<hashTree/>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="强制结束循环" enabled="true">
<stringProp name="IfController.condition">${count}==20</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
</IfController>
<hashTree>
<BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="强制结束循环" enabled="true">
<stringProp name="BeanShellSampler.query">${__setProperty(newstatus,0,)}</stringProp>
<stringProp name="BeanShellSampler.filename"></stringProp>
<stringProp name="BeanShellSampler.parameters"></stringProp>
<boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
</BeanShellSampler>
<hashTree/>
</hashTree>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席应答" enabled="false">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callId&quot;:${__P(newcallId,)}}
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/answer</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>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席释放" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callId&quot;:${callId}
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/releasecall</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepNormal}</stringProp>
</ConstantTimer>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席事件轮询" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value"></stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/event/poll</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPoll}</stringProp>
</ConstantTimer>
<hashTree/>
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell断言" enabled="true">
<stringProp name="BeanShellAssertion.query">import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.*;
import com.jmeter.*; listexc = new ArrayList();
listexc.add(351);
listexc.add(301);
listexc.add(302);
listexc.add(304);
listexc.add(305);
listexc.add(306);
list = new ArrayList();
flag = &quot;false&quot;; if ((prev.getResponseCode() != null) &amp;&amp; (prev.getResponseCode().equals(&quot;200&quot;) == true)) {
String json = prev.getResponseDataAsString();
JSONObject jo = JSON.parseObject(json);
if(jo.containsKey(&quot;events&quot;)) {
JSONArray ja = jo.getJSONArray(&quot;events&quot;);
if(ja.size()&gt;0) {
flag = &quot;true&quot;;
for(int i = 0;i&lt;ja.size();i++) {
System.out.println(ja.get(i));
JSONObject joe = ja.getJSONObject(i);
System.out.println(joe.get(&quot;eventId&quot;));
list.add(joe.get(&quot;eventId&quot;));
}
System.out.println(list.size());
System.out.println(new EventCompare().compare(listexc,list));
if(!new EventCompare().compare(listexc,list)){
Failure = true;
FailureMessage = &quot;事件校验失败,预期结果和实际结果不一致,预期事件:&quot;+listexc+&quot; ,实际事件:&quot;+list;
}
}else{
flag = &quot;false&quot;;
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有eventId&quot;;
}
vars.put(&quot;result&quot;,flag);
System.out.println(list.size());
/*
System.out.println(listexc.containsAll(list));
if(listexc.containsAll(list)) {
Failure = true;
FailureMessage = &quot;事件校验失败&quot;;
}
*/
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有events&quot;;
}
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回空&quot;;
} </stringProp>
<stringProp name="BeanShellAssertion.filename"></stringProp>
<stringProp name="BeanShellAssertion.parameters"></stringProp>
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="如果(If)控制器" enabled="true">
<stringProp name="IfController.condition">&quot;${result}&quot;==&quot;false&quot;</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
</IfController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席事件轮询" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value"></stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/event/poll</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPollagin}</stringProp>
</ConstantTimer>
<hashTree/>
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell断言" enabled="true">
<stringProp name="BeanShellAssertion.query">import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.*;
import com.jmeter.*; listexc = new ArrayList();
listexc.add(351);
listexc.add(301);
listexc.add(302);
listexc.add(304);
listexc.add(305);
listexc.add(306);
list = new ArrayList();
flag = &quot;false&quot;; if ((prev.getResponseCode() != null) &amp;&amp; (prev.getResponseCode().equals(&quot;200&quot;) == true)) {
String json = prev.getResponseDataAsString();
JSONObject jo = JSON.parseObject(json);
if(jo.containsKey(&quot;events&quot;)) {
JSONArray ja = jo.getJSONArray(&quot;events&quot;);
if(ja.size()&gt;0) {
flag = &quot;true&quot;;
for(int i = 0;i&lt;ja.size();i++) {
System.out.println(ja.get(i));
JSONObject joe = ja.getJSONObject(i);
System.out.println(joe.get(&quot;eventId&quot;));
list.add(joe.get(&quot;eventId&quot;));
}
System.out.println(list.size());
System.out.println(new EventCompare().compare(listexc,list));
if(!new EventCompare().compare(listexc,list)){
Failure = true;
FailureMessage = &quot;事件校验失败,预期结果和实际结果不一致,预期事件:&quot;+listexc+&quot; ,实际事件:&quot;+list;
}
}else{
flag = &quot;false&quot;;
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有eventId&quot;;
}
//vars.put(&quot;result&quot;,flag);
System.out.println(list.size());
/*
System.out.println(listexc.containsAll(list));
if(listexc.containsAll(list)) {
Failure = true;
FailureMessage = &quot;事件校验失败&quot;;
}
*/
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有events&quot;;
}
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回空&quot;;
} </stringProp>
<stringProp name="BeanShellAssertion.filename"></stringProp>
<stringProp name="BeanShellAssertion.parameters"></stringProp>
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="A坐席签出" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;reasonCode&quot;: &quot;0&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/agent/logout</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>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepLogout}</stringProp>
</ConstantTimer>
<hashTree/>
</hashTree>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="综合接续_工号-内部求助_正常_208-1_B坐席" 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">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">4084391880000</longProp>
<longProp name="ThreadGroup.end_time">4084391880000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay">3</stringProp>
</ThreadGroup>
<hashTree>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="HTTP Cookie 管理器" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<boolProp name="CookieManager.clearEachIteration">false</boolProp>
<stringProp name="CookieManager.policy">standard</stringProp>
<stringProp name="CookieManager.implementation">org.apache.jmeter.protocol.http.control.HC4CookieHandler</stringProp>
</CookieManager>
<hashTree/>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="用户定义的变量" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="result_zhxj" elementType="Argument">
<stringProp name="Argument.name">result_zhxj</stringProp>
<stringProp name="Argument.value">1</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">赋初始值,后续会有新值</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席签入" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;ccId&quot;: &quot;1&quot;,
&quot;agentId&quot;: &quot;${agentId}&quot;,
&quot;agentState&quot;: &quot;4&quot;,
&quot;skillIds&quot;: [
&quot;${skillIds1}&quot;,
&quot;${skillIds2}&quot;
],
&quot;isAutoAnswer&quot;: true,
&quot;opserialNo&quot;: 1,
&quot;phoneNum&quot;: &quot;${phoneNum}&quot;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/agent/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>
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="正则表达式提取器" enabled="true">
<stringProp name="RegexExtractor.useHeaders">true</stringProp>
<stringProp name="RegexExtractor.refname">sessionid1</stringProp>
<stringProp name="RegexExtractor.regex">JSESSIONID=(.*);</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default"></stringProp>
<stringProp name="RegexExtractor.match_number">0</stringProp>
</RegexExtractor>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepLogin}</stringProp>
</ConstantTimer>
<hashTree/>
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${__setProperty(newstatus,${result4internalhelp},)}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">//String callId = bsh.args[0];
//print (callId);
//System.out.println(&quot;userPhone=&quot; + callId);
${__setProperty(newstatus,${result_zhxj},)}</stringProp>
</BeanShellPostProcessor>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席外呼" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callerDigits&quot;:&quot;10086&quot;,
&quot;calledDigits&quot;:&quot;${calledDigits}&quot;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/callout</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPoll}</stringProp>
</ConstantTimer>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.gui.JSONPathExtractorGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor" testname="jp@gc - JSON Path Extractor" enabled="true">
<stringProp name="VAR">callId</stringProp>
<stringProp name="JSONPATH">$.callId</stringProp>
<stringProp name="DEFAULT"></stringProp>
<stringProp name="VARIABLE"></stringProp>
<stringProp name="SUBJECT">BODY</stringProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor>
<hashTree/>
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters"></stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">//String callId = bsh.args[0];
//print (callId);
//System.out.println(&quot;userPhone=&quot; + callId);
${__setProperty(newcallId,${callId},)}</stringProp>
</BeanShellPostProcessor>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席内部求助A坐席" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;deviceType&quot;:&quot;2&quot;,
&quot;dialedDigits&quot;:&quot;${agentId_2}&quot;,
&quot;consultMode&quot;:&quot;1&quot;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/internalhelp</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>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">-1</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.gui.JSONPathExtractorGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor" testname="result提取器" enabled="true">
<stringProp name="VAR">result_zhxj</stringProp>
<stringProp name="JSONPATH">$.result</stringProp>
<stringProp name="DEFAULT">555</stringProp>
<stringProp name="VARIABLE"></stringProp>
<stringProp name="SUBJECT">BODY</stringProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor>
<hashTree/>
<BeanShellPostProcessor guiclass="TestBeanGUI" testclass="BeanShellPostProcessor" testname="BeanShell PostProcessor" enabled="true">
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${__setProperty(newstatus,${result4internalhelp},)}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">//String callId = bsh.args[0];
//print (callId);
//System.out.println(&quot;userPhone=&quot; + callId);
${__setProperty(newstatus,${result_zhxj},)}</stringProp>
</BeanShellPostProcessor>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">1000</stringProp>
</ConstantTimer>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席事件轮询" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value"></stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/event/poll</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPoll}</stringProp>
</ConstantTimer>
<hashTree/>
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell断言" enabled="true">
<stringProp name="BeanShellAssertion.query">import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.*;
import com.jmeter.*; listexc = new ArrayList();
listexc.add(351);
listexc.add(302);
listexc.add(304);
list = new ArrayList();
flag = &quot;false&quot;; if ((prev.getResponseCode() != null) &amp;&amp; (prev.getResponseCode().equals(&quot;200&quot;) == true)) {
String json = prev.getResponseDataAsString();
JSONObject jo = JSON.parseObject(json);
if(jo.containsKey(&quot;events&quot;)) {
JSONArray ja = jo.getJSONArray(&quot;events&quot;);
if(ja.size()&gt;0) {
flag = &quot;true&quot;;
for(int i = 0;i&lt;ja.size();i++) {
System.out.println(ja.get(i));
JSONObject joe = ja.getJSONObject(i);
System.out.println(joe.get(&quot;eventId&quot;));
list.add(joe.get(&quot;eventId&quot;));
}
System.out.println(list.size());
System.out.println(new EventCompare().compare(listexc,list));
if(!new EventCompare().compare(listexc,list)){
Failure = true;
FailureMessage = &quot;事件校验失败,预期结果和实际结果不一致,预期事件:&quot;+listexc+&quot; ,实际事件:&quot;+list;
}
}else{
flag = &quot;false&quot;;
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有eventId&quot;;
}
vars.put(&quot;result&quot;,flag);
System.out.println(list.size());
/*
System.out.println(listexc.containsAll(list));
if(listexc.containsAll(list)) {
Failure = true;
FailureMessage = &quot;事件校验失败&quot;;
}
*/
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有events&quot;;
}
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回空&quot;;
} </stringProp>
<stringProp name="BeanShellAssertion.filename"></stringProp>
<stringProp name="BeanShellAssertion.parameters"></stringProp>
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
<IfController guiclass="IfControllerPanel" testclass="IfController" testname="如果(If)控制器" enabled="true">
<stringProp name="IfController.condition">&quot;${result}&quot;==&quot;false&quot;</stringProp>
<boolProp name="IfController.evaluateAll">false</boolProp>
</IfController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席事件轮询" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value"></stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/event/poll</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPollagin}</stringProp>
</ConstantTimer>
<hashTree/>
<BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="BeanShell断言" enabled="true">
<stringProp name="BeanShellAssertion.query">import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.*;
import com.jmeter.*; listexc = new ArrayList();
listexc.add(351);
listexc.add(302);
listexc.add(304);
list = new ArrayList();
flag = &quot;false&quot;; if ((prev.getResponseCode() != null) &amp;&amp; (prev.getResponseCode().equals(&quot;200&quot;) == true)) {
String json = prev.getResponseDataAsString();
JSONObject jo = JSON.parseObject(json);
if(jo.containsKey(&quot;events&quot;)) {
JSONArray ja = jo.getJSONArray(&quot;events&quot;);
if(ja.size()&gt;0) {
flag = &quot;true&quot;;
for(int i = 0;i&lt;ja.size();i++) {
System.out.println(ja.get(i));
JSONObject joe = ja.getJSONObject(i);
System.out.println(joe.get(&quot;eventId&quot;));
list.add(joe.get(&quot;eventId&quot;));
}
System.out.println(list.size());
System.out.println(new EventCompare().compare(listexc,list));
if(!new EventCompare().compare(listexc,list)){
Failure = true;
FailureMessage = &quot;事件校验失败,预期结果和实际结果不一致,预期事件:&quot;+listexc+&quot; ,实际事件:&quot;+list;
}
}else{
flag = &quot;false&quot;;
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有eventId&quot;;
}
//vars.put(&quot;result&quot;,flag);
System.out.println(list.size());
/*
System.out.println(listexc.containsAll(list));
if(listexc.containsAll(list)) {
Failure = true;
FailureMessage = &quot;事件校验失败&quot;;
}
*/
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回没有events&quot;;
}
}else {
Failure = true;
FailureMessage = &quot;事件校验失败,轮询接口返回空&quot;;
} </stringProp>
<stringProp name="BeanShellAssertion.filename"></stringProp>
<stringProp name="BeanShellAssertion.parameters"></stringProp>
<boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp>
</BeanShellAssertion>
<hashTree/>
</hashTree>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席释放" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callId&quot;:${callId}
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/releasecall</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>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPollagin}</stringProp>
</ConstantTimer>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席第二次释放(挂机)" enabled="false">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{
&quot;callId&quot;:${callId}
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/call/releasecall</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>
<stringProp name="TestPlan.comments">&quot;time&quot;:&quot;&quot;,
&quot;dsn&quot;:874951945,
&quot;handle&quot;:&quot;&quot;,
&quot;server&quot;:&quot;&quot;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepPollagin}</stringProp>
</ConstantTimer>
<hashTree/>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="B坐席签出" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;reasonCode&quot;: &quot;0&quot;}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain">${ip}</stringProp>
<stringProp name="HTTPSampler.port">${port}</stringProp>
<stringProp name="HTTPSampler.protocol">${protocol}</stringProp>
<stringProp name="HTTPSampler.contentEncoding">UTF-8</stringProp>
<stringProp name="HTTPSampler.path">/ccacs/ws/agent/logout</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>
<com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion guiclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.gui.JSONPathAssertionGui" testclass="com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion" testname="jp@gc - JSON Path Assertion" enabled="true">
<stringProp name="JSON_PATH">$.result</stringProp>
<stringProp name="EXPECTED_VALUE">0</stringProp>
<boolProp name="JSONVALIDATION">true</boolProp>
<boolProp name="EXPECT_NULL">false</boolProp>
<boolProp name="INVERT">false</boolProp>
<boolProp name="ISREGEX">false</boolProp>
</com.atlantbh.jmeter.plugins.jsonutils.jsonpathassertion.JSONPathAssertion>
<hashTree/>
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="固定定时器" enabled="true">
<stringProp name="ConstantTimer.delay">${sleepLogout}</stringProp>
</ConstantTimer>
<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>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>
<threadCounts>true</threadCounts>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="AssertionVisualizer" 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>true</xml>
<fieldNames>true</fieldNames>
<responseHeaders>true</responseHeaders>
<requestHeaders>true</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<sentBytes>true</sentBytes>
<url>true</url>
<fileName>true</fileName>
<hostname>true</hostname>
<threadCounts>true</threadCounts>
<sampleCount>true</sampleCount>
<idleTime>true</idleTime>
<connectTime>true</connectTime>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
<WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="工作台" enabled="true">
<boolProp name="WorkBench.save">true</boolProp>
</WorkBench>
<hashTree/>
</hashTree>
</jmeterTestPlan>

jmeter多用户登录跨线程组操作传值的更多相关文章

  1. 『动善时』JMeter基础 — 38、JMeter中实现跨线程组关联

    目录 1.JMeter中实现跨线程组关联说明 (1)JMeter中实现跨线程组关联步骤 (2)测试计划内包含的元件 2.用户登陆请求的相关操作 (1)进行登陆操作获取Cookie信息 (2)把Cook ...

  2. jmeter接口测试 -- 设置跨线程组的全局变量

    一.操作步骤 1.先提取被设置的变量 2.再用 [线程组] - [后置处理] - [BeanShell PostProcessor]来设置跨线程的全局变量:${__setProperty(新变量名,$ ...

  3. Jmeter操作之跨线程组传递参数

    思路:将某一线程组内的变量通过“__setProperty”函数设置成jmeter的全局变量,在另一线程组中通过“__P”函数调用即可. 1.添加-后置处理器-BeanShell PostProces ...

  4. jmeter跨线程组传值

    在测试过程中,有时候需要jmeter跨线程组传值,jmeter本身又不具备此功能,那么,又该如何实现呢? 其实,我们可以通过BeanShell去实现. 实现过程如下: 1.线程组A中,使用正则表达式提 ...

  5. Jmeter跨线程组传递参数

    Jmeter的线程组之间是相互独立的,各个线程组互不影响,所以线程组A中输出的参数,是无法直接在线程组B中被调用的. 但有时候为了方便,可以把不同模块接口放在不同线程组,就涉及不同线程组传参问题,比如 ...

  6. jmeter全局变量配置:将token运用到全局(跨线程组使用变量)

    请注意元器件的执行顺序: 请将提取token的配置原件放在设置全局变量的配置元器件前面(本来是一个超级马虎的人,真是俗称“方脑壳”啊) 1.获取登录后的token(提取可以用json path Ext ...

  7. Jmeter 跨线程组传递参数 之两种方法

    终于搞定了Jmeter跨线程组之间传递参数,这样就不用每次发送请求B之前,都需要同时发送一下登录接口(因为同一个线程组下的请求是同时发送的),只需要发送一次登录请求,请求B直接用登录请求的参数即可,直 ...

  8. Jmeter 跨线程组传递参数 之两种方法(转)

    终于搞定了Jmeter跨线程组之间传递参数,这样就不用每次发送请求B之前,都需要同时发送一下登录接口(因为同一个线程组下的请求是同时发送的),只需要发送一次登录请求,请求B直接用登录请求的参数即可,直 ...

  9. Jmeter系列(45)- 详解 Jmeter 跨线程组取参数值的方法,免代码!

    如果你想从头学习Jmeter,可以看看这个系列的文章哦 https://www.cnblogs.com/poloyy/category/1746599.html 前言 用过 Jmeter 的同学应该都 ...

随机推荐

  1. Spark RDDRelation

    package main.asiainfo.coc.sparksql import org.apache.spark.sql.SQLContext import org.apache.spark.{S ...

  2. plsql developer导入导出数据库方法

    导出步骤: 1 tools ->export user object 选择选项,导出.sql文件 2 tools ->export tables-> Oracle Export 选择 ...

  3. iOS - instancetype

    OC是一门正在迅速发展的语言,ARC,object literals ,subscripting ,blocks,Auto Synthesis,让我们看到它惊人的改变.instancetype是cla ...

  4. Xcode 插件优缺点对比(推荐 20 款插件)

    链接地址:http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=402439598&idx=1&sn=e8800cb0aa2 ...

  5. [js插件开发教程]定制一个手风琴插件(accordion)

    本文带来一个垂直方向的手风琴插件开发,可以定制的功能如下: contentClass : 'panel', //面板样式navClass : 'nav', //导航样式activeClass : 'a ...

  6. 3ds max学习笔记-- 动画

    栗子:若要使茶壶从a点运动到b点,是需要动画实现的:动画与传统意义的移动不同,与时间是存在关系的: 时间线,时间滑条: [时间配置]按钮: 弹出面板: 动画时间轴默认时间是从0帧开始100结束:总长度 ...

  7. 【转】Java基础:System.out.println与System.err.println的区别

    同时使用了System.out.println与System.err.println()打印输入内容,结果看到的内容和预想的不一样,顺序与预料的不同并不是因为err和out的区别导致,而是因为他们是两 ...

  8. centos中selinux功能及常用服务配置

    SELinux: Secure Enhenced Linux 常用命令 获取selinux的当前状态: # getenforce 临时启用或禁用: # setenfoce 0|1 永久性启用,需要修改 ...

  9. postgresql-脏页和缓存失效

    脏页和缓存失效 https://www.cnblogs.com/flying-tiger/p/7885478.html Dirty pages and cache invalidation 我们一直在 ...

  10. ubuntu下桌面假死处理方法(非重启)

    一.背景 2018/05/22,就在这一天,进入ubuntu的桌面后随便点击任何位置均无法响应,此时又不想重启,遂出此文 二.解决方案 2.1 关掉Xorg进程 2.1.1按下ctrl+alt+F1进 ...