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
3d0f5d38
Commit
3d0f5d38
authored
Mar 29, 2019
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
399aed5e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
出奖订单测试_DuibaTest.java
...est/java/http/cases/NewActivityTest/出奖订单测试_DuibaTest.java
+15
-1
开发者签到编辑_signTest.java
src/test/java/http/cases/SignTest/开发者签到编辑_signTest.java
+2
-2
No files found.
src/test/java/http/cases/NewActivityTest/出奖订单测试_DuibaTest.java
View file @
3d0f5d38
...
...
@@ -61,6 +61,9 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
Thread
.
sleep
(
2000
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0687 where id = '"
+
orderId
+
"'"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult
.
get
(
"exchange_status"
)),
"2"
,
"子订单兑换状态正常"
);
logger
.
info
(
"子订单状态为2,处于领奖成功状态"
);
logger
.
info
(
"主订单为:"
+
selectResult
.
get
(
"main_order_num"
));
String
main_orderId
=
String
.
valueOf
(
selectResult
.
get
(
"main_order_num"
));
...
...
@@ -106,6 +109,9 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
response
.
prettyPrint
();
}
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0687 where id = '"
+
orderId
+
"' "
,
null
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult
.
get
(
"exchange_status"
)),
"2"
,
"子订单兑换状态正常"
);
logger
.
info
(
"子订单状态为2,处于领奖成功状态"
);
logger
.
info
(
"主订单为:"
+
selectResult
.
get
(
"main_order_num"
));
String
main_orderId
=
String
.
valueOf
(
selectResult
.
get
(
"main_order_num"
));
Map
<
String
,
Object
>
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0687 where order_num = '"
+
main_orderId
+
"' "
);
...
...
@@ -146,13 +152,21 @@ public class 出奖订单测试_DuibaTest extends DuibaTestBase {
}
String
type
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
));
//领奖前子订单状态查询
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0687 where id = '"
+
orderId
+
"'"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult
.
get
(
"exchange_status"
)),
"1"
,
"子订单兑换状态正常"
);
logger
.
info
(
"子订单状态为1,处于待领奖状态"
);
//领奖操作
String
recordId
=
MatcherString
.
getString
(
response
.
asString
(),
"recordId=(.*?)&"
,
1
);
response
=
newActivityService
.
doTakePrize
(
2720
,
type
,
recordId
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"领奖成功"
);
logger
.
info
(
"结果:"
+
type
+
"领奖流程成功"
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0687 where id = '"
+
orderId
+
"'"
);
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0687 where id = '"
+
orderId
+
"'"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult
.
get
(
"exchange_status"
)),
"2"
,
"子订单兑换状态正常"
);
logger
.
info
(
"子订单状态为2,处于领奖成功状态"
);
String
main_orderId
=
String
.
valueOf
(
selectResult
.
get
(
"main_order_num"
));
logger
.
info
(
"主订单为:"
+
main_orderId
);
...
...
src/test/java/http/cases/SignTest/开发者签到编辑_signTest.java
View file @
3d0f5d38
...
...
@@ -28,8 +28,8 @@ public class 开发者签到编辑_signTest extends AbstractTestNGSpringContextT
Response
response
=
signService
.
selectsignOperList
(
"19515"
);
response
.
print
();
Assert
.
assertEquals
(
"false"
,
response
.
jsonPath
().
getString
(
"data.list[0].openToDev"
)
,
"来自Duiba的签到编辑权限失败"
);
Assert
.
assertEquals
(
"true"
,
response
.
jsonPath
().
getString
(
"data.list[1].openToDev"
)
,
"来自开发者自有的签到编辑权限失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].openToDev"
),
"false"
,
"来自Duiba的签到编辑权限失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[1].openToDev"
),
"true"
,
"来自开发者自有的签到编辑权限失败"
);
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