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
ba929508
Commit
ba929508
authored
Jan 18, 2019
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
ae21ecd2
0c2c5a44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
优惠券_兑换流程测试_ExchangeTest.java
...java/http/cases/ExchangeTest/优惠券_兑换流程测试_ExchangeTest.java
+3
-3
实物_兑换异常测试_ExchangeTest.java
.../java/http/cases/ExchangeTest/实物_兑换异常测试_ExchangeTest.java
+1
-1
虚拟商品_兑换异常测试_ExchangeTest.java
...ava/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
+2
-2
异常订单测试_ExchangeTest.java
...ava/http/cases/GoodsAndTradeTest/异常订单测试_ExchangeTest.java
+1
-1
No files found.
src/test/java/http/cases/ExchangeTest/优惠券_兑换流程测试_ExchangeTest.java
View file @
ba929508
...
...
@@ -271,7 +271,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"今日已兑完,明天再来哦(14)"
,
"校验message失败"
);
Assert
.
assertEquals
(
exchangeText
,
"
已兑完
"
,
"校验马上兑换按钮状态失败"
);
Assert
.
assertEquals
(
exchangeText
,
"
商品售罄
"
,
"校验马上兑换按钮状态失败"
);
logger
.
info
(
"校验优惠券商品库存不足和预分配库存不足场景成功"
);
}
...
...
@@ -401,7 +401,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"已兑换"
,
"校验用户兑换限制失败"
);
Assert
.
assertEquals
(
exchangeText
,
"已
兑换
"
,
"校验马上兑换按钮状态失败"
);
Assert
.
assertEquals
(
exchangeText
,
"已
达兑换次数上限
"
,
"校验马上兑换按钮状态失败"
);
logger
.
info
(
"校验优惠券用户永久兑换限制成功"
);
}
catch
(
Exception
e
){
...
...
@@ -443,7 +443,7 @@ public class 优惠券_兑换流程测试_ExchangeTest extends CheckTemplet {
String
exchangeText
=
MatcherString
.
getString
(
detailResponse
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"今日已兑换"
,
"校验用户兑换限制失败"
);
Assert
.
assertEquals
(
exchangeText
,
"今日已
兑换
"
,
"校验马上兑换按钮状态失败"
);
Assert
.
assertEquals
(
exchangeText
,
"今日已
达兑换上限
"
,
"校验马上兑换按钮状态失败"
);
logger
.
info
(
"校验优惠券用户每天兑换限制成功"
);
}
catch
(
Exception
e
){
...
...
src/test/java/http/cases/ExchangeTest/实物_兑换异常测试_ExchangeTest.java
View file @
ba929508
...
...
@@ -112,7 +112,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
// }
//校验messaga字段返回值
String
message2
=
response1
.
jsonPath
().
getString
(
"message"
);
Assert
.
assertEquals
(
message2
,
"已
兑换
"
,
"message字段校验失败-期望是已兑换"
);
Assert
.
assertEquals
(
message2
,
"已
达兑换次数上限
"
,
"message字段校验失败-期望是已兑换"
);
}
@Test
...
...
src/test/java/http/cases/ExchangeTest/虚拟商品_兑换异常测试_ExchangeTest.java
View file @
ba929508
...
...
@@ -79,7 +79,7 @@ public class 虚拟商品_兑换异常测试_ExchangeTest extends CheckTemplet {
response
.
prettyPrint
();
String
exchangeText
=
MatcherString
.
getString
(
response
.
asString
(),
"\"exchangeText\":\"(.*?)\","
,
1
);
logger
.
info
(
"exchangeText"
+
exchangeText
);
Assert
.
assertEquals
(
exchangeText
,
"
已兑完
"
,
"页面数据返回错误"
);
Assert
.
assertEquals
(
exchangeText
,
"
商品售罄
"
,
"页面数据返回错误"
);
logger
.
info
(
"校验 页面数据文本信息 成功"
);
response
=
virtualExchangeService
.
exchange2
(
authorization
.
dafuwengLogin
(
uid
),
"185535"
,
"123"
);
response
.
prettyPrint
();
...
...
@@ -519,7 +519,7 @@ public class 虚拟商品_兑换异常测试_ExchangeTest extends CheckTemplet {
String
exchangeText
=
MatcherString
.
getString
(
response
.
asString
(),
"\"exchangeText\":(.*?),"
,
1
);
logger
.
info
(
"exchangeText:"
+
exchangeText
);
Assert
.
assertEquals
(
exchangeText
,
"\"已下架\""
,
"页面数据返回错误"
);
Assert
.
assertEquals
(
exchangeText
,
"\"
商品
已下架\""
,
"页面数据返回错误"
);
logger
.
info
(
"校验 页面数据文本信息 成功"
);
//自有虚拟商品兑换
response
=
virtualExchangeService
.
exchange2
(
authorization
.
dafuwengLogin
(
uid
),
"186459"
,
"123"
);
...
...
src/test/java/http/cases/GoodsAndTradeTest/异常订单测试_ExchangeTest.java
View file @
ba929508
...
...
@@ -60,7 +60,7 @@ public class 异常订单测试_ExchangeTest extends DuibaTestBase {
response1
.
prettyPrint
();
String
message2
=
response1
.
jsonPath
().
getString
(
"message"
);
Assert
.
assertEquals
(
message2
,
"已
兑换
"
,
"message字段校验失败-期望是已兑换"
);
Assert
.
assertEquals
(
message2
,
"已
达兑换次数上限
"
,
"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