Authored by Rong

commit by shell

... ... @@ -22,6 +22,16 @@
</collectionProp>
<stringProp name="TestPlan.comments">&#36890;&#29992;session&#26657;&#39564;&#30721;</stringProp> </Arguments>
<hashTree/>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="arguments_TMP" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="HOST_API" elementType="Argument">
<stringProp name="Argument.name">HOST_API</stringProp>
<stringProp name="Argument.value">api-test3.yohops.com:9999</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
<stringProp name="TestPlan.comments"></stringProp> </Arguments>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_mobile_openid_10w" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_mobile_openid.csv</stringProp>
... ... @@ -34,265 +44,23 @@
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_hosts_pt" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/hosts_pt.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">HOST_API,HOST_SERVICE</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#21830;&#21697;for&#27983;&#35272;" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/product_2w.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">product_id,product_skn</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#21697;&#29260;&#25968;&#25454;" enabled="true">
<stringProp name="TestPlan.comments">&#21697;&#29260;&#25968;&#25454;</stringProp>
<stringProp name="filename">/opt/jmeter/data/brand.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">brand_id</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#36141;&#29289;&#36710;&#26597;&#35810;" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/cart_query.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">cart_uid,cart_shopping_key,unuser_promotion_id</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#36891;" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/guang.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">article_id,article_author_id,article_datetime</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#35746;&#21333;" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/order_code.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">order_code,order_uid</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_cart_edit_5k_2" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_cart_edit.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid,address_id_edit,shopping_key_edit,coupon_code_1_edit,coupon_code_2_edit</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#21697;&#29260;&#20851;&#32852;" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/brandRelation.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">brandRelationId</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_&#20419;&#38144;id" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/promotion_id.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">cart_promotion_id</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_mobile_openid_test_1w" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_mobile_openid_test.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid_test,mobile_test,open_id_test</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_sku_edit_25w" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_sku_edit.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid_edit,address_id_edit,coupon_code_edit,sku_edit</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_sku_submit_25w" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_sku_submit.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid_submit,address_id_submit,coupon_code_submit,sku_submit</stringProp>
<stringProp name="delimiter">,</stringProp>
<boolProp name="quotedData">false</boolProp>
<boolProp name="recycle">true</boolProp>
<boolProp name="stopThread">false</boolProp>
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_queryCart" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_drawline_addQueue" 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">1</stringProp>
<stringProp name="ThreadGroup.num_threads">10</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">&#26597;&#35810;&#29992;&#25143;&#36141;&#29289;&#36710;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_queryCart" 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">&#26597;&#35810;&#29992;&#25143;&#36141;&#29289;&#36710;</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">${SNCP} ${cart_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 os_version = &quot;yohobuy:web&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.queryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=3b3af315f8ee63ba511d596496dabd39&amp;shopping_key=0&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);
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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.queryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=3b3af315f8ee63ba511d596496dabd39&amp;shopping_key=0&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_queryPromotionGifts" 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">1</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">&#21152;&#20215;&#36141;&#20419;&#38144;&#21830;&#21697;&#21015;&#34920;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_queryPromotionGifts" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_drawline_addQueue" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -317,23 +85,23 @@ 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">&#21152;&#20215;&#36141;&#20419;&#38144;&#21830;&#21697;&#21015;&#34920;</stringProp>
<stringProp name="TestPlan.comments"></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">${SNCP} ${cart_promotion_id} ${cart_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[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;android5.1:HUAWEI_TAG-TL00&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;gender=1,3&amp;method=app.Shopping.queryPromotionGifts&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;promotion_ids=&quot;+bsh.args[1]+&quot;&amp;screen_size=720x1184&amp;session_key=266c935f31d983be4e7a53c860a0aa08&amp;udid=8607740395271396b56710412cb59c1&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&amp;yh_channel=1&quot;;
String os_version = &quot;android6.0.1:MI_4LTE&quot;;
String req = &quot;activityId=384&amp;app_version=6.7.0&amp;business_line=yohobuy&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=aFP_Queue&amp;gender=1,3&amp;method=app.drawline.addQueue&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=1080x1920&amp;session_key=eda4ab2daa1ea85bcd4ef79ce9ccbe2f&amp;udid=866899023021106371c7743458299a6&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&amp;vip_level=0&amp;yh_channel=1&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ... @@ -348,1089 +116,7 @@ for(byte b : btResult){
}
String md5 = sb.toString();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;gender=1,3&amp;method=app.Shopping.queryPromotionGifts&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;promotion_ids=&quot;+bsh.args[1]+&quot;&amp;screen_size=720x1184&amp;session_key=266c935f31d983be4e7a53c860a0aa08&amp;udid=8607740395271396b56710412cb59c1&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&amp;yh_channel=1&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_add_edit" 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">1</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">&#28155;&#21152;&#36141;&#29289;&#36710;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_add_edit" 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">&#28155;&#21152;&#36141;&#29289;&#36710;</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">${SNCP} ${sku_edit} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:web&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;buy_number=1&amp;client_type=&quot;+clientType+&quot;&amp;edit_product_sku=0&amp;goods_type=0&amp;method=app.Shopping.add&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku=&quot;+bsh.args[1]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&amp;shopping_key=0&amp;uid=&quot;+bsh.args[2]+&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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;buy_number=1&amp;client_type=&quot;+clientType+&quot;&amp;edit_product_sku=0&amp;goods_type=0&amp;method=app.Shopping.add&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku=&quot;+bsh.args[1]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&amp;shopping_key=0&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_removeAndQryCart" 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">1</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">&#21024;&#38500;&#24182;&#26597;&#35810;&#36141;&#29289;&#36710;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_removeAndQryCart" 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">&#21024;&#38500;&#24182;&#26597;&#35810;&#36141;&#29289;&#36710;</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">${SNCP} ${sku_edit} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:web&quot;;
String product_sku_list = &quot;[{\&quot;product_sku\&quot;:&quot;+bsh.args[1]+&quot;,\&quot;buy_number\&quot;:1,\&quot;promotion_id\&quot;:0}]&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.removeAndQryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=720x1280&amp;session_key=ee6f3430e10c933810a7bf78576bfb47&amp;shopping_key=0&amp;uid=&quot;+bsh.args[2]+&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();
os_version=URLEncoder.encode(os_version);
product_sku_list=URLEncoder.encode(product_sku_list);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.removeAndQryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=720x1280&amp;session_key=ee6f3430e10c933810a7bf78576bfb47&amp;shopping_key=0&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_selectedAndQryCart_single" 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">1</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"></stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_selectedAndQryCart_single" 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"></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">${SNCP} ${__RandomString(1,YN,)} ${sku_edit} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:h5&quot;;
String product_sku_list = &quot;[{\&quot;goods_type\&quot;:\&quot;ordinary\&quot;,\&quot;selected\&quot;:\&quot;&quot;+bsh.args[1]+&quot;\&quot;,\&quot;product_sku\&quot;:&quot;+bsh.args[2]+&quot;,\&quot;promotion_id\&quot;:\&quot;\&quot;,\&quot;buy_number\&quot;:\&quot;1\&quot;}]&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.selectedAndQryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=720x1280&amp;session_key=00ed65eb36a474388df2fa2d6e97a8a5&amp;shopping_key=73f21814e488a48fc0204d780cea2302&amp;uid=&quot;+bsh.args[3]+&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();
os_version=URLEncoder.encode(os_version);
product_sku_list=URLEncoder.encode(product_sku_list);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;is_support_mlp=Y&amp;method=app.Shopping.selectedAndQryCart&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=720x1280&amp;session_key=00ed65eb36a474388df2fa2d6e97a8a5&amp;shopping_key=73f21814e488a48fc0204d780cea2302&amp;uid=&quot;+bsh.args[3]+&quot;&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_payment" 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">1</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">&#32467;&#31639;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_payment" 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">&#32467;&#31639;</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">${SNCP} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:h5&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;enable_red_envelopes=0&amp;method=app.Shopping.payment&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=3c69ae945a5d2288b4de540ddcc8b24a&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yoho_coin_mode=0&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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;enable_red_envelopes=0&amp;method=app.Shopping.payment&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=3c69ae945a5d2288b4de540ddcc8b24a&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yoho_coin_mode=0&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_address_get" 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">1</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">&#33719;&#21462;&#22320;&#22336;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_address_get" 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">&#33719;&#21462;&#22320;&#22336;</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">${SNCP} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_AppDelegate&amp;method=app.address.getlist&amp;os_version=10.3.1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;udid=155baae56a5ce7d9e7f9bf037a41a9e8fd766dda&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);
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_countUsableCoupon" 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">1</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">&#21487;&#29992;&#20248;&#24800;&#21048;&#25968;&#37327;&#65288;&#26159;&#21542;&#21487;&#38477;&#32423;&#65289;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_countUsableCoupon" 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">&#21487;&#29992;&#20248;&#24800;&#21048;&#25968;&#37327;&#65288;&#26159;&#21542;&#21487;&#38477;&#32423;&#65289;</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">${SNCP} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_Payment&amp;method=app.Shopping.countUsableCoupon&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=0036166666e1789b366fd4404832988d&amp;udid=795bfa0ea3f3669974fbef4e9238a965a3e942ff&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);
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_compute" 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">1</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">&#35745;&#31639;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_compute" 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">&#35745;&#31639;</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">${SNCP} ${coupon_code_edit} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:h5&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;coupon_code=&quot;+bsh.args[1]+&quot;&amp;delivery_way=2&amp;method=app.Shopping.compute&amp;os_version=&quot;+os_version+&quot;&amp;payment_type=2&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=00ed65eb36a474388df2fa2d6e97a8a5&amp;uid=&quot;+bsh.args[2]+&quot;&amp;use_yoho_coin=0&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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;coupon_code=&quot;+bsh.args[1]+&quot;&amp;delivery_way=2&amp;method=app.Shopping.compute&amp;os_version=&quot;+os_version+&quot;&amp;payment_type=2&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=00ed65eb36a474388df2fa2d6e97a8a5&amp;uid=&quot;+bsh.args[2]+&quot;&amp;use_yoho_coin=0&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_useCoupon" 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">1</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">&#20351;&#29992;&#20248;&#24800;&#21048;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_useCoupon" 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">&#20351;&#29992;&#20248;&#24800;&#21048;</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">${SNCP} ${coupon_code_edit} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:h5&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;coupon_code=&quot;+bsh.args[1]+&quot;&amp;method=app.Shopping.useCoupon&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=2ac3924dc4ae71a6e1f75e844e558c5b&amp;uid=&quot;+bsh.args[2]+&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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;coupon_code=&quot;+bsh.args[1]+&quot;&amp;method=app.Shopping.useCoupon&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=2ac3924dc4ae71a6e1f75e844e558c5b&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_listCoupon" 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">1</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">&#36141;&#29289;&#36710;&#20248;&#24800;&#21367;&#21015;&#34920;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_listCoupon" 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">&#36141;&#29289;&#36710;&#20248;&#24800;&#21367;&#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">${SNCP} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_Coupon&amp;method=app.Shopping.listCoupon&amp;os_version=10.1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=414x736&amp;session_key=2852ccbc7781da50012a8ad7ba0ebb6e&amp;udid=a0a2667c59c4024861ea3b49d376d9278fb6d809&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);
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_payment_findPayListDetail" 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">1</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">&#25903;&#20184;&#21015;&#34920;&#20449;&#24687;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_payment_findPayListDetail" 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">&#25903;&#20184;&#21015;&#34920;&#20449;&#24687;</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">${SNCP} ${uid_submit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;android5.0.2:vivo_Y33&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=aFP_ChoosePayWay&amp;gender=1,3&amp;method=app.payment.findPayListDetail&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=f0c318ece4d0aba1dffa909bda9114bf&amp;udid=8688590290067987d3cae6cca3e561a&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yh_channel=1&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();
os_version=URLEncoder.encode(os_version);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=aFP_ChoosePayWay&amp;gender=1,3&amp;method=app.payment.findPayListDetail&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=f0c318ece4d0aba1dffa909bda9114bf&amp;udid=8688590290067987d3cae6cca3e561a&amp;uid=&quot;+bsh.args[1]+&quot;&amp;v=7&amp;yh_channel=1&quot;;
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>600</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_recommend_purchased" 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">1</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">&#20080;&#20102;&#20877;&#20080;&#21151;&#33021;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_recommend_purchased" 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">&#20080;&#20102;&#20877;&#20080;&#21151;&#33021;</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">${SNCP} ${product_skn} ${uid_edit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=5.8.1&amp;client_type=&quot;+clientType+&quot;&amp;limit=2&amp;method=app.recommend.purchased&amp;os_version=10.0.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;productSkn=&quot;+bsh.args[1]+&quot;&amp;rec_pos=100007&amp;screen_size=375x667&amp;session_key=9ca3b28ae75a7cf8790cf9a79a61cda3&amp;udid=d961ca21607cfc982caafdc23630f9461b373fb3&amp;uid=&quot;+bsh.args[2]+&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();
req = &quot;activityId=384&amp;app_version=6.7.0&amp;business_line=yohobuy&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=aFP_Queue&amp;gender=1,3&amp;method=app.drawline.addQueue&amp;os_version=&quot;+os_version+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=1080x1920&amp;session_key=eda4ab2daa1ea85bcd4ef79ce9ccbe2f&amp;udid=866899023021106371c7743458299a6&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&amp;vip_level=0&amp;yh_channel=1&quot;;
vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
</BeanShellPreProcessor>
<hashTree/>
... ...