Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马博
test-platform
Commits
9ccb2dc0
Commit
9ccb2dc0
authored
Jul 10, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
59e262e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
支付宝_兑换流程测试_ExchangeTest.java
...ases/ExchangeTest/兑吧_直充类商品兑换/支付宝_兑换流程测试_ExchangeTest.java
+26
-0
新支付宝_兑换流程测试_ExchangeTest.java
...ses/ExchangeTest/兑吧_直充类商品兑换/新支付宝_兑换流程测试_ExchangeTest.java
+3
-1
No files found.
src/test/java/http/cases/ExchangeTest/兑吧_直充类商品兑换/支付宝_兑换流程测试_ExchangeTest.java
View file @
9ccb2dc0
...
...
@@ -337,6 +337,32 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
}
}
@Test
(
description
=
"支付宝档位篡改测试"
)
public
void
支付宝档位篡改测试
()
throws
Exception
{
int
uid
=
7272
;
String
alipay
=
"peeulk6392@sandbox.com"
;
String
realname
=
"沙箱环境"
;
String
degreeId
=
"100"
;
String
message
=
""
;
//支付宝兑换,档位参数不存在
try
{
Response
response
=
alipayExchangeService
.
exchange
(
uid
,
alipay
,
realname
,
degreeId
);
response
.
prettyPrint
();
}
catch
(
Exception
e
){
message
=
e
.
toString
();
}
logger
.
info
(
message
);
Assert
.
assertTrue
(
message
.
contains
(
"\"success\":false"
),
"校验message失败"
);
Assert
.
assertTrue
(
message
.
contains
(
"\"message\":\"档位不存在\""
),
"校验message失败"
);
logger
.
info
(
"校验支付宝档位篡改无法兑换成功"
);
}
//支付宝兑换接口抽离
public
String
支付宝兑换订单
(
int
uid
,
String
alipay
,
String
realname
,
String
degreeId
)
throws
Exception
{
Response
response
=
alipayExchangeService
.
exchange
(
uid
,
alipay
,
realname
,
degreeId
);
...
...
src/test/java/http/cases/ExchangeTest/兑吧_直充类商品兑换/新支付宝_兑换流程测试_ExchangeTest.java
View file @
9ccb2dc0
...
...
@@ -249,13 +249,14 @@ public class 新支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
int
uid
=
7271
;
String
actualCredits
=
"4"
;
String
degreeId
=
"10"
;
String
degreeId
=
"10
0
"
;
String
appItemId
=
"196921"
;
String
credits
=
"4"
;
String
message
=
""
;
//支付宝兑换,档位参数不存在
try
{
Thread
.
sleep
(
3000
);
Response
response
=
gawService
.
alipayExchange
(
uid
,
actualCredits
,
degreeId
,
appItemId
,
credits
);
response
.
prettyPrint
();
...
...
@@ -287,6 +288,7 @@ public class 新支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
String
orderId
=
response
.
jsonPath
().
getString
(
"data.orderId"
);
//查询数据库
Thread
.
sleep
(
3000
);
Map
<
String
,
Object
>
mapOrderId
=
jdbc
.
findSimpleResult
(
"SELECT * FROM "
+
Database
.
orders_consumer
+
"."
+
Database
.
orders12
+
" where id = "
+
orderId
);
String
orderStatus
=
String
.
valueOf
(
mapOrderId
.
get
(
"status"
));
String
orderCredits
=
String
.
valueOf
(
mapOrderId
.
get
(
"credits"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment