Showing
1 changed file
with
11 additions
and
11 deletions
@@ -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">搜索标语</stringProp> | 244 | + <stringProp name="TestPlan.comments">领卷中心</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">搜索标语</stringProp> | 272 | + <stringProp name="TestPlan.comments">领卷中心</stringProp> |
273 | </HTTPSamplerProxy> | 273 | </HTTPSamplerProxy> |
274 | <hashTree> | 274 | <hashTree> |
275 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | 275 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置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 = {"android","iphone"}; | ||
283 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585","a85bb0674e08986c6b115d5e3a4884fa"}; | ||
284 | -int rd = new Random().nextInt(2); | 282 | +String[] clientTypes = {"android"}; |
283 | +String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
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 = "yohobuy:web"; | ||
288 | -String req = "app_version=5.8.0&client_type="+clientType+"&gender=1,3&max_sort_id=7&method=web.search.banner&middle_sort_id=49&os_version="+os_version+"&position_id=10&private_key="+privateKey+"&screen_size=720x1280&v=7"; | 287 | +String os_version = "yohobuy:h5"; |
288 | +String req = "app_version=5.9.0&client_type="+clientType+"&contentCode=b78b32ed81b18dde8ac84fd33602b88b&method=app.promotion.queryCouponCenter&os_version="+os_version+"&private_key="+privateKey+"&screen_size=720x1280&session_key=8913f1f61ab5e4dbe598114bc2829937&uid="+bsh.args[0]+"&v=7"; | ||
289 | MessageDigest md = MessageDigest.getInstance("MD5"); | 289 | MessageDigest md = MessageDigest.getInstance("MD5"); |
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 = "app_version=5.8.0&client_type="+clientType+"&gender=1,3&max_sort_id=7&method=web.search.banner&middle_sort_id=49&os_version="+os_version+"&position_id=10&private_key="+privateKey+"&screen_size=720x1280&v=7"; | 303 | +req = "app_version=5.9.0&client_type="+clientType+"&contentCode=b78b32ed81b18dde8ac84fd33602b88b&method=app.promotion.queryCouponCenter&os_version="+os_version+"&private_key="+privateKey+"&screen_size=720x1280&session_key=8913f1f61ab5e4dbe598114bc2829937&uid="+bsh.args[0]+"&v=7"; |
304 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | 304 | vars.put("searchValue",req+"&client_secret="+md5);</stringProp> |
305 | </BeanShellPreProcessor> | 305 | </BeanShellPreProcessor> |
306 | <hashTree/> | 306 | <hashTree/> |
-
Please register or login to post a comment