Authored by Rong

commit by shell

... ... @@ -216,7 +216,7 @@
<stringProp name="shareMode">shareMode.all</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_secondPage_categoryList" enabled="true">
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_shopActivity_activityList" 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>
... ... @@ -229,10 +229,10 @@
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="TestPlan.comments">&#21697;&#31867;&#39302;</stringProp>
<stringProp name="TestPlan.comments"></stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_secondPage_categoryList" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_shopActivity_activityList" enabled="true">
<boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments">
... ... @@ -257,105 +257,7 @@
<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">&#21697;&#31867;&#39302;</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">${uid_test}</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 os_version = &quot;android7.0:EVA-AL10&quot;;
String req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;content_code=528e6974107d358148271357f999446f&amp;gender=2,3&amp;limit=50&amp;method=app.secondPage.categoryList&amp;os_version=&quot;+os_version+&quot;&amp;page=1&amp;physical_channel=2&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=1080x1794&amp;session_key=78f9d0e45df94cee075dd0db965b5c55&amp;udid=8631970399531048500d3c70eb7133e&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&amp;yh_channel=2&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();
os_version=URLEncoder.encode(os_version);
req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;content_code=528e6974107d358148271357f999446f&amp;gender=2,3&amp;limit=50&amp;method=app.secondPage.categoryList&amp;os_version=&quot;+os_version+&quot;&amp;page=1&amp;physical_channel=2&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=1080x1794&amp;session_key=78f9d0e45df94cee075dd0db965b5c55&amp;udid=8631970399531048500d3c70eb7133e&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&amp;yh_channel=2&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_secondPage_shopsList" 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>
<stringProp name="TestPlan.comments">&#21697;&#29260;&#39302;</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_secondPage_shopsList" 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">&#21697;&#29260;&#39302;</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
... ... @@ -371,7 +273,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;content_code=528e6974107d358148271357f999446f&amp;limit=50&amp;method=app.secondPage.shopsList&amp;os_version=10.3.3&amp;page=1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=a6fdb0652bc4a4b601e024e385b8421b&amp;udid=778326c9c83ea378c09d0108e367b2a22394b0fc&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
String req = &quot;app_version=6.0.0&amp;client_type=&quot;+clientType+&quot;&amp;limit=20&amp;method=app.shopActivity.activityList&amp;os_version=10.3.3&amp;page=1&amp;physical_channel=1&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=375x667&amp;session_key=3d643a53e0d0181eee90b7824c85169b&amp;udid=9cf3c7118e716c021db517bcab6c1716b34dd859&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
byte[] btInput = req.getBytes();
md.update(btInput);
... ...