jmeter多用户登录跨线程组操作传值

项目需求:

需要登录两个用户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">{&#xd;&quot;ccId&quot;: &quot;1&quot;,&#xd;&quot;agentId&quot;: &quot;${agentId_2}&quot;,&#xd;&quot;agentState&quot;: &quot;4&quot;,&#xd;&quot;skillIds&quot;: [&#xd;&quot;${skillIds1}&quot;,&#xd;&quot;${skillIds2}&quot;&#xd;],&#xd;&quot;isAutoAnswer&quot;: true,&#xd;&quot;opserialNo&quot;: 1,&#xd;&quot;phoneNum&quot;: &quot;${phoneNum_2}&quot;&#xd;
}</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">{&#xd;
&quot;callerDigits&quot;:&quot;10086&quot;,&#xd;
&quot;calledDigits&quot;:&quot;${calledDigits_2}&quot;&#xd;
}</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">{&#xd;
&quot;callId&quot;:${__P(newcallId,)}}&#xd;
}</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">{ &#xd;
&quot;callId&quot;:${callId}&#xd;
}</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">{&#xd;&quot;ccId&quot;: &quot;1&quot;,&#xd;&quot;agentId&quot;: &quot;${agentId}&quot;,&#xd;&quot;agentState&quot;: &quot;4&quot;,&#xd;&quot;skillIds&quot;: [&#xd;&quot;${skillIds1}&quot;,&#xd;&quot;${skillIds2}&quot;&#xd;],&#xd;&quot;isAutoAnswer&quot;: true,&#xd;&quot;opserialNo&quot;: 1,&#xd;&quot;phoneNum&quot;: &quot;${phoneNum}&quot;&#xd;
}</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">{&#xd;
&quot;callerDigits&quot;:&quot;10086&quot;,&#xd;
&quot;calledDigits&quot;:&quot;${calledDigits}&quot;&#xd;
}</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">{&#xd;
&quot;deviceType&quot;:&quot;2&quot;,&#xd;
&quot;dialedDigits&quot;:&quot;${agentId_2}&quot;,&#xd;
&quot;consultMode&quot;:&quot;1&quot;&#xd;
}</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">{ &#xd;
&quot;callId&quot;:${callId}&#xd;
}</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">{ &#xd;
&quot;callId&quot;:${callId}&#xd;
}</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>

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/281362.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

手动修改美化7zip图标 - 附替换文件

手动修改7zip图标理论知识制作ico图标文件替换资源重建图标缓存效果图替换文件7-Zip的自带图标是公认的丑&#xff0c;所以网上有很多7-Zip的图标美化工具&#xff0c;用的最多的就是 7-Zip Theme Manager&#xff0c;自带很多主题&#xff0c;但是最近我再使用7zTM修改图标是却…

.NET性能优化-复用StringBuilder

在之前的文章中&#xff0c;我们介绍了 dotnet 在字符串拼接时可以使用的一些性能优化技巧。比如&#xff1a;为StringBuilder设置 Buffer 初始大小使用ValueStringBuilder等等 不过这些都多多少少有一些局限性&#xff0c;比如StringBuilder还是会存在new StringBuilder()这样…

如何使用vue组件搭建网页并打包发布

vue组件化项目搭建及编译打包发布引言开发环境开发环境介绍开发环境安装使用模板创建项目编译及打包发布引言 最近开始学习Vue&#xff0c;Vue 是一个前端框架&#xff0c;特点是数据绑定和组件化。网上很多教程&#xff0c;数据绑定和组件学习起来也都不困难&#xff0c;但是…

Facebook揭秘其应用测试平台,并开源核心技术

本周&#xff0c;Facebook让一群记者参观了它位于俄勒冈州普赖恩维尔市的数据中心&#xff0c;在这个过程中也展示了他们的一个移动应用测试实验室&#xff0c;用来测试Facebook app、 Messenger 和Instagram。 目前 这个实验室总共含有60个机架&#xff0c;每个机架上放置32台…

责任链模式 职责链模式 Chain of Responsibility Pattern 行为型 设计模式(十七)

责任链模式&#xff08;Chain of Responsibility Pattern&#xff09;职责链模式意图 使多个对象都有机会处理请求&#xff0c;从而避免请求的发送者和接受者之间的耦合关系将这些对象连接成一条链&#xff0c;并沿着这条链传递请求&#xff0c;直到有一个对象处理它为止。责任…

YOLOv7 在 ML.NET 中使用 ONNX 检测对象

本文介绍如何在 ML.NET 中使用 YOLOv7 的 ONNX 模型来检测图像中的对象。什么是 YOLOYOLO&#xff08;You Only Look Once&#xff09;是一种先进的实时目标检测系统。它是一个在COCO数据集上预训练的物体检测架构和模型系列&#xff0c;其版本也是在不断优化更新。2022年7月&a…

NppFTP小插件的使用

大家在Linux系统中配置运行环境时&#xff0c;一定会遇到相关配置文件的修改&#xff0c;虽说在Linux系统中可以使用vi,vim的命令进行文本编辑&#xff0c;但是操作起来还是没有在Windows系统中用的爽&#xff0c;特别是操作大文本量的文件时。Notepad里提供了一个小插件&#…

『实战』使用Excel催化剂二维码功能批量生成带不同图案二维码。

熟悉Excel催化剂的老读者都知道&#xff0c;每逢图书大促&#xff0c;笔者都会向出版社申请优惠码优惠券来惠及广大粉丝。当然公众号上帮出版社推荐图书&#xff0c;会有佣金回报&#xff0c;这也是笔者唯一能接受的推广方式。公众号自创立以来&#xff0c;没有接过软文&#x…

JavaScriptSerializer类 对象序列化为JSON,JSON反序列化为对象

JavaScriptSerializer 类由异步通信层内部使用&#xff0c;用于序列化和反序列化在浏览器和 Web 服务器之间传递的数据。说白了就是能够直接将一个C#对象传送到前台页面成为javascript对象。要添加System.Web.Extensions.dll的引用。该类位于System.Web.Script.Serialization命…

使用vue组件搭建网页应用

使用vue组件搭建网页应用搭建开发环境开发组件搭建开发环境 搭建一个 vue 项目最快的方式就是使用 vue cli 脚手架进行初始化&#xff0c;包含了所有完整的依赖及开发配置。 首先全局安装 vue cli&#xff0c;打开 cmd 命令提示符 或者 power shell&#xff0c;输入以下命令&…

重新整理 .net core 实践篇 —linux上排查问题实用工具 [外篇]

前言介绍下面几个工具:Lldbcreatedumpdotnet-dumpdotnet-gcdumpdotnet-symbolProcdump该文的前置篇为:https://www.cnblogs.com/aoximin/p/16839812.html献给初学者&#xff0c;这篇就只介绍下看下日志和lldb&#xff0c;毕竟东西太多了。正文我以官网的例子作为演示&#xff1…

Office 365离线安装

Office 365除了可以在线安装外&#xff0c;还可以进行离线安装&#xff0c;但激活还是需要连接互联网的哟首先下载Office部署工具https://www.microsoft.com/en-us/download/details.aspx?id49117 下载文件后&#xff0c;运行自解压缩可执行文件&#xff0c;其中包含 Office 部…

reduceByKey和groupByKey区别与用法

2019独角兽企业重金招聘Python工程师标准>>> 在Spar看中&#xff0c;我们知道一切的操作都是基于RDD的。在使用中&#xff0c;RDD有一种非常特殊也是非常实用的format——pair RDD&#xff0c;即RDD的每一行是&#xff08;key, value&#xff09;的格式。这种格式很…

软件工程的第一性原理丨SmartIDE

作者&#xff1a;徐磊原文地址&#xff1a;https://smartide.cn/zh/blog/2022-1022-software-engineering/徐磊英捷创软科技&#xff08;北京&#xff09;有限公司创始⼈/⾸席架构师 / CEO / SmartIDE开源项⽬创始⼈。微软最有价值专家MVP&#xff0c;微软区域技术总监&#xf…

排序算法之快速排序详解

一、算法介绍 快速排序&#xff1a;快速排序的基本思想是通过一次排序将等待的记录分成两个独立的部分&#xff0c;其中一部分记录的关键字小于另一部分的关键字。C部分的快速排序一直持续到整个序列被排序。 任取一个元素 (如第一个) 为中心提出所有小于它的元素&#xff0c;并…

openstack 中国联盟公开课參会总结

主流趋势 1. openstack defcore 互操作性认证。打通不同的openstack 厂商之间的连接2. 首批OpenStack管理员认证(COA)将于2016年进行3. 混合云应用广泛 Cloud Broker,cascading openstack 云连接器4. DevOps5. 虚拟桌面6. Storage 方面&#xff0c;Ceph和Glusterfs 7. Network…

Re:从零开始的Vue项目搭建

Re&#xff1a;从零开始的Vue项目搭建初始的终结与结束的开始Nodejs项目的简单测试从零开始webpack开发模式webpack编译打包后记初始的终结与结束的开始 最开始接触vue项目搭建是从vue-cli开始&#xff0c;模板式操作&#xff0c;一键搞定&#xff0c;几乎可以无缝进入代码开发…

C# WPF 用代码画一幅图(*精品*)

概述有时候我们的程序界面中需要显示一些简单的示意图&#xff0c;一般我们有原图的话直接嵌入我们程序就可以&#xff0c;但有时候我们没有原图&#xff0c;这时候我们不妨用代码自己画出来.今天小编要给大家展示的是这样一副图片&#xff1a;接下来&#xff0c;我就用代码纯手…

矿难让显卡压了那么多货咋办?NV如是说

2019独角兽企业重金招聘Python工程师标准>>> 在苏州 GTC 开幕的几天前&#xff0c;英伟达刚刚遭遇了一次股价的腰斩。 近来加密货币的热度渐低&#xff0c;受到挖矿热潮照顾许多的英伟达「矿机」销量受到打击&#xff0c;甚至出现了严重的库存危机&#xff0c;加上近…

花式看超级碗 人工智能、大数据在碗里

“超级碗”可不是一个大碗!!!超级碗(Super Bowl)是美国国家美式足球联盟(也称为国家橄榄球联盟)的年度冠军赛&#xff0c;胜者被称为“世界冠军”。超级碗一般在每年1月最后一个或2月第一个星期天举行&#xff0c;那一天称为超级碗星期天(Super Bowl Sunday)。超级碗是比赛的名…