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
5f353b0ea1217b590ebd03bc534e9ebbe71c3e5e
1 parent
09e7889d
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
script/default/test.jmx
script/default/test.jmx
View file @
5f353b0
...
...
@@ -290,7 +290,7 @@
<BeanShellPreProcessor
guiclass=
"TestBeanGUI"
testclass=
"BeanShellPreProcessor"
testname=
"前置BeanShell"
enabled=
"true"
>
<stringProp
name=
"TestPlan.comments"
></stringProp>
<boolProp
name=
"resetInterpreter"
>
false
</boolProp>
<stringProp
name=
"parameters"
>
${activityId_seckill} ${sku_seckill} ${uid_submit}
</stringProp>
<stringProp
name=
"parameters"
>
${
SNCP} ${
activityId_seckill} ${sku_seckill} ${uid_submit}
</stringProp>
<stringProp
name=
"filename"
></stringProp>
<stringProp
name=
"script"
>
import java.security.MessageDigest;
import java.util.Random;
...
...
@@ -300,7 +300,7 @@ int rd = new Random().nextInt(2);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version =
"
android6.0:MI_5
"
;
String req =
"
activity_id=
"
+bsh.args[0]+
"&
app_version=6.0.2
&
buy_number=1
&
client_type=
"
+clientType+
"&
fromPage=aFP_InstalmentGoodsTakeOrder
&
gender=1,3
&
is_support_apple_pay=N
&
method=app.Seckill.payment
&
os_version=
"
+os_version+
"&
physical_channel=1
&
private_key=
"
+privateKey+
"&
product_sku=
"
+bsh.args[1]+
"&
screen_size=1080x1920
&
session_key=53d0d4a67ba919a634f4e76a80f7a9de
&
sku_type=S
&
udid=861945035813942cbb51d8d8830e026
&
uid=
"
+bsh.args[2
]+
"&
v=7
&
yh_channel=1
&
yoho_bill_term=0
&
yoho_coin_mode=0
"
;
String req =
"
_sncp=
"
+bsh.args[0]+
"&
activity_id=
"
+bsh.args[1]+
"&
app_version=6.0.2
&
buy_number=1
&
client_type=
"
+clientType+
"&
fromPage=aFP_InstalmentGoodsTakeOrder
&
gender=1,3
&
is_support_apple_pay=N
&
method=app.Seckill.payment
&
os_version=
"
+os_version+
"&
physical_channel=1
&
private_key=
"
+privateKey+
"&
product_sku=
"
+bsh.args[2]+
"&
screen_size=1080x1920
&
session_key=53d0d4a67ba919a634f4e76a80f7a9de
&
sku_type=S
&
udid=861945035813942cbb51d8d8830e026
&
uid=
"
+bsh.args[3
]+
"&
v=7
&
yh_channel=1
&
yoho_bill_term=0
&
yoho_coin_mode=0
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -315,7 +315,7 @@ for(byte b : btResult){
}
String md5 = sb.toString();
os_version=URLEncoder.encode(os_version);
req =
"
activity_id=
"
+bsh.args[0]+
"&
app_version=6.0.2
&
buy_number=1
&
client_type=
"
+clientType+
"&
fromPage=aFP_InstalmentGoodsTakeOrder
&
gender=1,3
&
is_support_apple_pay=N
&
method=app.Seckill.payment
&
os_version=
"
+os_version+
"&
physical_channel=1
&
private_key=
"
+privateKey+
"&
product_sku=
"
+bsh.args[1]+
"&
screen_size=1080x1920
&
session_key=53d0d4a67ba919a634f4e76a80f7a9de
&
sku_type=S
&
udid=861945035813942cbb51d8d8830e026
&
uid=
"
+bsh.args[2
]+
"&
v=7
&
yh_channel=1
&
yoho_bill_term=0
&
yoho_coin_mode=0
"
;
req =
"
_sncp=
"
+bsh.args[0]+
"&
activity_id=
"
+bsh.args[1]+
"&
app_version=6.0.2
&
buy_number=1
&
client_type=
"
+clientType+
"&
fromPage=aFP_InstalmentGoodsTakeOrder
&
gender=1,3
&
is_support_apple_pay=N
&
method=app.Seckill.payment
&
os_version=
"
+os_version+
"&
physical_channel=1
&
private_key=
"
+privateKey+
"&
product_sku=
"
+bsh.args[2]+
"&
screen_size=1080x1920
&
session_key=53d0d4a67ba919a634f4e76a80f7a9de
&
sku_type=S
&
udid=861945035813942cbb51d8d8830e026
&
uid=
"
+bsh.args[3
]+
"&
v=7
&
yh_channel=1
&
yoho_bill_term=0
&
yoho_coin_mode=0
"
;
vars.put(
"
searchValue
"
,req+
"&
client_secret=
"
+md5);
</stringProp>
</BeanShellPreProcessor>
<hashTree/>
...
...
Please
register
or
login
to post a comment