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
3a8efc6c
Commit
3a8efc6c
authored
Dec 16, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
93ddf7eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
集卡活动领奖_AccessTest.java
src/test/java/http/cases/ClcardTest/集卡活动领奖_AccessTest.java
+42
-0
No files found.
src/test/java/http/cases/ClcardTest/集卡活动领奖_AccessTest.java
View file @
3a8efc6c
...
...
@@ -187,6 +187,48 @@ public class 集卡活动领奖_AccessTest extends DuibaTestBase {
logger
.
info
(
"校验成功:集卡活动已下架领奖失败"
);
}
@Test
(
description
=
"集卡活动已结束,领奖测试"
)
public
void
集卡活动已结束再领奖
()
throws
Exception
{
int
uid
=
7450
;
String
activityId
=
"45619"
;
Response
response
=
clcardService
.
openPrize2
(
uid
,
activityId
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"活动已结束"
,
"校验desc失败"
);
logger
.
info
(
"校验成功:集卡活动已结束领奖失败"
);
}
@Test
(
description
=
"开发者余额不足,集卡领奖支付宝测试"
)
public
void
开发者余额不足领奖
()
throws
Exception
{
//开发者账号:13000000000
int
uid
=
7452
;
String
activityId
=
"45622"
;
Response
response
=
clcardService
.
openPrize
(
uid
,
activityId
);
String
orderNum
=
response
.
jsonPath
().
getString
(
"data.orderNum"
);
response
=
clcardService
.
getOrderStatus
(
uid
,
orderNum
);
response
.
prettyPrint
();
String
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
int
i
=
30
;
while
(
i
>
0
&&(
result
.
equals
(
"0"
))){
Thread
.
sleep
(
500
);
response
=
clcardService
.
getOrderStatus
(
uid
,
orderNum
);
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
i
--;
response
.
prettyPrint
();
}
//库存不足,接口会轮询处理超时
Assert
.
assertEquals
(
result
,
"0"
,
"校验result失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"takeSuccess"
),
"false"
,
"校验takeSuccess失败"
);
logger
.
info
(
"校验成功:开发者余额不足领奖支付宝失败"
);
}
...
...
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