Toggle navigation
Toggle navigation
This project
Loading...
Sign in
YPT
/
jmeter
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rong
8 years ago
Commit
41a1c8c4e7a754a2b6dd54f29ae3825a6691f288
1 parent
a1947a79
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
script/default/test.jmx
script/default/test.jmx
View file @
41a1c8c
...
...
@@ -216,7 +216,7 @@
<stringProp
name=
"shareMode"
>
shareMode.all
</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_
Shopping_queryPromotionGifts
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_
limitProduct_limitProductHtml
"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
<boolProp
name=
"LoopController.continue_forever"
>
false
</boolProp>
...
...
@@ -229,10 +229,10 @@
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
21152;价购促销商品列表
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
38480;量商品详情
h5
页面(
pageCache,10min
)
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_app_
Shopping_queryPromotionGifts
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_app_
limitProduct_limitProductHtml
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -257,13 +257,13 @@
<boolProp
name=
"HTTPSampler.DO_MULTIPART_POST"
>
false
</boolProp>
<boolProp
name=
"HTTPSampler.monitor"
>
false
</boolProp>
<stringProp
name=
"HTTPSampler.embedded_url_re"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
21152;价购促销商品列表
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
38480;量商品详情
h5
页面(
pageCache,10min
)
;
</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor
guiclass=
"TestBeanGUI"
testclass=
"BeanShellPreProcessor"
testname=
"前置BeanShell"
enabled=
"true"
>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<boolProp
name=
"resetInterpreter"
>
false
</boolProp>
<stringProp
name=
"parameters"
>
${
cart_promotion_id} ${cart_
uid}
</stringProp>
<stringProp
name=
"parameters"
>
${
limit_product_code} ${
uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -273,7 +273,7 @@ int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
gender=1,3
&
method=app.Shopping.queryPromotionGifts
&
os_version=android5.1:HUAWEI_TAG-TL00
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
promotion_ids=
"
+bsh.args[0]+
"&
screen_size=720x1184
&
session_key=266c935f31d983be4e7a53c860a0aa08
&
udid=8607740395271396b56710412cb59c1
&
uid=
"
+bsh.args[1]+
"&
v=7
&
yh_channel=1
"
;
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
fromPage=iFP_LimitPurchaseDetail
&
limitProductCode=
"
+bsh.args[0]+
"&
method=app.limitProduct.limitProductHtml
&
os_version=10.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
return_type=html
&
screen_size=414x736
&
session_key=d7e99ced4bccf8ba6098c58d718898a5
&
udid=441ebe1cbe40e2dac85c9d7201901818d0765f48
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -294,7 +294,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<hashTree/>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"1450572480"
>
"
code
"
:200
</stringProp>
<stringProp
name=
"1450572480"
>
html
</stringProp>
</collectionProp>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
...
...
Please
register
or
login
to post a comment