...
|
...
|
@@ -101,7 +101,7 @@ |
|
|
<boolProp name="TransactionController.parent">false</boolProp>
|
|
|
</TransactionController>
|
|
|
<hashTree>
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_query" enabled="true">
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_add" enabled="true">
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
<collectionProp name="Arguments.arguments">
|
...
|
...
|
@@ -132,7 +132,7 @@ |
|
|
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true">
|
|
|
<stringProp name="TestPlan.comments"></stringProp>
|
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
|
<stringProp name="parameters">${offline_uid} ${offline_shopping_key} ${offline_uid} ${offline_warehouse_id}</stringProp>
|
|
|
<stringProp name="parameters">${offline_uid} ${offline_product_skn} ${offline_product_sku} ${offline_warehouse_id}</stringProp>
|
|
|
<stringProp name="filename"></stringProp>
|
|
|
<stringProp name="script">import java.security.MessageDigest;
|
|
|
import java.util.Random;
|
...
|
...
|
@@ -142,7 +142,7 @@ int rd = new Random().nextInt(1); |
|
|
String clientType = clientTypes[rd];
|
|
|
String privateKey = privateKeys[rd];
|
|
|
|
|
|
String req = "app_version=5.6.0&client_type="+clientType+"&employee_uid="+bsh.args[0]+"&method=app.ShoppingForOffline.query&os_version=10.3.1&private_key="+privateKey+"&screen_size=768x1024&session_key=2c7a09f4590e4f1ff4dc586ad1c7e98c&shopping_key="+bsh.args[1]+"&uid="+bsh.args[2]+"&v=7&warehouse_id="+bsh.args[3]+"";
|
|
|
String req = "app_version=5.6.0&client_type="+clientType+"&employee_uid="+bsh.args[0]+"&method=app.ShoppingForOffline.add&offline_buy_number=1&online_buy_number=0&os_version=10.3.1&private_key="+privateKey+"&product_skn="+bsh.args[1]+"&product_sku="+bsh.args[2]+"&promotion_id=0&screen_size=768x1024&session_key=a9a868dab48bcd3ea6f2ea78eaa6b152&v=7&warehouse_id="+bsh.args[3]+"";
|
|
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
|
byte[] btInput = req.getBytes();
|
|
|
md.update(btInput);
|
...
|
...
|
@@ -171,6 +171,13 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri |
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
|
</ResponseAssertion>
|
|
|
<hashTree/>
|
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
|
<stringProp name="JSONPostProcessor.referenceNames">offline_shopping_key</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..data.shopping_key</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.defaultValues">a34d0ac74038cf67019950617c1fa7bb</stringProp>
|
|
|
</JSONPostProcessor>
|
|
|
<hashTree/>
|
|
|
</hashTree>
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_increase" enabled="true">
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
...
|
...
|
@@ -385,7 +392,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri |
|
|
</ResponseAssertion>
|
|
|
<hashTree/>
|
|
|
</hashTree>
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_add" enabled="true">
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_query" enabled="true">
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
|
|
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
|
|
|
<collectionProp name="Arguments.arguments">
|
...
|
...
|
@@ -416,7 +423,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri |
|
|
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true">
|
|
|
<stringProp name="TestPlan.comments"></stringProp>
|
|
|
<boolProp name="resetInterpreter">false</boolProp>
|
|
|
<stringProp name="parameters">${offline_uid} ${offline_product_skn} ${offline_product_sku} ${offline_warehouse_id}</stringProp>
|
|
|
<stringProp name="parameters">${offline_uid} ${offline_shopping_key} ${offline_uid} ${offline_warehouse_id}</stringProp>
|
|
|
<stringProp name="filename"></stringProp>
|
|
|
<stringProp name="script">import java.security.MessageDigest;
|
|
|
import java.util.Random;
|
...
|
...
|
@@ -426,7 +433,7 @@ int rd = new Random().nextInt(1); |
|
|
String clientType = clientTypes[rd];
|
|
|
String privateKey = privateKeys[rd];
|
|
|
|
|
|
String req = "app_version=5.6.0&client_type="+clientType+"&employee_uid="+bsh.args[0]+"&method=app.ShoppingForOffline.add&offline_buy_number=1&online_buy_number=0&os_version=10.3.1&private_key="+privateKey+"&product_skn="+bsh.args[1]+"&product_sku="+bsh.args[2]+"&promotion_id=0&screen_size=768x1024&session_key=a9a868dab48bcd3ea6f2ea78eaa6b152&v=7&warehouse_id="+bsh.args[3]+"";
|
|
|
String req = "app_version=5.6.0&client_type="+clientType+"&employee_uid="+bsh.args[0]+"&method=app.ShoppingForOffline.query&os_version=10.3.1&private_key="+privateKey+"&screen_size=768x1024&session_key=2c7a09f4590e4f1ff4dc586ad1c7e98c&shopping_key="+bsh.args[1]+"&uid="+bsh.args[2]+"&v=7&warehouse_id="+bsh.args[3]+"";
|
|
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
|
byte[] btInput = req.getBytes();
|
|
|
md.update(btInput);
|
...
|
...
|
@@ -455,13 +462,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri |
|
|
<intProp name="Assertion.test_type">16</intProp>
|
|
|
</ResponseAssertion>
|
|
|
<hashTree/>
|
|
|
<JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="JSON Extractor" enabled="true">
|
|
|
<stringProp name="JSONPostProcessor.referenceNames">offline_shopping_key</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.jsonPathExprs">$..data.shopping_key</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.match_numbers">1</stringProp>
|
|
|
<stringProp name="JSONPostProcessor.defaultValues">a34d0ac74038cf67019950617c1fa7bb</stringProp>
|
|
|
</JSONPostProcessor>
|
|
|
<hashTree/>
|
|
|
</hashTree>
|
|
|
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_offlinePayment" enabled="true">
|
|
|
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
|
...
|
...
|
|