Showing
1 changed file
with
0 additions
and
196 deletions
@@ -204,104 +204,6 @@ | @@ -204,104 +204,6 @@ | ||
204 | <stringProp name="shareMode">shareMode.all</stringProp> | 204 | <stringProp name="shareMode">shareMode.all</stringProp> |
205 | </CSVDataSet> | 205 | </CSVDataSet> |
206 | <hashTree/> | 206 | <hashTree/> |
207 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_recbrand" enabled="true"> | ||
208 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
209 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
210 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
211 | - <intProp name="LoopController.loops">-1</intProp> | ||
212 | - </elementProp> | ||
213 | - <stringProp name="ThreadGroup.num_threads">100</stringProp> | ||
214 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
215 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
216 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
217 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
218 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
219 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
220 | - <stringProp name="TestPlan.comments">新品到着推荐品牌</stringProp> | ||
221 | - </ThreadGroup> | ||
222 | - <hashTree> | ||
223 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_newproduct_recbrand" enabled="true"> | ||
224 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
225 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
226 | - <collectionProp name="Arguments.arguments"> | ||
227 | - <elementProp name="" elementType="HTTPArgument"> | ||
228 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
229 | - <stringProp name="Argument.value"></stringProp> | ||
230 | - <stringProp name="Argument.metadata">=</stringProp> | ||
231 | - </elementProp> | ||
232 | - </collectionProp> | ||
233 | - </elementProp> | ||
234 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
235 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
236 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
237 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
238 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
239 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
240 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
241 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
242 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
243 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
244 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
245 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
246 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
247 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
248 | - <stringProp name="TestPlan.comments">新品到着推荐品牌</stringProp> | ||
249 | - </HTTPSamplerProxy> | ||
250 | - <hashTree> | ||
251 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
252 | - <stringProp name="TestPlan.comments"></stringProp> | ||
253 | - <boolProp name="resetInterpreter">false</boolProp> | ||
254 | - <stringProp name="parameters">${uid}</stringProp> | ||
255 | - <stringProp name="filename"></stringProp> | ||
256 | - <stringProp name="script">import java.security.MessageDigest; | ||
257 | -import java.util.Random; | ||
258 | -String[] clientTypes = {"android"}; | ||
259 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
260 | -int rd = new Random().nextInt(1); | ||
261 | -String clientType = clientTypes[rd]; | ||
262 | -String privateKey = privateKeys[rd]; | ||
263 | - | ||
264 | -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"; | ||
265 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
266 | -byte[] btInput = req.getBytes(); | ||
267 | -md.update(btInput); | ||
268 | -byte[] btResult = md.digest(); | ||
269 | -StringBuffer sb = new StringBuffer(); | ||
270 | -for(byte b : btResult){ | ||
271 | - int bt = b&0xff; | ||
272 | - if(bt<16){ | ||
273 | - sb.append(0); | ||
274 | - } | ||
275 | - sb.append(Integer.toHexString(bt)); | ||
276 | -} | ||
277 | -String md5 = sb.toString(); | ||
278 | - | ||
279 | - | ||
280 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
281 | - </BeanShellPreProcessor> | ||
282 | - <hashTree/> | ||
283 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
284 | - <collectionProp name="Asserion.test_strings"> | ||
285 | - <stringProp name="1450572480">"code":200</stringProp> | ||
286 | - </collectionProp> | ||
287 | - <stringProp name="TestPlan.comments"></stringProp> | ||
288 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
289 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
290 | - <intProp name="Assertion.test_type">16</intProp> | ||
291 | - </ResponseAssertion> | ||
292 | - <hashTree/> | ||
293 | - </hashTree> | ||
294 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
295 | - <stringProp name="TestPlan.comments"></stringProp> | ||
296 | - <doubleProp> | ||
297 | - <name>throughput</name> | ||
298 | - <value>60000</value> | ||
299 | - <savedValue>0.0</savedValue> | ||
300 | - </doubleProp> | ||
301 | - <intProp name="calcMode">2</intProp> | ||
302 | - </ConstantThroughputTimer> | ||
303 | - <hashTree/> | ||
304 | - </hashTree> | ||
305 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_reclist" enabled="true"> | 207 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_reclist" enabled="true"> |
306 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | 208 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
307 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | 209 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> |
@@ -400,104 +302,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | @@ -400,104 +302,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri | ||
400 | </ConstantThroughputTimer> | 302 | </ConstantThroughputTimer> |
401 | <hashTree/> | 303 | <hashTree/> |
402 | </hashTree> | 304 | </hashTree> |
403 | - <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="tg_app_newproduct_recshop" enabled="true"> | ||
404 | - <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
405 | - <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="循环控制器" enabled="true"> | ||
406 | - <boolProp name="LoopController.continue_forever">false</boolProp> | ||
407 | - <intProp name="LoopController.loops">-1</intProp> | ||
408 | - </elementProp> | ||
409 | - <stringProp name="ThreadGroup.num_threads">100</stringProp> | ||
410 | - <stringProp name="ThreadGroup.ramp_time">10</stringProp> | ||
411 | - <longProp name="ThreadGroup.start_time">1488865571000</longProp> | ||
412 | - <longProp name="ThreadGroup.end_time">1488865571000</longProp> | ||
413 | - <boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
414 | - <stringProp name="ThreadGroup.duration"></stringProp> | ||
415 | - <stringProp name="ThreadGroup.delay"></stringProp> | ||
416 | - <stringProp name="TestPlan.comments">新品到着推荐店铺</stringProp> | ||
417 | - </ThreadGroup> | ||
418 | - <hashTree> | ||
419 | - <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="tc_app_newproduct_recshop" enabled="true"> | ||
420 | - <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> | ||
421 | - <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> | ||
422 | - <collectionProp name="Arguments.arguments"> | ||
423 | - <elementProp name="" elementType="HTTPArgument"> | ||
424 | - <boolProp name="HTTPArgument.always_encode">false</boolProp> | ||
425 | - <stringProp name="Argument.value"></stringProp> | ||
426 | - <stringProp name="Argument.metadata">=</stringProp> | ||
427 | - </elementProp> | ||
428 | - </collectionProp> | ||
429 | - </elementProp> | ||
430 | - <stringProp name="HTTPSampler.domain"></stringProp> | ||
431 | - <stringProp name="HTTPSampler.port"></stringProp> | ||
432 | - <stringProp name="HTTPSampler.connect_timeout"></stringProp> | ||
433 | - <stringProp name="HTTPSampler.response_timeout"></stringProp> | ||
434 | - <stringProp name="HTTPSampler.protocol"></stringProp> | ||
435 | - <stringProp name="HTTPSampler.contentEncoding"></stringProp> | ||
436 | - <stringProp name="HTTPSampler.path">http://${HOST_API}/?${searchValue}</stringProp> | ||
437 | - <stringProp name="HTTPSampler.method">GET</stringProp> | ||
438 | - <boolProp name="HTTPSampler.follow_redirects">true</boolProp> | ||
439 | - <boolProp name="HTTPSampler.auto_redirects">false</boolProp> | ||
440 | - <boolProp name="HTTPSampler.use_keepalive">true</boolProp> | ||
441 | - <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> | ||
442 | - <boolProp name="HTTPSampler.monitor">false</boolProp> | ||
443 | - <stringProp name="HTTPSampler.embedded_url_re"></stringProp> | ||
444 | - <stringProp name="TestPlan.comments">新品到着推荐店铺</stringProp> | ||
445 | - </HTTPSamplerProxy> | ||
446 | - <hashTree> | ||
447 | - <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="前置BeanShell" enabled="true"> | ||
448 | - <stringProp name="TestPlan.comments"></stringProp> | ||
449 | - <boolProp name="resetInterpreter">false</boolProp> | ||
450 | - <stringProp name="parameters">${uid}</stringProp> | ||
451 | - <stringProp name="filename"></stringProp> | ||
452 | - <stringProp name="script">import java.security.MessageDigest; | ||
453 | -import java.util.Random; | ||
454 | -String[] clientTypes = {"android"}; | ||
455 | -String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"}; | ||
456 | -int rd = new Random().nextInt(1); | ||
457 | -String clientType = clientTypes[rd]; | ||
458 | -String privateKey = privateKeys[rd]; | ||
459 | -String os_version = "android5.1.1:Redmi_Note_3"; | ||
460 | -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"; | ||
461 | -MessageDigest md = MessageDigest.getInstance("MD5"); | ||
462 | -byte[] btInput = req.getBytes(); | ||
463 | -md.update(btInput); | ||
464 | -byte[] btResult = md.digest(); | ||
465 | -StringBuffer sb = new StringBuffer(); | ||
466 | -for(byte b : btResult){ | ||
467 | - int bt = b&0xff; | ||
468 | - if(bt<16){ | ||
469 | - sb.append(0); | ||
470 | - } | ||
471 | - sb.append(Integer.toHexString(bt)); | ||
472 | -} | ||
473 | -String md5 = sb.toString(); | ||
474 | -os_version=URLEncoder.encode(os_version); | ||
475 | -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"; | ||
476 | -vars.put("searchValue",req+"&client_secret="+md5);</stringProp> | ||
477 | - </BeanShellPreProcessor> | ||
478 | - <hashTree/> | ||
479 | - <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="响应断言" enabled="true"> | ||
480 | - <collectionProp name="Asserion.test_strings"> | ||
481 | - <stringProp name="1450572480">"code":200</stringProp> | ||
482 | - </collectionProp> | ||
483 | - <stringProp name="TestPlan.comments"></stringProp> | ||
484 | - <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
485 | - <boolProp name="Assertion.assume_success">false</boolProp> | ||
486 | - <intProp name="Assertion.test_type">16</intProp> | ||
487 | - </ResponseAssertion> | ||
488 | - <hashTree/> | ||
489 | - </hashTree> | ||
490 | - <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="固定TPM" enabled="true"> | ||
491 | - <stringProp name="TestPlan.comments"></stringProp> | ||
492 | - <doubleProp> | ||
493 | - <name>throughput</name> | ||
494 | - <value>60000</value> | ||
495 | - <savedValue>0.0</savedValue> | ||
496 | - </doubleProp> | ||
497 | - <intProp name="calcMode">2</intProp> | ||
498 | - </ConstantThroughputTimer> | ||
499 | - <hashTree/> | ||
500 | - </hashTree> | ||
501 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> | 305 | <BackendListener guiclass="BackendListenerGui" testclass="BackendListener" testname="influxdb_master" enabled="true"> |
502 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> | 306 | <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true"> |
503 | <collectionProp name="Arguments.arguments"> | 307 | <collectionProp name="Arguments.arguments"> |
-
Please register or login to post a comment