...
|
...
|
@@ -243,7 +243,7 @@ |
|
|
<stringProp name="shareMode">shareMode.all</stringProp>
|
|
|
</CSVDataSet>
|
|
|
<hashTree/>
|
|
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Seckill_compute" enabled="true">
|
|
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Seckill_submit" 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>
|
...
|
...
|
@@ -259,7 +259,7 @@ |
|
|
<stringProp name="TestPlan.comments"></stringProp>
|
|
|
</ThreadGroup>
|
|
|
<hashTree>
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Seckill_compute" enabled="true">
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Seckill_submit" enabled="true">
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
<collectionProp name="Arguments.arguments">
|
...
|
...
|
@@ -290,7 +290,7 @@ |
|
|
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true">
|
|
|
<stringProp name="TestPlan.comments"></stringProp>
|
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
|
<stringProp name="parameters">${SNCP} ${activityId_seckill} ${sku_seckill} ${uid_submit}</stringProp>
|
|
|
<stringProp name="parameters">${SNCP} ${activityId_seckill} ${address_id_submit} ${sku_seckill} ${uid_submit}</stringProp>
|
|
|
<stringProp name="filename"></stringProp>
|
|
|
<stringProp name="script">import java.security.MessageDigest;
|
|
|
import java.util.Random;
|
...
|
...
|
@@ -300,7 +300,7 @@ int rd = new Random().nextInt(2); |
|
|
String clientType = clientTypes[rd];
|
|
|
String privateKey = privateKeys[rd];
|
|
|
String os_version = "android6.0:MI_5";
|
|
|
String req = "_sncp="+bsh.args[0]+"&activity_id="+bsh.args[1]+"&app_version=6.0.2&buy_number=1&client_type="+clientType+"&coupon_code=&delivery_way=1&fromPage=aFP_InstalmentGoodsTakeOrder&gender=1,3&method=app.Seckill.compute&os_version="+os_version+"&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku="+bsh.args[2]+"&promotion_code=&screen_size=1080x1920&session_key=53d0d4a67ba919a634f4e76a80f7a9de&sku_type=S&udid=861945035813942cbb51d8d8830e026&uid="+bsh.args[3]+"&use_red_envelopes=&use_yoho_coin=0&v=7&yh_channel=1&yoho_bill_term=0";
|
|
|
String req = "_sncp="+bsh.args[0]+"&activity_id="+bsh.args[1]+"&address_id="+bsh.args[2]+"&app_version=6.0.2&buy_number=1&client_type="+clientType+"&coupon_code=&delivery_time=2&delivery_way=1&fromPage=aFP_InstalmentGoodsTakeOrder&gender=1,3&method=app.Seckill.submit&os_version="+os_version+"&payment_id=15&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku="+bsh.args[3]+"&promotion_code=&remark=&screen_size=1080x1920&session_key=53d0d4a67ba919a634f4e76a80f7a9de&sku_type=S&udid=861945035813942cbb51d8d8830e026&uid="+bsh.args[4]+"&use_red_envelopes=&use_yoho_coin=&v=7&yh_channel=1&yoho_bill_term=0";
|
|
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
|
byte[] btInput = req.getBytes();
|
|
|
md.update(btInput);
|
...
|
...
|
@@ -315,7 +315,7 @@ for(byte b : btResult){ |
|
|
}
|
|
|
String md5 = sb.toString();
|
|
|
os_version=URLEncoder.encode(os_version);
|
|
|
req = "_sncp="+bsh.args[0]+"&activity_id="+bsh.args[1]+"&app_version=6.0.2&buy_number=1&client_type="+clientType+"&coupon_code=&delivery_way=1&fromPage=aFP_InstalmentGoodsTakeOrder&gender=1,3&method=app.Seckill.compute&os_version="+os_version+"&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku="+bsh.args[2]+"&promotion_code=&screen_size=1080x1920&session_key=53d0d4a67ba919a634f4e76a80f7a9de&sku_type=S&udid=861945035813942cbb51d8d8830e026&uid="+bsh.args[3]+"&use_red_envelopes=&use_yoho_coin=0&v=7&yh_channel=1&yoho_bill_term=0";
|
|
|
req = "_sncp="+bsh.args[0]+"&activity_id="+bsh.args[1]+"&address_id="+bsh.args[2]+"&app_version=6.0.2&buy_number=1&client_type="+clientType+"&coupon_code=&delivery_time=2&delivery_way=1&fromPage=aFP_InstalmentGoodsTakeOrder&gender=1,3&method=app.Seckill.submit&os_version="+os_version+"&payment_id=15&payment_type=1&physical_channel=1&private_key="+privateKey+"&product_sku="+bsh.args[3]+"&promotion_code=&remark=&screen_size=1080x1920&session_key=53d0d4a67ba919a634f4e76a80f7a9de&sku_type=S&udid=861945035813942cbb51d8d8830e026&uid="+bsh.args[4]+"&use_red_envelopes=&use_yoho_coin=&v=7&yh_channel=1&yoho_bill_term=0";
|
|
|
vars.put("searchValue",req+"&client_secret="+md5);</stringProp>
|
|
|
</BeanShellPreProcessor>
|
|
|
<hashTree/>
|
...
|
...
|
|