Authored by Rong

commit by shell

... ... @@ -156,30 +156,6 @@
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_submit_5k" enabled="true">
<stringProp name="TestPlan.comments">&#21487;&#36141;&#20080;&#30340;&#21830;&#21697;</stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_cart_submit.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid_submit,address_id_submit,shopping_key_submit,coupon_code_1_submit,coupon_code_2_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/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_sku_submit_1k" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/sku_submit.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">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/>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_selectAndCart" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="filename">/opt/jmeter/data/uid_sku_in_cart.csv</stringProp>
... ... @@ -216,6 +192,18 @@
<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_&#25552;&#20132;&#35746;&#21333;" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true">
... ... @@ -268,7 +256,7 @@
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${sku_submit} ${shopping_key_submit} ${uid_submit}</stringProp>
<stringProp name="parameters">${sku_submit} ${uid_submit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
... ... @@ -278,7 +266,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version = &quot;yohobuy:web&quot;;
String req = &quot;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[0]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&amp;shopping_key=&quot;+bsh.args[1]+&quot;&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&quot;;
String req = &quot;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[0]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&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);
... ... @@ -293,7 +281,7 @@ for(byte b : btResult){
}
String md5 = sb.toString();
os_version=URLEncoder.encode(os_version);
req = &quot;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[0]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&amp;shopping_key=&quot;+bsh.args[1]+&quot;&amp;uid=&quot;+bsh.args[2]+&quot;&amp;v=7&quot;;
req = &quot;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[0]+&quot;&amp;promotion_id=&amp;screen_size=720x1280&amp;selected=Y&amp;session_key=5103fd2c7217459929865c1da6aa7f5a&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/>
... ...