Authored by Rong

commit by shell

... ... @@ -204,7 +204,7 @@
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/service/v2/article/getArticle" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/service/*/article/getArticleContent" 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>
... ... @@ -217,10 +217,10 @@
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">&#26681;&#25454;&#25991;&#31456;id&#21644;&#23458;&#25143;&#31471;&#31867;&#22411;&#33719;&#24471;&#25991;&#31456;</stringProp>
<stringProp name="TestPlan.comments">&#26681;&#25454;&#25991;&#31456;id&#21644;&#23458;&#25143;&#31471;&#31867;&#22411;&#33719;&#21462;&#36891;&#30340;&#35814;&#24773;&#20869;&#23481;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/service/v2/article/getArticle" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/service/*/article/getArticleContent" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -245,7 +245,7 @@
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">&#26681;&#25454;&#25991;&#31456;id&#21644;&#23458;&#25143;&#31471;&#31867;&#22411;&#33719;&#24471;&#25991;&#31456;</stringProp>
<stringProp name="TestPlan.comments">&#26681;&#25454;&#25991;&#31456;id&#21644;&#23458;&#25143;&#31471;&#31867;&#22411;&#33719;&#21462;&#36891;&#30340;&#35814;&#24773;&#20869;&#23481;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
... ... @@ -299,7 +299,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/api/v2/article/getArticleBaseInfo" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/service/v2/article/getBrand" 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>
... ... @@ -312,10 +312,10 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;&#35814;&#24773;</stringProp>
<stringProp name="TestPlan.comments">&#36827;&#20837;&#25991;&#31456;&#35814;&#24773;&#39029;&#26102;&#65292;&#29992;&#20110;&#23637;&#31034;&#30456;&#20851;&#21697;&#29260;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/api/v2/article/getArticleBaseInfo" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/service/v2/article/getBrand" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -332,7 +332,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/api/v2/article/getArticleBaseInfo?${searchValue}</stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/service/v2/article/getBrand?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
... ... @@ -340,7 +340,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;&#35814;&#24773;</stringProp>
<stringProp name="TestPlan.comments">&#36827;&#20837;&#25991;&#31456;&#35814;&#24773;&#39029;&#26102;&#65292;&#29992;&#20110;&#23637;&#31034;&#30456;&#20851;&#21697;&#29260;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
... ... @@ -355,7 +355,7 @@ String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_GuangDetail&amp;id=&quot;+bsh.args[0]+&quot;&amp;os_version=10.1.1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;udid=3a31d8b3f75a08c958747d41c4854673c669ef5f&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
String req = &quot;app_version=5.8.1&amp;article_id=&quot;+bsh.args[0]+&quot;&amp;client_type=&quot;+clientType+&quot;&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=37d73148be684c1424c353348f9cdc5a&amp;udid=403b22e7c3749ffd84fff5e586f4f2c5e671520f&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ... @@ -394,7 +394,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/api/v1/article/getArticleNotice" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/api/v1/comments/getList" 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>
... ... @@ -407,10 +407,10 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">1</stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#35780;&#35770;&#21015;&#34920;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/api/v1/article/getArticleNotice" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/api/v1/comments/getList" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -427,7 +427,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/api/v1/article/getArticleNotice?${searchValue}</stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/api/v1/comments/getList?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
... ... @@ -435,13 +435,13 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">1</stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#35780;&#35770;&#21015;&#34920;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${article_datetime} ${uid}</stringProp>
<stringProp name="parameters">${article_id} ${uid}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
... ... @@ -450,7 +450,7 @@ String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;datetime=&quot;+bsh.args[0]+&quot;&amp;fromPage=aFP_Root_Phone&amp;gender=2,3&amp;os_version=android6.0:BLN-AL10&amp;physical_channel=2&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=1080x1812&amp;session_key=6471aeedc3b960d856b793789983d398&amp;udid=863982030989458af245102e1b93ddd&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yh_channel=2&quot;;
String req = &quot;app_version=5.8.1&amp;article_id=&quot;+bsh.args[0]+&quot;&amp;client_type=&quot;+clientType+&quot;&amp;limit=10&amp;os_version=10.1.1&amp;page=1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;udid=3a31d8b3f75a08c958747d41c4854673c669ef5f&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ... @@ -489,7 +489,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/api/*/article/getArticlePraiseAndFavor" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/service/v2/article/getOtherArticle" 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>
... ... @@ -502,10 +502,10 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;&#35814;&#24773;&#30340;&#28857;&#36190;&#12289;&#25910;&#34255;&#12289;&#27983;&#35272;&#25968;&#65288;&#38477;&#32423;&#65289;</stringProp>
<stringProp name="TestPlan.comments">&#36827;&#20837;&#25991;&#31456;&#35814;&#24773;&#39029;&#26102;&#65292;&#29992;&#20110;&#23637;&#31034;&#30456;&#20851;&#25991;&#31456;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/api/*/article/getArticlePraiseAndFavor" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/service/v2/article/getOtherArticle" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -522,7 +522,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/api/v2/article/getArticlePraiseAndFavor?${searchValue}</stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/service/v2/article/getOtherArticle?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
... ... @@ -530,7 +530,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;&#35814;&#24773;&#30340;&#28857;&#36190;&#12289;&#25910;&#34255;&#12289;&#27983;&#35272;&#25968;&#65288;&#38477;&#32423;&#65289;</stringProp>
<stringProp name="TestPlan.comments">&#36827;&#20837;&#25991;&#31456;&#35814;&#24773;&#39029;&#26102;&#65292;&#29992;&#20110;&#23637;&#31034;&#30456;&#20851;&#25991;&#31456;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
... ... @@ -545,7 +545,7 @@ String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;id=&quot;+bsh.args[0]+&quot;&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=37d73148be684c1424c353348f9cdc5a&amp;udid=403b22e7c3749ffd84fff5e586f4f2c5e671520f&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
String req = &quot;app_version=5.8.1&amp;article_id=&quot;+bsh.args[0]+&quot;&amp;client_type=&quot;+clientType+&quot;&amp;limit=3&amp;offset=0&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=dbef84f3659c370fcd19de19e67a5556&amp;tags=&amp;udid=c383b9ed7696d2b31cf22685114a3a63eae58e95&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ... @@ -584,7 +584,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_/guang/api/v1/share/guang" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_document_config" 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>
... ... @@ -597,10 +597,10 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;</stringProp>
<stringProp name="TestPlan.comments">&#24494;&#20449;&#20844;&#20247;&#21495;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_/guang/api/v1/share/guang" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_document_config" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -617,7 +617,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_SERVICE}/guang/api/v1/share/guang?${searchValue}</stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
... ... @@ -625,13 +625,108 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">&#33719;&#21462;&#25991;&#31456;&#20869;&#23481;</stringProp>
<stringProp name="TestPlan.comments">&#24494;&#20449;&#20844;&#20247;&#21495;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${article_id} ${uid}</stringProp>
<stringProp name="parameters">${uid}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;method=app.document.config&amp;os_version=10.1.1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;udid=3a31d8b3f75a08c958747d41c4854673c669ef5f&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
byte[] btResult = md.digest();
StringBuffer sb = new StringBuffer();
for(byte b : btResult){
int bt = b&amp;0xff;
if(bt&lt;16){
sb.append(0);
}
sb.append(Integer.toHexString(bt));
}
String md5 = sb.toString();
vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
</BeanShellPreProcessor>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="&#21709;&#24212;&#26029;&#35328;" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="1450572480">&quot;code&quot;:200</stringProp>
</collectionProp>
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">false</boolProp>
<intProp name="Assertion.test_type">16</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<doubleProp>
<name>throughput</name>
<value>60000</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_resources_getSingleTemplate" 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>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">100</stringProp>
<stringProp name="ThreadGroup.ramp_time">10</stringProp>
<longProp name="ThreadGroup.start_time">1488865571000</longProp>
<longProp name="ThreadGroup.end_time">1488865571000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">1</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_resources_getSingleTemplate" 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"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</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>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments">1</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${uid}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
... ... @@ -640,7 +735,7 @@ String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;id=&quot;+bsh.args[0]+&quot;&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=dbef84f3659c370fcd19de19e67a5556&amp;udid=c383b9ed7696d2b31cf22685114a3a63eae58e95&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yh_channel=1&quot;;
String req = &quot;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;key=guang_detail_wechat&amp;method=app.resources.getSingleTemplate&amp;module=wechat&amp;os_version=10.1.1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;udid=3a31d8b3f75a08c958747d41c4854673c669ef5f&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ...