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
a75b1dcf
Commit
a75b1dcf
authored
Mar 29, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
b179cfaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
兑吧老优惠券_兑换流程测试_ExchangeTest.java
...a/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
+2
-1
多档位话费_兑换流程测试_ExchangeTest.java
...va/http/cases/ExchangeTest/多档位话费_兑换流程测试_ExchangeTest.java
+3
-3
No files found.
src/test/java/http/cases/ExchangeTest/兑吧老优惠券_兑换流程测试_ExchangeTest.java
View file @
a75b1dcf
...
...
@@ -589,6 +589,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
@Test
public
void
优惠券限时兑换测试
()
throws
Exception
{
int
uid
=
7113
;
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"appItemId"
,
"172079"
);
map
.
put
(
"itemId"
,
"29667"
);
...
...
@@ -600,7 +601,7 @@ public class 兑吧老优惠券_兑换流程测试_ExchangeTest extends CheckTem
//获取按钮状态
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"29667"
);
detailResponse
.
prettyPrint
();
//
detailResponse.prettyPrint();
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
...
...
src/test/java/http/cases/ExchangeTest/多档位话费_兑换流程测试_ExchangeTest.java
View file @
a75b1dcf
...
...
@@ -63,7 +63,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"1"
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"10\":\\{\"btnText\":\"(.*?)\",\"credits\":\"1
000
\",\"limitCount\":\"1\",\"limitScope\":\"everyday\",\"tipText\":\"此选项每日只能兑换1次\",\"status\":false}}"
,
1
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"10\":\\{\"btnText\":\"(.*?)\",\"credits\":\"1\",\"limitCount\":\"1\",\"limitScope\":\"everyday\",\"tipText\":\"此选项每日只能兑换1次\",\"status\":false}}"
,
1
);
logger
.
info
(
"兑换按钮:"
+
exchangeText
);
Assert
.
assertTrue
(
message
.
contains
(
"已兑完"
),
"校验message失败"
);
...
...
@@ -107,7 +107,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"1"
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"20\":\\{\"btnText\":\"(.*?)\",\"credits\":\"2
000
\",\"limitCount\":\"1\",\"limitScope\":\"month\",\"tipText\":\"此选项每月只能兑换1次\",\"status\":false}"
,
1
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"20\":\\{\"btnText\":\"(.*?)\",\"credits\":\"2\",\"limitCount\":\"1\",\"limitScope\":\"month\",\"tipText\":\"此选项每月只能兑换1次\",\"status\":false}"
,
1
);
logger
.
info
(
"兑换按钮:"
+
exchangeText
);
Assert
.
assertTrue
(
message
.
contains
(
"已兑完"
),
"校验message失败"
);
...
...
@@ -150,7 +150,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//获取按钮状态
Response
detailResponse
=
mobileService
.
detail
(
authorization
.
dafuwengLogin
(
uid
),
"1"
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"50\":\\{\"btnText\":\"(.*?)\",\"credits\":\"
5000
\",\"limitCount\":\"1\",\"limitScope\":\"forever\",\"tipText\":\"此选项只能兑换1次\",\"status\":false}"
,
1
);
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"50\":\\{\"btnText\":\"(.*?)\",\"credits\":\"
3
\",\"limitCount\":\"1\",\"limitScope\":\"forever\",\"tipText\":\"此选项只能兑换1次\",\"status\":false}"
,
1
);
logger
.
info
(
"兑换按钮:"
+
exchangeText
);
Assert
.
assertTrue
(
message
.
contains
(
"已兑完"
),
"校验message失败"
);
...
...
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