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
7 years ago
Commit
a5d8877352df5b0e18021ef03983cdb21d58b956
1 parent
2fdc069d
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
203 deletions
script/2018618/myuser.jmx
script/2018618/myuser.jmx
View file @
a5d8877
...
...
@@ -1870,104 +1870,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_document_config"
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"
>
1
</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_app_document_config"
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"
>
微信公众号
</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;
String[] clientTypes = {
"
android
"
,
"
iphone
"
};
String[] privateKeys = {
"
fd4ad5fcfa0de589ef238c0e7331b585
"
,
"
a85bb0674e08986c6b115d5e3a4884fa
"
};
int rd = new Random().nextInt(2);
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>
120
</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"
>
...
...
@@ -2850,104 +2752,6 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_browse_product"
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"
>
1
</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_app_browse_product"
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"
>
浏览记录
</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"
>
${SNCP} ${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 =
"
_sncp=
"
+bsh.args[0]+
"&
app_version=5.6.0
&
client_type=
"
+clientType+
"&
fromPage=iFP_MineBrowseHistory
&
limit=100
&
method=app.browse.product
&
os_version=9.2.1
&
page=1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=320x568
&
session_key=53ca616ec8239f724f9cbad6e4f32866
&
udid=ee2b2359d526f5665357aa76727f8c5d9fc8ccb6
&
uid=
"
+bsh.args[1]+
"&
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>
120
</value>
<savedValue>
0.0
</savedValue>
</doubleProp>
<intProp
name=
"calcMode"
>
2
</intProp>
</ConstantThroughputTimer>
<hashTree/>
</hashTree>
<ThreadGroup
guiclass=
"ThreadGroupGui"
testclass=
"ThreadGroup"
testname=
"tg_app_SpaceOrders_detail"
enabled=
"true"
>
<stringProp
name=
"ThreadGroup.on_sample_error"
>
continue
</stringProp>
<elementProp
name=
"ThreadGroup.main_controller"
elementType=
"LoopController"
guiclass=
"LoopControlPanel"
testclass=
"LoopController"
testname=
"循环控制器"
enabled=
"true"
>
...
...
@@ -3975,7 +3779,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>
${
SNCP} ${
uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -3985,7 +3789,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=6.5.4
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
fromPage=iFP_MineCoupon
&
method=app.coupons.getCouponNums
&
os_version=11.0
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=414x736
&
session_key=6a4b8976586a2e4bf7b13104a1b7ee61
&
udid=7e867bc91e96aa5ee497f066c385a6db1ef9ac28
&
uid=
"
+bsh.args[0
]+
"&
v=7
"
;
String req =
"
_SNCP=
"
+bsh.args[0]+
"&
app_version=6.5.4
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
fromPage=iFP_MineCoupon
&
method=app.coupons.getCouponNums
&
os_version=11.0
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=414x736
&
session_key=6a4b8976586a2e4bf7b13104a1b7ee61
&
udid=7e867bc91e96aa5ee497f066c385a6db1ef9ac28
&
uid=
"
+bsh.args[1
]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -4073,7 +3877,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>
${
SNCP} ${
uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -4083,7 +3887,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String req =
"
app_version=2.0.0
&
client_type=
"
+clientType+
"&
fromPage=aFP_MineCoupon
&
limit=10
&
method=app.coupons.lists
&
os_version=6.5.6
&
page=1
&
private_key=
"
+privateKey+
"&
screen_size=320x504
&
session_key=0290de2565223bdbad08f8768c9223fb
&
type=notuse
&
udid=ccd0eeed5848abbf3f79d1578fa4d7e2
&
uid=
"
+bsh.args[0
]+
"&
v=7
"
;
String req =
"
_SNCP=
"
+bsh.args[0]+
"&
app_version=6.3.2
&
client_type=
"
+clientType+
"&
fromPage=iFP_MineCoupon
&
limit=10
&
method=app.coupons.lists
&
os_version=11.3.1
&
page=1
&
physical_channel=1
&
private_key=
"
+privateKey+
"&
screen_size=375x667
&
session_key=58302f909cc3855536094e7ae64cfa16
&
type=notuse
&
udid=a836d2638f4c6f4f77b827e85ce8579fd54a84b5
&
uid=
"
+bsh.args[1
]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -4171,7 +3975,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
<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"
>
${
SNCP} ${
uid}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -4181,7 +3985,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version =
"
android6.0.1:SM-G9250
"
;
String req =
"
app_version=6.3.0
&
client_type=
"
+clientType+
"&
fromPage=aFP_MineOrderContent
&
gender=2,3
&
limit=20
&
method=app.SpaceOrders.list
&
os_version=
"
+os_version+
"&
page=1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=1440x2560
&
session_key=de882167c1207b835c5811b9f7d8291c
&
type=1
&
udid=3543320703984406667aa0177a74a21
&
uid=
"
+bsh.args[0
]+
"&
v=7
&
yh_channel=2
"
;
String req =
"
_SNCP=
"
+bsh.args[0]+
"&
app_version=6.3.0
&
client_type=
"
+clientType+
"&
fromPage=aFP_MineOrderContent
&
gender=2,3
&
limit=20
&
method=app.SpaceOrders.list
&
os_version=
"
+os_version+
"&
page=1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=1440x2560
&
session_key=de882167c1207b835c5811b9f7d8291c
&
type=1
&
udid=3543320703984406667aa0177a74a21
&
uid=
"
+bsh.args[1
]+
"&
v=7
&
yh_channel=2
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -4196,7 +4000,7 @@ for(byte b : btResult){
}
String md5 = sb.toString();
os_version=URLEncoder.encode(os_version);
req =
"
app_version=6.3.0
&
client_type=
"
+clientType+
"&
fromPage=aFP_MineOrderContent
&
gender=2,3
&
limit=20
&
method=app.SpaceOrders.list
&
os_version=
"
+os_version+
"&
page=1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=1440x2560
&
session_key=de882167c1207b835c5811b9f7d8291c
&
type=1
&
udid=3543320703984406667aa0177a74a21
&
uid=
"
+bsh.args[0
]+
"&
v=7
&
yh_channel=2
"
;
req =
"
_SNCP=
"
+bsh.args[0]+
"&
app_version=6.3.0
&
client_type=
"
+clientType+
"&
fromPage=aFP_MineOrderContent
&
gender=2,3
&
limit=20
&
method=app.SpaceOrders.list
&
os_version=
"
+os_version+
"&
page=1
&
physical_channel=2
&
private_key=
"
+privateKey+
"&
screen_size=1440x2560
&
session_key=de882167c1207b835c5811b9f7d8291c
&
type=1
&
udid=3543320703984406667aa0177a74a21
&
uid=
"
+bsh.args[1
]+
"&
v=7
&
yh_channel=2
"
;
vars.put(
"
searchValue
"
,req+
"&
client_secret=
"
+md5);
</stringProp>
</BeanShellPreProcessor>
<hashTree/>
...
...
Please
register
or
login
to post a comment