Showing
1 changed file
with
4 additions
and
4 deletions
@@ -263,7 +263,7 @@ | @@ -263,7 +263,7 @@ | ||
263 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 263 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> |
264 | <stringProp name="TestPlan.comments"></stringProp> | 264 | <stringProp name="TestPlan.comments"></stringProp> |
265 | <boolProp name="resetInterpreter">false</boolProp> | 265 | <boolProp name="resetInterpreter">false</boolProp> |
266 | - <stringProp name="parameters">${address_id_submit} ${limit_product_sku} ${limit_product_skn} ${limit_product_code} ${uid_submit}</stringProp> | 266 | + <stringProp name="parameters">${SNCP} ${address_id_submit} ${limit_product_sku} ${limit_product_skn} ${limit_product_code} ${uid_submit}</stringProp> |
267 | <stringProp name="filename"></stringProp> | 267 | <stringProp name="filename"></stringProp> |
268 | <stringProp name="script">import java.security.MessageDigest; | 268 | <stringProp name="script">import java.security.MessageDigest; |
269 | import java.util.Random; | 269 | import java.util.Random; |
@@ -272,8 +272,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | @@ -272,8 +272,8 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb | ||
272 | int rd = new Random().nextInt(2); | 272 | int rd = new Random().nextInt(2); |
273 | String clientType = clientTypes[rd]; | 273 | String clientType = clientTypes[rd]; |
274 | String privateKey = privateKeys[rd]; | 274 | String privateKey = privateKeys[rd]; |
275 | -String product_sku_list = "[{\"type\":\"limitcode\",\"buy_number\":1,\"sku\":\""+bsh.args[1]+"\",\"skn\":\""+bsh.args[2]+"\",\"limitproductcode\":\""+bsh.args[3]+"\"}]"; | ||
276 | -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"; | 275 | +String product_sku_list = "[{\"type\":\"limitcode\",\"buy_number\":1,\"sku\":\""+bsh.args[2]+"\",\"skn\":\""+bsh.args[3]+"\",\"limitproductcode\":\""+bsh.args[4]+"\"}]"; |
276 | +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"; | ||
277 | MessageDigest md = MessageDigest.getInstance("MD5"); | 277 | MessageDigest md = MessageDigest.getInstance("MD5"); |
278 | byte[] btInput = req.getBytes(); | 278 | byte[] btInput = req.getBytes(); |
279 | md.update(btInput); | 279 | md.update(btInput); |
@@ -288,7 +288,7 @@ for(byte b : btResult){ | @@ -288,7 +288,7 @@ for(byte b : btResult){ | ||
288 | } | 288 | } |
289 | String md5 = sb.toString(); | 289 | String md5 = sb.toString(); |
290 | product_sku_list=URLEncoder.encode(product_sku_list); | 290 | product_sku_list=URLEncoder.encode(product_sku_list); |
291 | -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"; | 291 | +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"; |
292 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 292 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
293 | </BeanShellPreProcessor> | 293 | </BeanShellPreProcessor> |
294 | <hashTree/> | 294 | <hashTree/> |
-
Please register or login to post a comment