Authored by Rong

commit by shell

@@ -463,12 +463,83 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri @@ -463,12 +463,83 @@ vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stri
463 </ResponseAssertion> 463 </ResponseAssertion>
464 <hashTree/> 464 <hashTree/>
465 </hashTree> 465 </hashTree>
  466 + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="child_tc_app_ShoppingForOffline_remove" enabled="true">
  467 + <boolProp name="HTTPSampler.postBodyRaw">true</boolProp>
  468 + <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
  469 + <collectionProp name="Arguments.arguments">
  470 + <elementProp name="" elementType="HTTPArgument">
  471 + <boolProp name="HTTPArgument.always_encode">false</boolProp>
  472 + <stringProp name="Argument.value"></stringProp>
  473 + <stringProp name="Argument.metadata">=</stringProp>
  474 + </elementProp>
  475 + </collectionProp>
  476 + </elementProp>
  477 + <stringProp name="HTTPSampler.domain"></stringProp>
  478 + <stringProp name="HTTPSampler.port"></stringProp>
  479 + <stringProp name="HTTPSampler.connect_timeout"></stringProp>
  480 + <stringProp name="HTTPSampler.response_timeout"></stringProp>
  481 + <stringProp name="HTTPSampler.protocol"></stringProp>
  482 + <stringProp name="HTTPSampler.contentEncoding"></stringProp>
  483 + <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp>
  484 + <stringProp name="HTTPSampler.method">GET</stringProp>
  485 + <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
  486 + <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
  487 + <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
  488 + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
  489 + <boolProp name="HTTPSampler.monitor">false</boolProp>
  490 + <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
  491 + <stringProp name="TestPlan.comments"></stringProp>
  492 + </HTTPSamplerProxy>
  493 + <hashTree>
  494 + <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="&#21069;&#32622;BeanShell" enabled="true">
  495 + <stringProp name="TestPlan.comments"></stringProp>
  496 + <boolProp name="resetInterpreter">false</boolProp>
  497 + <stringProp name="parameters">${offline_uid} ${offline_product_sku} ${offline_shopping_key} ${offline_warehouse_id}</stringProp>
  498 + <stringProp name="filename"></stringProp>
  499 + <stringProp name="script">import java.security.MessageDigest;
  500 +import java.util.Random;
  501 +String[] clientTypes = {&quot;android&quot;};
  502 +String[] privateKeys = {&quot;fd4ad5fcfa0de589ef238c0e7331b585&quot;};
  503 +int rd = new Random().nextInt(1);
  504 +String clientType = clientTypes[rd];
  505 +String privateKey = privateKeys[rd];
  506 +String product_sku_list = &quot;[{\&quot;buy_number\&quot;:\&quot;1\&quot;,\&quot;product_sku\&quot;:\&quot;&quot;+bsh.args[1]+&quot;\&quot;,\&quot;buy_type\&quot;:\&quot;1\&quot;}]&quot;;
  507 +String req = &quot;app_version=5.6.0&amp;client_type=&quot;+clientType+&quot;&amp;employee_uid=&quot;+bsh.args[0]+&quot;&amp;method=app.ShoppingForOffline.remove&amp;os_version=10.3.1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;promotion_id=0&amp;screen_size=768x1024&amp;session_key=2a557208e3537f112685015c36e4e58e&amp;shopping_key=&quot;+bsh.args[2]+&quot;&amp;v=7&amp;warehouse_id=&quot;+bsh.args[3]+&quot;&quot;;
  508 +MessageDigest md = MessageDigest.getInstance(&quot;MD5&quot;);
  509 +byte[] btInput = req.getBytes();
  510 +md.update(btInput);
  511 +byte[] btResult = md.digest();
  512 +StringBuffer sb = new StringBuffer();
  513 +for(byte b : btResult){
  514 + int bt = b&amp;0xff;
  515 + if(bt&lt;16){
  516 + sb.append(0);
  517 + }
  518 + sb.append(Integer.toHexString(bt));
  519 +}
  520 +String md5 = sb.toString();
  521 +product_sku_list=URLEncoder.encode(product_sku_list);
  522 +req = &quot;app_version=5.6.0&amp;client_type=&quot;+clientType+&quot;&amp;employee_uid=&quot;+bsh.args[0]+&quot;&amp;method=app.ShoppingForOffline.remove&amp;os_version=10.3.1&amp;private_key=&quot;+privateKey+&quot;&amp;product_sku_list=&quot;+product_sku_list+&quot;&amp;promotion_id=0&amp;screen_size=768x1024&amp;session_key=2a557208e3537f112685015c36e4e58e&amp;shopping_key=&quot;+bsh.args[2]+&quot;&amp;v=7&amp;warehouse_id=&quot;+bsh.args[3]+&quot;&quot;;
  523 +vars.put(&quot;searchValue&quot;,req+&quot;&amp;client_secret=&quot;+md5);</stringProp>
  524 + </BeanShellPreProcessor>
  525 + <hashTree/>
  526 + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="&#21709;&#24212;&#26029;&#35328;" enabled="true">
  527 + <collectionProp name="Asserion.test_strings">
  528 + <stringProp name="1450572480">&quot;code&quot;:200</stringProp>
  529 + </collectionProp>
  530 + <stringProp name="TestPlan.comments"></stringProp>
  531 + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
  532 + <boolProp name="Assertion.assume_success">false</boolProp>
  533 + <intProp name="Assertion.test_type">16</intProp>
  534 + </ResponseAssertion>
  535 + <hashTree/>
  536 + </hashTree>
466 </hashTree> 537 </hashTree>
467 <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true"> 538 <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="&#22266;&#23450;TPM" enabled="true">
468 <stringProp name="TestPlan.comments"></stringProp> 539 <stringProp name="TestPlan.comments"></stringProp>
469 <doubleProp> 540 <doubleProp>
470 <name>throughput</name> 541 <name>throughput</name>
471 - <value>3000</value> 542 + <value>3600</value>
472 <savedValue>0.0</savedValue> 543 <savedValue>0.0</savedValue>
473 </doubleProp> 544 </doubleProp>
474 <intProp name="calcMode">2</intProp> 545 <intProp name="calcMode">2</intProp>