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
88ebbfc60dcaf45bfc98fd39c6adce32792ae56d
1 parent
abdb8e21
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
125 additions
and
30 deletions
script/default/test.jmx
script/default/test.jmx
View file @
88ebbfc
...
...
@@ -204,7 +204,7 @@
<stringProp
name=
"shareMode"
>
shareMode.all
</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/service/
v2/article/getArticle
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/service/
*/article/getArticleContent
"
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>
...
...
@@ -217,10 +217,10 @@
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
根据文章
id
和客户端类型获
4471;文章
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
根据文章
id
和客户端类型获
1462;逛的详情内容
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/service/
v2/article/getArticle
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/service/
*/article/getArticleContent
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -245,7 +245,7 @@
<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"
>
根据文章
id
和客户端类型获
4471;文章
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
根据文章
id
和客户端类型获
1462;逛的详情内容
;
</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor
guiclass=
"TestBeanGUI"
testclass=
"BeanShellPreProcessor"
testname=
"前置BeanShell"
enabled=
"true"
>
...
...
@@ -299,7 +299,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
api/v2/article/getArticleBaseInfo
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
service/v2/article/getBrand
"
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>
...
...
@@ -312,10 +312,10 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>

3719;取文章内容详情
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>

6827;入文章详情页时,用于展示相关品牌
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
api/v2/article/getArticleBaseInfo
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
service/v2/article/getBrand
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -332,7 +332,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/
api/v2/article/getArticleBaseInfo
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/
service/v2/article/getBrand
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -340,7 +340,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>

3719;取文章内容详情
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>

6827;入文章详情页时,用于展示相关品牌
;
</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor
guiclass=
"TestBeanGUI"
testclass=
"BeanShellPreProcessor"
testname=
"前置BeanShell"
enabled=
"true"
>
...
...
@@ -355,7 +355,7 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
fromPage=iFP_GuangDetail
&
id=
"
+bsh.args[0]+
"&
os_version=10.1.1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
udid=3a31d8b3f75a08c958747d41c4854673c669ef5
f
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
String req =
"
app_version=5.8.1
&
article_id=
"
+bsh.args[0]+
"&
client_type=
"
+clientType+
"&
os_version=10.3.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=37d73148be684c1424c353348f9cdc5a
&
udid=403b22e7c3749ffd84fff5e586f4f2c5e671520
f
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -394,7 +394,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/v1/
article/getArticleNotice
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/v1/
comments/getList
"
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>
...
...
@@ -407,10 +407,10 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
1
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取文章评论列表
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v1/
article/getArticleNotice
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v1/
comments/getList
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -427,7 +427,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v1/
article/getArticleNotice
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v1/
comments/getList
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -435,13 +435,13 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>
1
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取文章评论列表
</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"
>
${article_
datetime
} ${uid}
</stringProp>
<stringProp
name=
"parameters"
>
${article_
id
} ${uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -450,7 +450,7 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
datetime=
"
+bsh.args[0]+
"&
fromPage=aFP_Root_Phone
&
gender=2,3
&
os_version=android6.0:BLN-AL10
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=1080x1812
&
session_key=6471aeedc3b960d856b793789983d398
&
udid=863982030989458af245102e1b93ddd
&
uid=
"
+bsh.args[1]+
"&
v=7
&
yh_channel=2
"
;
String req =
"
app_version=5.8.1
&
article_id=
"
+bsh.args[0]+
"&
client_type=
"
+clientType+
"&
limit=10
&
os_version=10.1.1
&
page=1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
udid=3a31d8b3f75a08c958747d41c4854673c669ef5f
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -489,7 +489,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
api/*/article/getArticlePraiseAndFavor
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
service/v2/article/getOtherArticle
"
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>
...
...
@@ -502,10 +502,10 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>

3719;取文章内容详情的点赞、收藏、浏览数(降级)
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>

6827;入文章详情页时,用于展示相关文章
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
api/*/article/getArticlePraiseAndFavor
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
service/v2/article/getOtherArticle
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -522,7 +522,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/
api/v2/article/getArticlePraiseAndFavor
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/
service/v2/article/getOtherArticle
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -530,7 +530,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>

3719;取文章内容详情的点赞、收藏、浏览数(降级)
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>

6827;入文章详情页时,用于展示相关文章
;
</stringProp>
</HTTPSamplerProxy>
<hashTree>
<BeanShellPreProcessor
guiclass=
"TestBeanGUI"
testclass=
"BeanShellPreProcessor"
testname=
"前置BeanShell"
enabled=
"true"
>
...
...
@@ -545,7 +545,7 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
id=
"
+bsh.args[0]+
"&
os_version=10.3.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=37d73148be684c1424c353348f9cdc5a
&
udid=403b22e7c3749ffd84fff5e586f4f2c5e671520f
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
String req =
"
app_version=5.8.1
&
article_id=
"
+bsh.args[0]+
"&
client_type=
"
+clientType+
"&
limit=3
&
offset=0
&
os_version=10.3.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=dbef84f3659c370fcd19de19e67a5556
&
tags=
&
udid=c383b9ed7696d2b31cf22685114a3a63eae58e95
&
uid=
"
+bsh.args[1]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -584,7 +584,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_
/guang/api/v1/share/guan
g"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_
app_document_confi
g"
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>
...
...
@@ -597,10 +597,10 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
33719;取文章内容
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
24494;信公众号
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_
/guang/api/v1/share/guan
g"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_
app_document_confi
g"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -617,7 +617,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_
SERVICE}/guang/api/v1/share/guang
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_
API}/
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -625,13 +625,108 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>
&#
33719;取文章内容
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
24494;信公众号
;
</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"
>
${article_id} ${uid}
</stringProp>
<stringProp
name=
"parameters"
>
${uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {
"
android
"
};
String[] privateKeys = {
"
fd4ad5fcfa0de589ef238c0e7331b585
"
};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
method=app.document.config
&
os_version=10.1.1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
udid=3a31d8b3f75a08c958747d41c4854673c669ef5f
&
uid=
"
+bsh.args[0]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
byte[] btResult = md.digest();
StringBuffer sb = new StringBuffer();
for(byte b : btResult){
int bt = b
&
0xff;
if(bt
<
16){
sb.append(0);
}
sb.append(Integer.toHexString(bt));
}
String md5 = sb.toString();
vars.put(
"
searchValue
"
,req+
"&
client_secret=
"
+md5);
</stringProp>
</BeanShellPreProcessor>
<hashTree/>
<ResponseAssertion
guiclass=
"AssertionGui"
testclass=
"ResponseAssertion"
testname=
"响应断言"
enabled=
"true"
>
<collectionProp
name=
"Asserion.test_strings"
>
<stringProp
name=
"1450572480"
>
"
code
"
:200
</stringProp>
</collectionProp>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<stringProp
name=
"Assertion.test_field"
>
Assertion.response_data
</stringProp>
<boolProp
name=
"Assertion.assume_success"
>
false
</boolProp>
<intProp
name=
"Assertion.test_type"
>
16
</intProp>
</ResponseAssertion>
<hashTree/>
</hashTree>
<ConstantThroughputTimer
guiclass=
"TestBeanGUI"
testclass=
"ConstantThroughputTimer"
testname=
"固定TPM"
enabled=
"true"
>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<doubleProp>
<name>
throughput
</name>
<value>
60000
</value>
<savedValue>
0.0
</savedValue>
</doubleProp>
<intProp
name=
"calcMode"
>
2
</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_resources_getSingleTemplate"
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>
<intProp
name=
"LoopController.loops"
>
-1
</intProp>
</elementProp>
<stringProp
name=
"ThreadGroup.num_threads"
>
100
</stringProp>
<stringProp
name=
"ThreadGroup.ramp_time"
>
10
</stringProp>
<longProp
name=
"ThreadGroup.start_time"
>
1488865571000
</longProp>
<longProp
name=
"ThreadGroup.end_time"
>
1488865571000
</longProp>
<boolProp
name=
"ThreadGroup.scheduler"
>
false
</boolProp>
<stringProp
name=
"ThreadGroup.duration"
></stringProp>
<stringProp
name=
"ThreadGroup.delay"
></stringProp>
<stringProp
name=
"TestPlan.comments"
>
1
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_app_resources_getSingleTemplate"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
<elementProp
name=
""
elementType=
"HTTPArgument"
>
<boolProp
name=
"HTTPArgument.always_encode"
>
false
</boolProp>
<stringProp
name=
"Argument.value"
></stringProp>
<stringProp
name=
"Argument.metadata"
>
=
</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp
name=
"HTTPSampler.domain"
></stringProp>
<stringProp
name=
"HTTPSampler.port"
></stringProp>
<stringProp
name=
"HTTPSampler.connect_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.response_timeout"
></stringProp>
<stringProp
name=
"HTTPSampler.protocol"
></stringProp>
<stringProp
name=
"HTTPSampler.contentEncoding"
></stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_API}/?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
<boolProp
name=
"HTTPSampler.use_keepalive"
>
true
</boolProp>
<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"
>
1
</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"
>
${uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -640,7 +735,7 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
id=
"
+bsh.args[0]+
"&
os_version=10.3.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=dbef84f3659c370fcd19de19e67a5556
&
udid=c383b9ed7696d2b31cf22685114a3a63eae58e95
&
uid=
"
+bsh.args[1]+
"&
v=7
&
yh_channel=1
"
;
String req =
"
app_version=5.8.1
&
client_type=
"
+clientType+
"&
key=guang_detail_wechat
&
method=app.resources.getSingleTemplate
&
module=wechat
&
os_version=10.1.1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
udid=3a31d8b3f75a08c958747d41c4854673c669ef5f
&
uid=
"
+bsh.args[0]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
Please
register
or
login
to post a comment