Showing
1 changed file
with
0 additions
and
380 deletions
@@ -299,386 +299,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -299,386 +299,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
299 | </ConstantThroughputTimer> | 299 | </ConstantThroughputTimer> |
300 | <hashTree/> | 300 | <hashTree/> |
301 | </hashTree> | 301 | </hashTree> |
302 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_consult_common" enabled="true"> | ||
303 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
304 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
305 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
306 | - <intProp name="LoopController.loops">-1</intProp> | ||
307 | - </elementProp> | ||
308 | - <stringProp name="ThreadGroup.num_threads">80</stringProp> | ||
309 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
310 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
311 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
312 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
313 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
314 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
315 | - <stringProp name="TestPlan.comments">咨询信息</stringProp> | ||
316 | - </ThreadGroup> | ||
317 | - <hashTree> | ||
318 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_consult_common" enabled="true"> | ||
319 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
320 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
321 | - <collectionProp name="Arguments.arguments"> | ||
322 | - <elementProp name="" elementType="HTTPArgument"> | ||
323 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
324 | - <stringProp name="Argument.value"></stringProp> | ||
325 | - <stringProp name="Argument.metadata">=</stringProp> | ||
326 | - </elementProp> | ||
327 | - </collectionProp> | ||
328 | - </elementProp> | ||
329 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
330 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
331 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
332 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
333 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
334 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
335 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
336 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
337 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
338 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
339 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
340 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
341 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
342 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
343 | - <stringProp name="TestPlan.comments">咨询信息</stringProp> | ||
344 | - </HTTPSamplerProxy> | ||
345 | - <hashTree> | ||
346 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
347 | - <stringProp name="TestPlan.comments"></stringProp> | ||
348 | - <boolProp name="resetInterpreter">false</boolProp> | ||
349 | - <stringProp name="parameters">${uid}</stringProp> | ||
350 | - <stringProp name="filename"></stringProp> | ||
351 | - <stringProp name="script">import java.security.MessageDigest; | ||
352 | -import java.util.Random; | ||
353 | -String[] clientTypes = {"android"}; | ||
354 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
355 | -int rd = new Random().nextInt(1); | ||
356 | -String clientType = clientTypes[rd]; | ||
357 | -String privateKey = privateKeys[rd]; | ||
358 | -String req = "app_version=5.8.1&client_type="+clientType+"&fromPage=iFP_ProductDetail&method=app.consult.common&os_version=10.3.2&physical_channel=1&private_key="+privateKey+"&screen_size=414x736&session_key=4d9b8efe7b861105494d401783830da2&udid=19b53b1e035e604452daff3012a7cb2797cbfc0b&uid="+bsh.args[0]+"&v=7"; | ||
359 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
360 | -byte[] btInput = req.getBytes(); | ||
361 | -md.update(btInput); | ||
362 | -byte[] btResult = md.digest(); | ||
363 | -StringBuffer sb = new StringBuffer(); | ||
364 | -for(byte b : btResult){ | ||
365 | - int bt = b&0xff; | ||
366 | - if(bt<16){ | ||
367 | - sb.append(0); | ||
368 | - } | ||
369 | - sb.append(Integer.toHexString(bt)); | ||
370 | -} | ||
371 | -String md5 = sb.toString(); | ||
372 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
373 | - </BeanShellPreProcessor> | ||
374 | - <hashTree/> | ||
375 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
376 | - <collectionProp name="Asserion.test_strings"> | ||
377 | - <stringProp name="1450572480">"code":200</stringProp> | ||
378 | - </collectionProp> | ||
379 | - <stringProp name="TestPlan.comments"></stringProp> | ||
380 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
381 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
382 | - <intProp name="Assertion.test_type">16</intProp> | ||
383 | - </ResponseAssertion> | ||
384 | - <hashTree/> | ||
385 | - </hashTree> | ||
386 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
387 | - <stringProp name="TestPlan.comments"></stringProp> | ||
388 | - <doubleProp> | ||
389 | - <name>throughput</name> | ||
390 | - <value>120000</value> | ||
391 | - <savedValue>0.0</savedValue> | ||
392 | - </doubleProp> | ||
393 | - <intProp name="calcMode">2</intProp> | ||
394 | - </ConstantThroughputTimer> | ||
395 | - <hashTree/> | ||
396 | - </hashTree> | ||
397 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_query_bundleSkn" enabled="true"> | ||
398 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
399 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
400 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
401 | - <intProp name="LoopController.loops">-1</intProp> | ||
402 | - </elementProp> | ||
403 | - <stringProp name="ThreadGroup.num_threads">80</stringProp> | ||
404 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
405 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
406 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
407 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
408 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
409 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
410 | - <stringProp name="TestPlan.comments">套餐</stringProp> | ||
411 | - </ThreadGroup> | ||
412 | - <hashTree> | ||
413 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_query_bundleSkn" enabled="true"> | ||
414 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
415 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
416 | - <collectionProp name="Arguments.arguments"> | ||
417 | - <elementProp name="" elementType="HTTPArgument"> | ||
418 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
419 | - <stringProp name="Argument.value"></stringProp> | ||
420 | - <stringProp name="Argument.metadata">=</stringProp> | ||
421 | - </elementProp> | ||
422 | - </collectionProp> | ||
423 | - </elementProp> | ||
424 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
425 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
426 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
427 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
428 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
429 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
430 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
431 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
432 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
433 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
434 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
435 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
436 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
437 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
438 | - <stringProp name="TestPlan.comments">套餐</stringProp> | ||
439 | - </HTTPSamplerProxy> | ||
440 | - <hashTree> | ||
441 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
442 | - <stringProp name="TestPlan.comments"></stringProp> | ||
443 | - <boolProp name="resetInterpreter">false</boolProp> | ||
444 | - <stringProp name="parameters">${product_skn} ${uid}</stringProp> | ||
445 | - <stringProp name="filename"></stringProp> | ||
446 | - <stringProp name="script">import java.security.MessageDigest; | ||
447 | -import java.util.Random; | ||
448 | -String[] clientTypes = {"android"}; | ||
449 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
450 | -int rd = new Random().nextInt(1); | ||
451 | -String clientType = clientTypes[rd]; | ||
452 | -String privateKey = privateKeys[rd]; | ||
453 | -String req = "app_version=5.5.2&client_type="+clientType+"&gender=1,3&method=app.query.bundleSkn&os_version=android7.0:VIE-AL10&physical_channel=1&private_key="+privateKey+"&product_skn="+bsh.args[0]+"&screen_size=1080x1800&session_key=4509fb6ae295737eaeea4f7d08223c49&udid=861962037760740697006a7ec7b4f4d&uid="+bsh.args[1]+"&v=7&yh_channel=1"; | ||
454 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
455 | -byte[] btInput = req.getBytes(); | ||
456 | -md.update(btInput); | ||
457 | -byte[] btResult = md.digest(); | ||
458 | -StringBuffer sb = new StringBuffer(); | ||
459 | -for(byte b : btResult){ | ||
460 | - int bt = b&0xff; | ||
461 | - if(bt<16){ | ||
462 | - sb.append(0); | ||
463 | - } | ||
464 | - sb.append(Integer.toHexString(bt)); | ||
465 | -} | ||
466 | -String md5 = sb.toString(); | ||
467 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
468 | - </BeanShellPreProcessor> | ||
469 | - <hashTree/> | ||
470 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
471 | - <collectionProp name="Asserion.test_strings"> | ||
472 | - <stringProp name="1450572480">"code":200</stringProp> | ||
473 | - </collectionProp> | ||
474 | - <stringProp name="TestPlan.comments"></stringProp> | ||
475 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
476 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
477 | - <intProp name="Assertion.test_type">16</intProp> | ||
478 | - </ResponseAssertion> | ||
479 | - <hashTree/> | ||
480 | - </hashTree> | ||
481 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
482 | - <stringProp name="TestPlan.comments"></stringProp> | ||
483 | - <doubleProp> | ||
484 | - <name>throughput</name> | ||
485 | - <value>120000</value> | ||
486 | - <savedValue>0.0</savedValue> | ||
487 | - </doubleProp> | ||
488 | - <intProp name="calcMode">2</intProp> | ||
489 | - </ConstantThroughputTimer> | ||
490 | - <hashTree/> | ||
491 | - </hashTree> | ||
492 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_show_recentShareOrderByProductId" enabled="true"> | ||
493 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
494 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
495 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
496 | - <intProp name="LoopController.loops">-1</intProp> | ||
497 | - </elementProp> | ||
498 | - <stringProp name="ThreadGroup.num_threads">80</stringProp> | ||
499 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
500 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
501 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
502 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
503 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
504 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
505 | - <stringProp name="TestPlan.comments">最近一条晒单信息</stringProp> | ||
506 | - </ThreadGroup> | ||
507 | - <hashTree> | ||
508 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_show_recentShareOrderByProductId" enabled="true"> | ||
509 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
510 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
511 | - <collectionProp name="Arguments.arguments"> | ||
512 | - <elementProp name="" elementType="HTTPArgument"> | ||
513 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
514 | - <stringProp name="Argument.value"></stringProp> | ||
515 | - <stringProp name="Argument.metadata">=</stringProp> | ||
516 | - </elementProp> | ||
517 | - </collectionProp> | ||
518 | - </elementProp> | ||
519 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
520 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
521 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
522 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
523 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
524 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
525 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
526 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
527 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
528 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
529 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
530 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
531 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
532 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
533 | - <stringProp name="TestPlan.comments">最近一条晒单信息</stringProp> | ||
534 | - </HTTPSamplerProxy> | ||
535 | - <hashTree> | ||
536 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
537 | - <stringProp name="TestPlan.comments"></stringProp> | ||
538 | - <boolProp name="resetInterpreter">false</boolProp> | ||
539 | - <stringProp name="parameters">${product_id} ${uid}</stringProp> | ||
540 | - <stringProp name="filename"></stringProp> | ||
541 | - <stringProp name="script">import java.security.MessageDigest; | ||
542 | -import java.util.Random; | ||
543 | -String[] clientTypes = {"android"}; | ||
544 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
545 | -int rd = new Random().nextInt(1); | ||
546 | -String clientType = clientTypes[rd]; | ||
547 | -String privateKey = privateKeys[rd]; | ||
548 | -String req = "app_version=5.8.1&client_type="+clientType+"&method=show.recentShareOrderByProductId&os_version=10.2.1&physical_channel=1&private_key="+privateKey+"&productId="+bsh.args[0]+"&screen_size=375x667&session_key=f4e5e2c6900d6f42df7712872d5fc8c1&udid=53a25f1afbdb061da77f6ed9da0d49f9d482eca1&uid="+bsh.args[1]+"&v=7"; | ||
549 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
550 | -byte[] btInput = req.getBytes(); | ||
551 | -md.update(btInput); | ||
552 | -byte[] btResult = md.digest(); | ||
553 | -StringBuffer sb = new StringBuffer(); | ||
554 | -for(byte b : btResult){ | ||
555 | - int bt = b&0xff; | ||
556 | - if(bt<16){ | ||
557 | - sb.append(0); | ||
558 | - } | ||
559 | - sb.append(Integer.toHexString(bt)); | ||
560 | -} | ||
561 | -String md5 = sb.toString(); | ||
562 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
563 | - </BeanShellPreProcessor> | ||
564 | - <hashTree/> | ||
565 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
566 | - <collectionProp name="Asserion.test_strings"> | ||
567 | - <stringProp name="1450572480">"code":200</stringProp> | ||
568 | - </collectionProp> | ||
569 | - <stringProp name="TestPlan.comments"></stringProp> | ||
570 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
571 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
572 | - <intProp name="Assertion.test_type">16</intProp> | ||
573 | - </ResponseAssertion> | ||
574 | - <hashTree/> | ||
575 | - </hashTree> | ||
576 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
577 | - <stringProp name="TestPlan.comments"></stringProp> | ||
578 | - <doubleProp> | ||
579 | - <name>throughput</name> | ||
580 | - <value>120000</value> | ||
581 | - <savedValue>0.0</savedValue> | ||
582 | - </doubleProp> | ||
583 | - <intProp name="calcMode">2</intProp> | ||
584 | - </ConstantThroughputTimer> | ||
585 | - <hashTree/> | ||
586 | - </hashTree> | ||
587 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_product_queryShopsInfoById" enabled="true"> | ||
588 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
589 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
590 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
591 | - <intProp name="LoopController.loops">-1</intProp> | ||
592 | - </elementProp> | ||
593 | - <stringProp name="ThreadGroup.num_threads">80</stringProp> | ||
594 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
595 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
596 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
597 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
598 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
599 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
600 | - <stringProp name="TestPlan.comments">根据shopId获取店铺信息</stringProp> | ||
601 | - </ThreadGroup> | ||
602 | - <hashTree> | ||
603 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_product_queryShopsInfoById" enabled="true"> | ||
604 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
605 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
606 | - <collectionProp name="Arguments.arguments"> | ||
607 | - <elementProp name="" elementType="HTTPArgument"> | ||
608 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
609 | - <stringProp name="Argument.value"></stringProp> | ||
610 | - <stringProp name="Argument.metadata">=</stringProp> | ||
611 | - </elementProp> | ||
612 | - </collectionProp> | ||
613 | - </elementProp> | ||
614 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
615 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
616 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
617 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
618 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
619 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
620 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
621 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
622 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
623 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
624 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
625 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
626 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
627 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
628 | - <stringProp name="TestPlan.comments">根据shopId获取店铺信息</stringProp> | ||
629 | - </HTTPSamplerProxy> | ||
630 | - <hashTree> | ||
631 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
632 | - <stringProp name="TestPlan.comments"></stringProp> | ||
633 | - <boolProp name="resetInterpreter">false</boolProp> | ||
634 | - <stringProp name="parameters">${shop_id} ${uid}</stringProp> | ||
635 | - <stringProp name="filename"></stringProp> | ||
636 | - <stringProp name="script">import java.security.MessageDigest; | ||
637 | -import java.util.Random; | ||
638 | -String[] clientTypes = {"android"}; | ||
639 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
640 | -int rd = new Random().nextInt(1); | ||
641 | -String clientType = clientTypes[rd]; | ||
642 | -String privateKey = privateKeys[rd]; | ||
643 | -String req = "app_version=5.8.1&brand_id=208&client_type="+clientType+"&fromPage=iFP_ProductDetail&method=app.product.queryShopsInfoById&os_version=10.2&physical_channel=1&private_key="+privateKey+"&screen_size=375x667&session_key=9a87c67cf18e27a65bed652166e59591&shop_id="+bsh.args[0]+"&udid=66d83bdf3ab4f5c64b1c2d8ee0be7b608ce64b9a&uid="+bsh.args[1]+"&v=7"; | ||
644 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
645 | -byte[] btInput = req.getBytes(); | ||
646 | -md.update(btInput); | ||
647 | -byte[] btResult = md.digest(); | ||
648 | -StringBuffer sb = new StringBuffer(); | ||
649 | -for(byte b : btResult){ | ||
650 | - int bt = b&0xff; | ||
651 | - if(bt<16){ | ||
652 | - sb.append(0); | ||
653 | - } | ||
654 | - sb.append(Integer.toHexString(bt)); | ||
655 | -} | ||
656 | -String md5 = sb.toString(); | ||
657 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
658 | - </BeanShellPreProcessor> | ||
659 | - <hashTree/> | ||
660 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
661 | - <collectionProp name="Asserion.test_strings"> | ||
662 | - <stringProp name="1450572480">"code":200</stringProp> | ||
663 | - </collectionProp> | ||
664 | - <stringProp name="TestPlan.comments"></stringProp> | ||
665 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
666 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
667 | - <intProp name="Assertion.test_type">16</intProp> | ||
668 | - </ResponseAssertion> | ||
669 | - <hashTree/> | ||
670 | - </hashTree> | ||
671 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
672 | - <stringProp name="TestPlan.comments"></stringProp> | ||
673 | - <doubleProp> | ||
674 | - <name>throughput</name> | ||
675 | - <value>120000</value> | ||
676 | - <savedValue>0.0</savedValue> | ||
677 | - </doubleProp> | ||
678 | - <intProp name="calcMode">2</intProp> | ||
679 | - </ConstantThroughputTimer> | ||
680 | - <hashTree/> | ||
681 | - </hashTree> | ||
682 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> | 302 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> |
683 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> | 303 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> |
684 | <collectionProp name="Arguments.arguments"> | 304 | <collectionProp name="Arguments.arguments"> |
-
Please register or login to post a comment