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.pswp.cn/news/281362.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/281362.shtml
英文地址,請注明出處:http://en.pswp.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;但是…

MyBatis 分頁插件 PageHelper

插件官網 簡介&#xff1a; 支持常見的 12 種數據庫。Oracle,MySql,MariaDB,SQLite,DB2,PostgreSQL,SqlServer 等&#xff1b; 支持常見的RowBounds(PageRowBounds)&#xff0c;PageHelper.startPage 方法調用&#xff0c;Mapper 接口參數調用&#xff1b; 獲取maven配置 示例&…

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…

Vue中render: h = h(App)的含義

原文地址&#xff1a;Explanation for render: h > h(App) please 翻譯如下&#xff1a; render: h > h(App) 是下面內容的縮寫&#xff1a; render: function (createElement) {return createElement(App); }進一步縮寫為(ES6 語法)&#xff1a; render (createElem…

NppFTP小插件的使用

大家在Linux系統中配置運行環境時&#xff0c;一定會遇到相關配置文件的修改&#xff0c;雖說在Linux系統中可以使用vi,vim的命令進行文本編輯&#xff0c;但是操作起來還是沒有在Windows系統中用的爽&#xff0c;特別是操作大文本量的文件時。Notepad里提供了一個小插件&#…

『實戰』使用Excel催化劑二維碼功能批量生成帶不同圖案二維碼。

熟悉Excel催化劑的老讀者都知道&#xff0c;每逢圖書大促&#xff0c;筆者都會向出版社申請優惠碼優惠券來惠及廣大粉絲。當然公眾號上幫出版社推薦圖書&#xff0c;會有傭金回報&#xff0c;這也是筆者唯一能接受的推廣方式。公眾號自創立以來&#xff0c;沒有接過軟文&#x…

springboot ElasticSearch 簡單的全文檢索高亮

前陣子和張三豐聊天提到了es。這次正好有機會學習并使用 首先引入依賴 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId> </dependency> 配置文件 spring.data.…

JavaScriptSerializer類 對象序列化為JSON,JSON反序列化為對象

JavaScriptSerializer 類由異步通信層內部使用&#xff0c;用于序列化和反序列化在瀏覽器和 Web 服務器之間傳遞的數據。說白了就是能夠直接將一個C#對象傳送到前臺頁面成為javascript對象。要添加System.Web.Extensions.dll的引用。該類位于System.Web.Script.Serialization命…

nodejs 實踐:express 最佳實踐(六) express 自省獲得所有的路由

nodejs 實踐&#xff1a;express 最佳實踐(六) express 自省獲得所有的路由 某些情況下&#xff0c;你需要知道你的應用有多少路由&#xff0c;這在 express 中沒有方法可以。因此我這邊曲線了一下&#xff0c;做成了一個函數進行處理。遍歷所有的方法進行處理。 代碼 const _ …

使用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;的格式。這種格式很…

python自動化測試-D6-學習筆記之一(常用模塊補充datetime模塊)

# datetime 模塊import datetimeprint(datetime.datetime.today()) #當前日期&#xff0c;到秒 打印結果&#xff1a;2018-01-21 10:23:46.034410print(datetime.datetime.now()) # 當前日期&#xff0c;到秒 打印結果&#xff1a;2018-01-21 10:23:46.034410print(datetime.d…

Vue如何在data中正確引入圖片路徑

方法一&#xff1a;將圖片資源放入項目 /static 目錄下&#xff0c;使用絕對或相對路徑引用即可 // 文件結構 |-- src | |-- components | | |-- banner.vue |-- static | |-- images | | |-- pic.jpg<template><div id"banner"><img :s…

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

作者&#xff1a;徐磊原文地址&#xff1a;https://smartide.cn/zh/blog/2022-1022-software-engineering/徐磊英捷創軟科技&#xff08;北京&#xff09;有限公司創始?/?席架構師 / CEO / SmartIDE開源項?創始?。微軟最有價值專家MVP&#xff0c;微軟區域技術總監&#xf…