...
|
...
|
@@ -263,7 +263,7 @@ |
|
|
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true">
|
|
|
<stringProp name="TestPlan.comments"></stringProp>
|
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
|
<stringProp name="parameters">${address_id_submit} ${limit_product_sku} ${limit_product_skn} ${limit_product_code} ${uid_submit}</stringProp>
|
|
|
<stringProp name="parameters">${SNCP} ${address_id_submit} ${limit_product_sku} ${limit_product_skn} ${limit_product_code} ${uid_submit}</stringProp>
|
|
|
<stringProp name="filename"></stringProp>
|
|
|
<stringProp name="script">import java.security.MessageDigest;
|
|
|
import java.util.Random;
|
...
|
...
|
@@ -272,8 +272,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb |
|
|
int rd = new Random().nextInt(2);
|
|
|
String clientType = clientTypes[rd];
|
|
|
String privateKey = privateKeys[rd];
|
|
|
String product_sku_list = "[{\"type\":\"limitcode\",\"buy_number\":1,\"sku\":\""+bsh.args[1]+"\",\"skn\":\""+bsh.args[2]+"\",\"limitproductcode\":\""+bsh.args[3]+"\"}]";
|
|
|
String req = "address_id="+bsh.args[0]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_print_price=Y&method=app.Shopping.easySubmit&os_version=yohobuy:web&payment_id=15&payment_type=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=6dcded32fa271b3473d8917f039979fd&udid=yoho_pc&uid="+bsh.args[4]+"&use_yoho_coin=0&v=7";
|
|
|
String product_sku_list = "[{\"type\":\"limitcode\",\"buy_number\":1,\"sku\":\""+bsh.args[2]+"\",\"skn\":\""+bsh.args[3]+"\",\"limitproductcode\":\""+bsh.args[4]+"\"}]";
|
|
|
String req = "_sncp="+bsh.args[0]+"&address_id="+bsh.args[1]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_print_price=Y&method=app.Shopping.easySubmit&os_version=yohobuy:web&payment_id=15&payment_type=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=6dcded32fa271b3473d8917f039979fd&udid=yoho_pc&uid="+bsh.args[5]+"&use_yoho_coin=0&v=7";
|
|
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
|
byte[] btInput = req.getBytes();
|
|
|
md.update(btInput);
|
...
|
...
|
@@ -288,7 +288,7 @@ for(byte b : btResult){ |
|
|
}
|
|
|
String md5 = sb.toString();
|
|
|
product_sku_list=URLEncoder.encode(product_sku_list);
|
|
|
req = "address_id="+bsh.args[0]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_print_price=Y&method=app.Shopping.easySubmit&os_version=yohobuy:web&payment_id=15&payment_type=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=6dcded32fa271b3473d8917f039979fd&udid=yoho_pc&uid="+bsh.args[4]+"&use_yoho_coin=0&v=7";
|
|
|
req = "_sncp="+bsh.args[0]+"&address_id="+bsh.args[1]+"&app_version=5.8.0&cart_type=ordinary&client_type="+clientType+"&delivery_time=2&delivery_way=1&is_print_price=Y&method=app.Shopping.easySubmit&os_version=yohobuy:web&payment_id=15&payment_type=1&private_key="+privateKey+"&product_sku_list="+product_sku_list+"&screen_size=720x1280&session_key=6dcded32fa271b3473d8917f039979fd&udid=yoho_pc&uid="+bsh.args[5]+"&use_yoho_coin=0&v=7";
|
|
|
vars.put("searchValue",req+"&client_secret="+md5);</stringProp>
|
|
|
</BeanShellPreProcessor>
|
|
|
<hashTree/>
|
...
|
...
|
|