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
daeb16efc32108e6efadc45249592f4c548da335
1 parent
44e68550
commit by shell
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
script/20181111/cartandcompute.jmx
script/20181111/cartandcompute.jmx
View file @
daeb16e
...
...
@@ -1949,7 +1949,7 @@ vars.put("searchValue",req+"&client_secret="+md5);</stri
</ResponseAssertion>
<hashTree/>
</hashTree>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_app_Shopping_selectedAndQryCart_
single
"
enabled=
"true"
>
<HTTPSamplerProxy
guiclass=
"HttpTestSampleGui"
testclass=
"HTTPSamplerProxy"
testname=
"tc_app_Shopping_selectedAndQryCart_
forcomm
"
enabled=
"true"
>
<boolProp
name=
"HTTPSampler.postBodyRaw"
>
true
</boolProp>
<elementProp
name=
"HTTPsampler.Arguments"
elementType=
"Arguments"
>
<collectionProp
name=
"Arguments.arguments"
>
...
...
@@ -1974,25 +1974,25 @@ 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"
>
给用券的选择购物车
</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} ${
__RandomString(1,YN,)} ${
sku_edit} ${uid_edit}
</stringProp>
<stringProp
name=
"parameters"
>
${SNCP} ${sku_edit} ${uid_edit}
</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[] clientTypes = {
"
android
"
};
String[] privateKeys = {
"
fd4ad5fcfa0de589ef238c0e7331b585
"
};
int rd = new Random().nextInt(1);
String clientType = clientTypes[rd];
String privateKey = privateKeys[rd];
String os_version =
"
yohobuy:h5
"
;
String product_sku_list =
"
[{\
"
goods_type\
"
:\
"
ordinary\
"
,\
"
selected\
"
:\
""
+bsh.args[1]+
"
\
"
,\
"
product_sku\
"
:
"
+bsh.args[2]+
"
,\
"
promotion_id\
"
:\
"
\
"
,\
"
buy_number\
"
:\
"
1\
"
}]
"
;
String req =
"
_sncp=
"
+bsh.args[0]+
"&
app_version=6.6.0
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
is_support_mlp=Y
&
method=app.Shopping.selectedAndQryCart
&
os_version=
"
+os_version+
"&
private_key=
"
+privateKey+
"&
product_sku_list=
"
+product_sku_list+
"&
screen_size=720x1280
&
session_key=6129aba5f69e35fe760f6d702a62c016
&
shopping_key=488815cfce9b9d0e739d16ede4c13f29
&
udid=c5490c5d-308c-44f7-8d15-f5ed91fdd103
&
uid=
"
+bsh.args[3]+
"&
v=7
"
;
String product_sku_list =
"
[{\
"
goods_type\
"
:\
"
ordinary\
"
,\
"
selected\
"
:\
"
Y\
"
,\
"
product_sku\
"
:
"
+bsh.args[1]+
"
,\
"
promotion_id\
"
:\
"
\
"
,\
"
buy_number\
"
:\
"
1\
"
}]
"
;
String req =
"
_sncp=
"
+bsh.args[0]+
"&
app_version=6.6.0
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
is_support_mlp=Y
&
method=app.Shopping.selectedAndQryCart
&
os_version=
"
+os_version+
"&
private_key=
"
+privateKey+
"&
product_sku_list=
"
+product_sku_list+
"&
screen_size=720x1280
&
session_key=6129aba5f69e35fe760f6d702a62c016
&
shopping_key=488815cfce9b9d0e739d16ede4c13f29
&
udid=c5490c5d-308c-44f7-8d15-f5ed91fdd103
&
uid=
"
+bsh.args[2]+
"&
v=7
"
;
MessageDigest md = MessageDigest.getInstance(
"
MD5
"
);
byte[] btInput = req.getBytes();
md.update(btInput);
...
...
@@ -2008,7 +2008,7 @@ for(byte b : btResult){
String md5 = sb.toString();
os_version=URLEncoder.encode(os_version);
product_sku_list=URLEncoder.encode(product_sku_list);
req =
"
_sncp=
"
+bsh.args[0]+
"&
app_version=6.6.0
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
is_support_mlp=Y
&
method=app.Shopping.selectedAndQryCart
&
os_version=
"
+os_version+
"&
private_key=
"
+privateKey+
"&
product_sku_list=
"
+product_sku_list+
"&
screen_size=720x1280
&
session_key=6129aba5f69e35fe760f6d702a62c016
&
shopping_key=488815cfce9b9d0e739d16ede4c13f29
&
udid=c5490c5d-308c-44f7-8d15-f5ed91fdd103
&
uid=
"
+bsh.args[
3
]+
"&
v=7
"
;
req =
"
_sncp=
"
+bsh.args[0]+
"&
app_version=6.6.0
&
business_line=yohobuy
&
client_type=
"
+clientType+
"&
is_support_mlp=Y
&
method=app.Shopping.selectedAndQryCart
&
os_version=
"
+os_version+
"&
private_key=
"
+privateKey+
"&
product_sku_list=
"
+product_sku_list+
"&
screen_size=720x1280
&
session_key=6129aba5f69e35fe760f6d702a62c016
&
shopping_key=488815cfce9b9d0e739d16ede4c13f29
&
udid=c5490c5d-308c-44f7-8d15-f5ed91fdd103
&
uid=
"
+bsh.args[
2
]+
"&
v=7
"
;
vars.put(
"
searchValue
"
,req+
"&
client_secret=
"
+md5);
</stringProp>
</BeanShellPreProcessor>
<hashTree/>
...
...
Please
register
or
login
to post a comment