Authored by Rong

commit by shell

@@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
228 <stringProp name="shareMode">shareMode.all</stringProp> 228 <stringProp name="shareMode">shareMode.all</stringProp>
229 </CSVDataSet> 229 </CSVDataSet>
230 <hashTree/> 230 <hashTree/>
231 - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_web_search_banner" enabled="true"> 231 + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_promotion_queryCouponCenter" enabled="true">
232 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> 232 <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
233 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> 233 <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true">
234 <boolProp name="LoopController.continue_forever">false</boolProp> 234 <boolProp name="LoopController.continue_forever">false</boolProp>
@@ -241,10 +241,10 @@ @@ -241,10 +241,10 @@
241 <boolProp name="ThreadGroup.scheduler">false</boolProp> 241 <boolProp name="ThreadGroup.scheduler">false</boolProp>
242 <stringProp name="ThreadGroup.duration"></stringProp> 242 <stringProp name="ThreadGroup.duration"></stringProp>
243 <stringProp name="ThreadGroup.delay"></stringProp> 243 <stringProp name="ThreadGroup.delay"></stringProp>
244 - <stringProp name="TestPlan.comments">&#25628;&#32034;&#26631;&#35821;</stringProp> 244 + <stringProp name="TestPlan.comments">&#39046;&#21367;&#20013;&#24515;</stringProp>
245 </ThreadGroup> 245 </ThreadGroup>
246 <hashTree> 246 <hashTree>
247 - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_web_search_banner" enabled="true"> 247 + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_promotion_queryCouponCenter" enabled="true">
248 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> 248 <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
249 <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> 249 <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
250 <collectionProp name="Arguments.arguments"> 250 <collectionProp name="Arguments.arguments">
@@ -269,23 +269,23 @@ @@ -269,23 +269,23 @@
269 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> 269 <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
270 <boolProp name="HTTPSampler.monitor">false</boolProp> 270 <boolProp name="HTTPSampler.monitor">false</boolProp>
271 <stringProp name="HTTPSampler.embedded_url_re"></stringProp> 271 <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
272 - <stringProp name="TestPlan.comments">&#25628;&#32034;&#26631;&#35821;</stringProp> 272 + <stringProp name="TestPlan.comments">&#39046;&#21367;&#20013;&#24515;</stringProp>
273 </HTTPSamplerProxy> 273 </HTTPSamplerProxy>
274 <hashTree> 274 <hashTree>
275 <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true"> 275 <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
276 <stringProp name="TestPlan.comments"></stringProp> 276 <stringProp name="TestPlan.comments"></stringProp>
277 <boolProp name="resetInterpreter">false</boolProp> 277 <boolProp name="resetInterpreter">false</boolProp>
278 - <stringProp name="parameters"></stringProp> 278 + <stringProp name="parameters">${uid}</stringProp>
279 <stringProp name="filename"></stringProp> 279 <stringProp name="filename"></stringProp>
280 <stringProp name="script">import java.security.MessageDigest; 280 <stringProp name="script">import java.security.MessageDigest;
281 import java.util.Random; 281 import java.util.Random;
282 -String[] clientTypes = {&quot;android&quot;,&quot;iphone&quot;};  
283 -String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;,&quot;a85bb0674e08986c6b115d5e3a4884fa&quot;};  
284 -int rd = new Random().nextInt(2); 282 +String[] clientTypes = {&quot;android&quot;};
  283 +String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
  284 +int rd = new Random().nextInt(1);
285 String clientType = clientTypes[rd]; 285 String clientType = clientTypes[rd];
286 String privateKey = privateKeys[rd]; 286 String privateKey = privateKeys[rd];
287 -String os_version = &quot;yohobuy:web&quot;;  
288 -String req = &quot;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;gender=1,3&amp;max_sort_id=7&amp;method=web.search.banner&amp;middle_sort_id=49&amp;os_version=&quot;+os_version+&quot;&amp;position_id=10&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;v=7&quot;; 287 +String os_version = &quot;yohobuy:h5&quot;;
  288 +String req = &quot;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;contentCode=b78b32ed81b18dde8ac84fd33602b88b&amp;method=app.promotion.queryCouponCenter&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=8913f1f61ab5e4dbe598114bc2829937&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
289 MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;); 289 MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
290 byte[] btInput = req.getBytes(); 290 byte[] btInput = req.getBytes();
291 md.update(btInput); 291 md.update(btInput);
@@ -300,7 +300,7 @@ for(byte b : btResult){ @@ -300,7 +300,7 @@ for(byte b : btResult){
300 } 300 }
301 String md5 = sb.toString(); 301 String md5 = sb.toString();
302 os_version=URLEncoder.encode(os_version); 302 os_version=URLEncoder.encode(os_version);
303 -req = &quot;app_version=5.8.0&amp;client_type=&quot;+clientType+&quot;&amp;gender=1,3&amp;max_sort_id=7&amp;method=web.search.banner&amp;middle_sort_id=49&amp;os_version=&quot;+os_version+&quot;&amp;position_id=10&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;v=7&quot;; 303 +req = &quot;app_version=5.9.0&amp;client_type=&quot;+clientType+&quot;&amp;contentCode=b78b32ed81b18dde8ac84fd33602b88b&amp;method=app.promotion.queryCouponCenter&amp;os_version=&quot;+os_version+&quot;&amp;private_key=&quot;+privateKey+&quot;&amp;screen_size=720x1280&amp;session_key=8913f1f61ab5e4dbe598114bc2829937&amp;uid=&quot;+bsh.args[0]+&quot;&amp;v=7&quot;;
304 vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp> 304 vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
305 </BeanShellPreProcessor> 305 </BeanShellPreProcessor>
306 <hashTree/> 306 <hashTree/>