Showing
1 changed file
with
6 additions
and
202 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_app_newproduct_recbrand" enabled="true"> | 231 | + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_product_goodDetail" 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_app_newproduct_recbrand" enabled="true"> | 247 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_product_goodDetail" 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,13 +269,13 @@ | @@ -269,13 +269,13 @@ | ||
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">${uid}</stringProp> | 278 | + <stringProp name="parameters">${product_skn} ${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; |
@@ -285,7 +285,7 @@ int rd = new Random().nextInt(1); | @@ -285,7 +285,7 @@ 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 | 287 | ||
288 | -String req = "app_version=5.8.1&client_type="+clientType+"&limit=60&method=app.newproduct.recbrand&os_version=10.3.2&page=1&physical_channel=1&private_key="+privateKey+"&screen_size=414x736&session_key=437f86ad70b9832a1884c357b96e8ffe&udid=fc2fdedc84327f14de31f79adbcd0de61fad0afd&uid="+bsh.args[0]+"&v=7&yh_channel=1"; | 288 | +String req = "app_version=5.6.0&client_type="+clientType+"&method=app.product.goodDetail&os_version=9.0.2&physical_channel=1&private_key="+privateKey+"&product_skn="+bsh.args[0]+"&screen_size=414x736&session_key=0da72536c71ea0956800afdaf71ae088&udid=eae1c459cc40e95414ef186b1d2ad7eac65b9768&uid="+bsh.args[1]+"&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); |
@@ -326,202 +326,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -326,202 +326,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
326 | </ConstantThroughputTimer> | 326 | </ConstantThroughputTimer> |
327 | <hashTree/> | 327 | <hashTree/> |
328 | </hashTree> | 328 | </hashTree> |
329 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_reclist" enabled="true"> | ||
330 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
331 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
332 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
333 | - <intProp name="LoopController.loops">-1</intProp> | ||
334 | - </elementProp> | ||
335 | - <stringProp name="ThreadGroup.num_threads">100</stringProp> | ||
336 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
337 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
338 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
339 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
340 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
341 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
342 | - <stringProp name="TestPlan.comments">新品到着推荐商品列表</stringProp> | ||
343 | - </ThreadGroup> | ||
344 | - <hashTree> | ||
345 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_newproduct_reclist" enabled="true"> | ||
346 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
347 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
348 | - <collectionProp name="Arguments.arguments"> | ||
349 | - <elementProp name="" elementType="HTTPArgument"> | ||
350 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
351 | - <stringProp name="Argument.value"></stringProp> | ||
352 | - <stringProp name="Argument.metadata">=</stringProp> | ||
353 | - </elementProp> | ||
354 | - </collectionProp> | ||
355 | - </elementProp> | ||
356 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
357 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
358 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
359 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
360 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
361 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
362 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
363 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
364 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
365 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
366 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
367 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
368 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
369 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
370 | - <stringProp name="TestPlan.comments">新品到着推荐商品列表</stringProp> | ||
371 | - </HTTPSamplerProxy> | ||
372 | - <hashTree> | ||
373 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
374 | - <stringProp name="TestPlan.comments"></stringProp> | ||
375 | - <boolProp name="resetInterpreter">false</boolProp> | ||
376 | - <stringProp name="parameters">${uid}</stringProp> | ||
377 | - <stringProp name="filename"></stringProp> | ||
378 | - <stringProp name="script">import java.security.MessageDigest; | ||
379 | -import java.util.Random; | ||
380 | -String[] clientTypes = {"android"}; | ||
381 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
382 | -int rd = new Random().nextInt(1); | ||
383 | -String clientType = clientTypes[rd]; | ||
384 | -String privateKey = privateKeys[rd]; | ||
385 | -String os_version = "android5.1.1:Redmi_Note_3"; | ||
386 | -String req = "app_version=5.8.1&client_type="+clientType+"&gender=1,3&limit=20&method=app.newproduct.reclist&order=&os_version="+os_version+"&page=1&physical_channel=1&private_key="+privateKey+"&screen_size=1080x1920&session_key=7ddadfafd388aba86ff13f0d51adf591&udid=8610840369852596e0de9aef48b93f6&uid="+bsh.args[0]+"&v=7&yh_channel=1"; | ||
387 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
388 | -byte[] btInput = req.getBytes(); | ||
389 | -md.update(btInput); | ||
390 | -byte[] btResult = md.digest(); | ||
391 | -StringBuffer sb = new StringBuffer(); | ||
392 | -for(byte b : btResult){ | ||
393 | - int bt = b&0xff; | ||
394 | - if(bt<16){ | ||
395 | - sb.append(0); | ||
396 | - } | ||
397 | - sb.append(Integer.toHexString(bt)); | ||
398 | -} | ||
399 | -String md5 = sb.toString(); | ||
400 | -os_version=URLEncoder.encode(os_version); | ||
401 | -req = "app_version=5.8.1&client_type="+clientType+"&gender=1,3&limit=20&method=app.newproduct.reclist&order=&os_version="+os_version+"&page=1&physical_channel=1&private_key="+privateKey+"&screen_size=1080x1920&session_key=7ddadfafd388aba86ff13f0d51adf591&udid=8610840369852596e0de9aef48b93f6&uid="+bsh.args[0]+"&v=7&yh_channel=1"; | ||
402 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
403 | - </BeanShellPreProcessor> | ||
404 | - <hashTree/> | ||
405 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
406 | - <collectionProp name="Asserion.test_strings"> | ||
407 | - <stringProp name="1450572480">"code":200</stringProp> | ||
408 | - </collectionProp> | ||
409 | - <stringProp name="TestPlan.comments"></stringProp> | ||
410 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
411 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
412 | - <intProp name="Assertion.test_type">16</intProp> | ||
413 | - </ResponseAssertion> | ||
414 | - <hashTree/> | ||
415 | - </hashTree> | ||
416 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
417 | - <stringProp name="TestPlan.comments"></stringProp> | ||
418 | - <doubleProp> | ||
419 | - <name>throughput</name> | ||
420 | - <value>60000</value> | ||
421 | - <savedValue>0.0</savedValue> | ||
422 | - </doubleProp> | ||
423 | - <intProp name="calcMode">2</intProp> | ||
424 | - </ConstantThroughputTimer> | ||
425 | - <hashTree/> | ||
426 | - </hashTree> | ||
427 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_recshop" enabled="true"> | ||
428 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
429 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
430 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
431 | - <intProp name="LoopController.loops">-1</intProp> | ||
432 | - </elementProp> | ||
433 | - <stringProp name="ThreadGroup.num_threads">100</stringProp> | ||
434 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
435 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
436 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
437 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
438 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
439 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
440 | - <stringProp name="TestPlan.comments">新品到着推荐店铺</stringProp> | ||
441 | - </ThreadGroup> | ||
442 | - <hashTree> | ||
443 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_newproduct_recshop" enabled="true"> | ||
444 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
445 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
446 | - <collectionProp name="Arguments.arguments"> | ||
447 | - <elementProp name="" elementType="HTTPArgument"> | ||
448 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
449 | - <stringProp name="Argument.value"></stringProp> | ||
450 | - <stringProp name="Argument.metadata">=</stringProp> | ||
451 | - </elementProp> | ||
452 | - </collectionProp> | ||
453 | - </elementProp> | ||
454 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
455 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
456 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
457 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
458 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
459 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
460 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
461 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
462 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
463 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
464 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
465 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
466 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
467 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
468 | - <stringProp name="TestPlan.comments">新品到着推荐店铺</stringProp> | ||
469 | - </HTTPSamplerProxy> | ||
470 | - <hashTree> | ||
471 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
472 | - <stringProp name="TestPlan.comments"></stringProp> | ||
473 | - <boolProp name="resetInterpreter">false</boolProp> | ||
474 | - <stringProp name="parameters">${uid}</stringProp> | ||
475 | - <stringProp name="filename"></stringProp> | ||
476 | - <stringProp name="script">import java.security.MessageDigest; | ||
477 | -import java.util.Random; | ||
478 | -String[] clientTypes = {"android"}; | ||
479 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
480 | -int rd = new Random().nextInt(1); | ||
481 | -String clientType = clientTypes[rd]; | ||
482 | -String privateKey = privateKeys[rd]; | ||
483 | -String os_version = "android5.1.1:Redmi_Note_3"; | ||
484 | -String req = "app_version=5.8.1&client_type="+clientType+"&contentCode=1f2e07cb63811680154ba693c954dd62&gender=1,3&limit=10&method=app.newproduct.recshop&os_version="+os_version+"&page=1&physical_channel=1&private_key="+privateKey+"&screen_size=1080x1920&session_key=7ddadfafd388aba86ff13f0d51adf591&udid=8610840369852596e0de9aef48b93f6&uid="+bsh.args[0]+"&v=7&yh_channel=1"; | ||
485 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
486 | -byte[] btInput = req.getBytes(); | ||
487 | -md.update(btInput); | ||
488 | -byte[] btResult = md.digest(); | ||
489 | -StringBuffer sb = new StringBuffer(); | ||
490 | -for(byte b : btResult){ | ||
491 | - int bt = b&0xff; | ||
492 | - if(bt<16){ | ||
493 | - sb.append(0); | ||
494 | - } | ||
495 | - sb.append(Integer.toHexString(bt)); | ||
496 | -} | ||
497 | -String md5 = sb.toString(); | ||
498 | -os_version=URLEncoder.encode(os_version); | ||
499 | -req = "app_version=5.8.1&client_type="+clientType+"&contentCode=1f2e07cb63811680154ba693c954dd62&gender=1,3&limit=10&method=app.newproduct.recshop&os_version="+os_version+"&page=1&physical_channel=1&private_key="+privateKey+"&screen_size=1080x1920&session_key=7ddadfafd388aba86ff13f0d51adf591&udid=8610840369852596e0de9aef48b93f6&uid="+bsh.args[0]+"&v=7&yh_channel=1"; | ||
500 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
501 | - </BeanShellPreProcessor> | ||
502 | - <hashTree/> | ||
503 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
504 | - <collectionProp name="Asserion.test_strings"> | ||
505 | - <stringProp name="1450572480">"code":200</stringProp> | ||
506 | - </collectionProp> | ||
507 | - <stringProp name="TestPlan.comments"></stringProp> | ||
508 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
509 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
510 | - <intProp name="Assertion.test_type">16</intProp> | ||
511 | - </ResponseAssertion> | ||
512 | - <hashTree/> | ||
513 | - </hashTree> | ||
514 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
515 | - <stringProp name="TestPlan.comments"></stringProp> | ||
516 | - <doubleProp> | ||
517 | - <name>throughput</name> | ||
518 | - <value>60000</value> | ||
519 | - <savedValue>0.0</savedValue> | ||
520 | - </doubleProp> | ||
521 | - <intProp name="calcMode">2</intProp> | ||
522 | - </ConstantThroughputTimer> | ||
523 | - <hashTree/> | ||
524 | - </hashTree> | ||
525 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> | 329 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> |
526 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> | 330 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> |
527 | <collectionProp name="Arguments.arguments"> | 331 | <collectionProp name="Arguments.arguments"> |
-
Please register or login to post a comment