Authored by Rong

commit by shell

... ... @@ -58,105 +58,19 @@
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_easyPayment" 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>
<intProp name="LoopController.loops">-1</intProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">100</stringProp>
<stringProp name="ThreadGroup.ramp_time">10</stringProp>
<longProp name="ThreadGroup.start_time">1488865571000</longProp>
<longProp name="ThreadGroup.end_time">1488865571000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="data_uid_mobile_openid_test_1w" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_easyPayment" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value"></stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.monitor">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="TestPlan.comments"></stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${SNCP} ${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};
String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String product_sku_list = &quot;[{\&quot;sku\&quot;:&quot;+bsh.args[1]+&quot;,\&quot;buy_number\&quot;:1,\&quot;type\&quot;:\&quot;limitcode\&quot;,\&quot;limitproductcode\&quot;:\&quot;&quot;+bsh.args[2]+&quot;\&quot;,\&quot;skn\&quot;:&quot;+bsh.args[3]+&quot;}]&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=6.0.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_ProductDetail&amp;is_support_apple_pay=N&amp;method=app.Shopping.easyPayment&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=375x667&amp;session_key=56839fa66dc3f1e58f8f3d9a7d12774c&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=&quot;+bsh.args[4]+&quot;&amp;v=7&amp;yoho_bill_term=0&amp;yoho_coin_mode=0&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
byte[] btResult = md.digest();
StringBuffer sb = new StringBuffer();
for(byte b : btResult){
int bt = b&amp;0xff;
if(bt&lt;16){
sb.append(0);
}
sb.append(Integer.toHexString(bt));
}
String md5 = sb.toString();
product_sku_list=URLEncoder.encode(product_sku_list);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=6.0.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_ProductDetail&amp;is_support_apple_pay=N&amp;method=app.Shopping.easyPayment&amp;os_version=10.3.2&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=375x667&amp;session_key=56839fa66dc3f1e58f8f3d9a7d12774c&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=&quot;+bsh.args[4]+&quot;&amp;v=7&amp;yoho_bill_term=0&amp;yoho_coin_mode=0&quot;;
vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
</BeanShellPreProcessor>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="&#21709;&#24212;&#26029;&#35328;" enabled="true">
<collectionProp name="Asserion.test_strings">
<stringProp name="1450572480">&quot;code&quot;:200</stringProp>
</collectionProp>
<stringProp name="TestPlan.comments"></stringProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
<boolProp name="Assertion.assume_success">false</boolProp>
<intProp name="Assertion.test_type">16</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<doubleProp>
<name>throughput</name>
<value>60000</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="calcMode">2</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_Shopping_easyCompute" enabled="true">
<stringProp name="filename">/opt/jmeter/data/uid_mobile_openid_test.csv</stringProp>
<stringProp name="fileEncoding">utf-8</stringProp>
<stringProp name="variableNames">uid_test,mobile_test,open_id_test</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_sesame_flowering_higher" 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>
... ... @@ -172,7 +86,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<stringProp name="TestPlan.comments"></stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_Shopping_easyCompute" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_sesame_flowering_higher" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -203,7 +117,7 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="resetInterpreter">false</boolProp>
<stringProp name="parameters">${SNCP} ${limit_product_sku} ${limit_product_code} ${limit_product_skn} ${uid_submit}</stringProp>
<stringProp name="parameters">${mobile_test}</stringProp>
<stringProp name="filename"></stringProp>
<stringProp name="script">import java.security.MessageDigest;
import java.util.Random;
... ... @@ -212,8 +126,8 @@ String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb
int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String product_sku_list = &quot;[{\&quot;sku\&quot;:&quot;+bsh.args[1]+&quot;,\&quot;buy_number\&quot;:1,\&quot;type\&quot;:\&quot;limitcode\&quot;,\&quot;limitproductcode\&quot;:\&quot;&quot;+bsh.args[2]+&quot;\&quot;,\&quot;skn\&quot;:&quot;+bsh.args[3]+&quot;}]&quot;;
String req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=6.0.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;delivery_way=2&amp;fromPage=iFP_Payment&amp;method=app.Shopping.easyCompute&amp;os_version=10.3.2&amp;payment_type=1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=375x667&amp;session_key=56839fa66dc3f1e58f8f3d9a7d12774c&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=&quot;+bsh.args[4]+&quot;&amp;v=7&amp;yoho_bill_term=0&quot;;
String password = &quot;HFCwrxLEBegZqq8OEZxwJQ==&quot;;
String req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_NLogin&amp;isSkip=N&amp;method=sesame.flowering.higher&amp;os_version=10.3.2&amp;password=&quot;+password+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;profile=&quot;+bsh.args[0]+&quot;&amp;screen_size=375x667&amp;shopping_key=&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=0&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ... @@ -227,8 +141,8 @@ for(byte b : btResult){
sb.append(Integer.toHexString(bt));
}
String md5 = sb.toString();
product_sku_list=URLEncoder.encode(product_sku_list);
req = &quot;_sncp=&quot;+bsh.args[0]+&quot;&amp;app_version=6.0.0&amp;cart_type=ordinary&amp;client_type=&quot;+clientType+&quot;&amp;delivery_way=2&amp;fromPage=iFP_Payment&amp;method=app.Shopping.easyCompute&amp;os_version=10.3.2&amp;payment_type=1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;screen_size=375x667&amp;session_key=56839fa66dc3f1e58f8f3d9a7d12774c&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=&quot;+bsh.args[4]+&quot;&amp;v=7&amp;yoho_bill_term=0&quot;;
password=URLEncoder.encode(password);
req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;fromPage=iFP_NLogin&amp;isSkip=N&amp;method=sesame.flowering.higher&amp;os_version=10.3.2&amp;password=&quot;+password+&quot;&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;profile=&quot;+bsh.args[0]+&quot;&amp;screen_size=375x667&amp;shopping_key=&amp;udid=4d08039b26ebafdea8f35336319bfdcd634029d3&amp;uid=0&amp;v=7&quot;;
vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
</BeanShellPreProcessor>
<hashTree/>
... ...