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
abdb8e210b52fdf7b2784acf22787e9a420dc928
1 parent
3199becf
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
129 deletions
script/default/test.jmx
script/default/test.jmx
View file @
abdb8e2
...
...
@@ -204,7 +204,7 @@
<stringProp
name=
"shareMode"
>
shareMode.all
</stringProp>
</CSVDataSet>
<hashTree/>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
api/v2/article/getList
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/
service/v2/article/getArticle
"
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"
>
&#
36891;的列表(
pageCache
)
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
26681;据文章
id
和客户端类型获得文章
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
api/v2/article/getList
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/
service/v2/article/getArticle
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -237,7 +237,7 @@
<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/getLis
t?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/
service/v2/article/getArticleConten
t?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -245,13 +245,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"
>
&#
36891;的列表(
pageCache
)
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
&#
26681;据文章
id
和客户端类型获得文章
;
</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=
"parameters"
>
${
article_id} ${
uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -260,7 +260,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_GuangContainer
&
gender=1,3
&
limit=20
&
os_version=10.2.1
&
page=1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=414x736
&
session_key=8be620e2d951d49128232f8b4c392422
&
sort_id=0
&
udid=380aebe1da2c72def222c78249f99ef08c18260a
&
uid=
"
+bsh.args[0]+
"&
v=7
&
yh_channel=1
"
;
String req =
"
app_version=5.8.1
&
article_id=
"
+bsh.args[0]+
"&
client_type=
"
+clientType+
"&
os_version=10.1.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);
...
...
@@ -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/get
SimpleArticleList
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/v2/article/get
ArticleBaseInfo
"
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"
>
获取
7983;览数,点赞数等信息
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取
5991;章内容详情
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v2/article/get
SimpleArticleList
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v2/article/get
ArticleBaseInfo
"
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/get
SimpleArticleList
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v2/article/get
ArticleBaseInfo
?${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"
>
获取
7983;览数,点赞数等信息
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取
5991;章内容详情
;
</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
&
articleIds=
"
+bsh.args[0]+
"&
client_type=
"
+clientType+
"&
fromPage=iFP_GuangContainer
&
gender=2,3
&
os_version=10.2.1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=aed364774108fa1b85bfb218f34c28c7
&
sortId=0
&
udid=7887164c6c98712ad1f214cacec3316f4aae4c51
&
uid=
"
+bsh.args[1]+
"&
v=7
&
yh_channel=2
"
;
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=3a31d8b3f75a08c958747d41c4854673c669ef5f
&
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/v
2/article/getTopList
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/v
1/article/getArticleNotice
"
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"
>
文章置顶
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
1
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v
2/article/getTopList
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v
1/article/getArticleNotice
"
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/v
2/article/getTopList
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v
1/article/getArticleNotice
?${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"
>
文章置顶
</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=
"parameters"
>
${
article_datetime} ${
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+
"&
fromPage=iFP_GuangContainer
&
gender=1,3
&
os_version=10.3.2
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=dbef84f3659c370fcd19de19e67a5556
&
udid=c383b9ed7696d2b31cf22685114a3a63eae58e95
&
uid=
"
+bsh.args[0]+
"&
v=7
&
yh_channel=1
"
;
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
"
;
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/
v2/article/getTagTop
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/
*/article/getArticlePraiseAndFavor
"
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"
>
获取&#
36891;的热门标签(
PC
端
;)
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取&#
25991;章内容详情的点赞、收藏、浏览数(降级
;)
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/
v2/article/getTagTop
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/
*/article/getArticlePraiseAndFavor
"
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/get
TagTop
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v2/article/get
ArticlePraiseAndFavor
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -530,108 +530,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"
>
获取&#
36891;的热门标签(
PC
端
;)
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取&#
25991;章内容详情的点赞、收藏、浏览数(降级
;)
</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"
></stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
String[] clientTypes = {
"
web
"
};
String[] privateKeys = {
"
0ed29744ed318fd28d2c07985d3ba633
"
};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.0
&
client_type=
"
+clientType+
"&
limit=20
&
os_version=yohobuy:web
&
page=4
&
private_key=
"
+privateKey+
"&
screen_size=720x1280
&
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_/guang/api/v1/category/get"
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"
>
获取逛下的分类列表(缓存时间延长)
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/v1/category/get"
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_SERVICE}/guang/api/v1/category/get?${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"
>
获取逛下的分类列表(缓存时间延长)
</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=
"parameters"
>
${article_id} ${uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -640,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+
"&
fromPage=iFP_GuangMain
&
gender=1,3
&
os_version=10.2.1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=414x736
&
session_key=8be620e2d951d49128232f8b4c392422
&
udid=380aebe1da2c72def222c78249f99ef08c18260a
&
uid=
"
+bsh.args[0]+
"&
v=7
&
yh_channel=1
"
;
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
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -679,7 +584,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/
*/article/getArticleByViewsNum
"
enabled=
"true"
>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_/guang/api/
v1/share/guang
"
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>
...
...
@@ -692,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"
>
获取
48
小时内浏览最多的文章(
PC
端)
;
</stringProp>
<stringProp
name=
"TestPlan.comments"
>
获取
文章内容
;
</stringProp>
</ThreadGroup>
<hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/
*/article/getArticleByViewsNum
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_/guang/api/
v1/share/guang
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -712,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/v
2/article/getArticleByViewsNum
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.path"
>
http://${HOST_SERVICE}/guang/api/v
1/share/guang
?${searchValue}
</stringProp>
<stringProp
name=
"HTTPSampler.method"
>
GET
</stringProp>
<boolProp
name=
"HTTPSampler.follow_redirects"
>
true
</boolProp>
<boolProp
name=
"HTTPSampler.auto_redirects"
>
false
</boolProp>
...
...
@@ -720,13 +625,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"
>
获取
48
小时内浏览最多的文章(
PC
端)
;
</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"
></stringProp>
<stringProp
name=
"parameters"
>
${article_id} ${uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -735,7 +640,7 @@ String[] privateKeys = {"fd4ad5fcfa0de589ef238c0e7331b585"};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=5.8.
0
&
client_type=
"
+clientType+
"&
gender=1,3
&
limit=10
&
os_version=yohobuy:web
&
page=1
&
private_key=
"
+privateKey+
"&
screen_size=720x1280
&
v=7
"
;
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
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
Please
register
or
login
to post a comment