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
0c57c7de
Commit
0c57c7de
authored
Apr 02, 2019
by
马博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
f4efedf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Qb_兑换限制测试_ExchangeTest.java
.../java/http/cases/ExchangeTest/Qb_兑换限制测试_ExchangeTest.java
+10
-0
多档位话费_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/多档位话费_兑换流程测试_ExchangeTest.java
+9
-0
No files found.
src/test/java/http/cases/ExchangeTest/Qb_兑换限制测试_ExchangeTest.java
View file @
0c57c7de
...
...
@@ -68,6 +68,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int
uid
=
4932
;
//第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
dafuwengLogin
(
uid
),
"1234345554"
,
"1"
);
String
orderId
=
(
String
)
response
.
jsonPath
().
get
(
"orderId"
);
response
=
mobileService
.
orderStatusQuery
(
authorization
.
dafuwengLogin
(
uid
),
orderId
);
...
...
@@ -80,6 +81,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i
--;
}
//第二次兑换
Thread
.
sleep
(
3000
);
response
=
qbExchangeService
.
doTakePrize1
(
authorization
.
dafuwengLogin
(
uid
),
"1234345554"
,
"1"
);
message
=
response
.
jsonPath
().
getString
(
"message"
);
logger
.
info
(
message
);
...
...
@@ -99,6 +101,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int
uid
=
4933
;
//第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
dafuwengLogin
(
uid
),
"1234345554"
,
"2"
);
String
orderId
=
(
String
)
response
.
jsonPath
().
get
(
"orderId"
);
response
=
mobileService
.
orderStatusQuery
(
authorization
.
dafuwengLogin
(
uid
),
orderId
);
...
...
@@ -111,6 +114,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i
--;
}
//第二次兑换
Thread
.
sleep
(
3000
);
response
=
qbExchangeService
.
doTakePrize1
(
authorization
.
dafuwengLogin
(
uid
),
"12343455541"
,
"2"
);
response
.
prettyPrint
();
message
=
response
.
jsonPath
().
getString
(
"message"
);
...
...
@@ -133,6 +137,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int
uid
=
4933
;
//第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
dafuwengLogin
(
uid
),
"1234345554"
,
"3"
);
String
orderId
=
(
String
)
response
.
jsonPath
().
get
(
"orderId"
);
response
=
mobileService
.
orderStatusQuery
(
authorization
.
dafuwengLogin
(
uid
),
orderId
);
...
...
@@ -145,6 +150,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i
--;
}
//第二次兑换
Thread
.
sleep
(
3000
);
response
=
qbExchangeService
.
doTakePrize1
(
authorization
.
dafuwengLogin
(
uid
),
"12343455541"
,
"3"
);
response
.
prettyPrint
();
message
=
response
.
jsonPath
().
getString
(
"message"
);
...
...
@@ -173,6 +179,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
//会员等级无法兑换
try
{
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
dafuwengLogin
(
uid
),
"1234345554"
,
degreeId
);
response
.
prettyPrint
();
...
...
@@ -182,6 +189,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
logger
.
info
(
message
);
//会员等级可兑换,vip=5
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
generateSignAutoLogin
(
"42vkFzeLnoNjXt6AhMM7LPj4G8pT"
,
vipUid
),
"1234345554"
,
degreeId
);
response
.
prettyPrint
();
...
...
@@ -198,6 +206,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int
uid
=
4934
;
//第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
qbExchangeService
.
doTakePrize
(
authorization
.
dafuwengLogin
(
uid
),
"123434555412"
,
"1"
);
String
orderId
=
(
String
)
response
.
jsonPath
().
get
(
"orderId"
);
response
=
mobileService
.
orderStatusQuery
(
authorization
.
dafuwengLogin
(
uid
),
orderId
);
...
...
@@ -212,6 +221,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
//第二次兑换
//不同的用户,同一个 qq好
int
uid1
=
4935
;
Thread
.
sleep
(
3000
);
response
=
qbExchangeService
.
doTakePrize1
(
authorization
.
dafuwengLogin
(
uid1
),
"123434555412"
,
"1"
);
response
.
prettyPrint
();
message
=
response
.
jsonPath
().
getString
(
"message"
);
...
...
src/test/java/http/cases/ExchangeTest/多档位话费_兑换流程测试_ExchangeTest.java
View file @
0c57c7de
...
...
@@ -45,11 +45,14 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try
{
//话费第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"10"
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
,
"校验兑换失败"
);
logger
.
info
(
"用户成功兑换一次"
);
Thread
.
sleep
(
3000
);
//再次兑换
try
{
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"10"
);
...
...
@@ -90,11 +93,13 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try
{
//话费第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"20"
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
,
"校验兑换失败"
);
logger
.
info
(
"用户成功兑换一次"
);
Thread
.
sleep
(
3000
);
//再次兑换
try
{
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"20"
);
...
...
@@ -135,11 +140,13 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try
{
//话费第一次兑换
Thread
.
sleep
(
3000
);
Response
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"50"
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
,
"校验兑换失败"
);
logger
.
info
(
"用户成功兑换一次"
);
Thread
.
sleep
(
3000
);
//再次兑换
try
{
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
"50"
);
...
...
@@ -186,6 +193,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//会员等级无法兑换
try
{
Thread
.
sleep
(
3000
);
Response
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
dafuwengLogin
(
uid
),
degreeId
);
response
.
prettyPrint
();
...
...
@@ -194,6 +202,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
}
logger
.
info
(
message
);
Thread
.
sleep
(
3000
);
//会员等级可兑换,vip=5
Response
response
=
couponExchangeService
.
phonebillExchange
(
authorization
.
generateSignAutoLogin
(
"42vkFzeLnoNjXt6AhMM7LPj4G8pT"
,
vipUid
),
degreeId
);
response
.
prettyPrint
();
...
...
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