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
63e50d30
Commit
63e50d30
authored
Feb 28, 2020
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
75927390
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
51 deletions
+51
-51
集卡_单奖项_用户中奖限制测试_DuibaTest.java
.../cases/CollectActivityTest/集卡_单奖项_用户中奖限制测试_DuibaTest.java
+6
-6
自有活动出奖_DuibaTest.java
src/test/java/http/cases/DeveloperTest/自有活动出奖_DuibaTest.java
+38
-38
奖品发放限制_DuibaTest.java
...est/java/http/cases/NewActivityTest/奖品发放限制_DuibaTest.java
+4
-4
扣库存测试_DuibaTest.java
...test/java/http/cases/NewActivityTest/扣库存测试_DuibaTest.java
+3
-3
No files found.
src/test/java/http/cases/CollectActivityTest/集卡_单奖项_用户中奖限制测试_DuibaTest.java
View file @
63e50d30
...
...
@@ -90,12 +90,12 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
if
(
i
==
0
){
for
(
int
j
=
0
;
j
<
2
;
j
++){
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
2720
);
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
7504
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
)),
"collectGoods"
,
"校验中奖类型失败"
);
logger
.
info
(
"校验自定义中奖奖项信息成功,自定义活动游戏中奖奖品类型"
+
response
.
jsonPath
().
getString
(
"lottery.type"
));
}
//集卡结束后开奖--开奖类型:直接开奖
Response
openResponse
=
playCollectResult
(
"243"
,
"19933"
,
2720
);
Response
openResponse
=
playCollectResult
(
"243"
,
"19933"
,
7504
);
Assert
.
assertEquals
(
openResponse
.
jsonPath
().
getString
(
"lottery.title"
),
cLReward
.
getRlName
(),
"校验奖项失败"
);
Assert
.
assertEquals
(
openResponse
.
jsonPath
().
getString
(
"lottery.type"
),
cLReward
.
getRlType
(),
"校验奖项失败"
);
logger
.
info
(
"校验集卡活动开奖奖项信息成功,奖品信息为:"
+
openResponse
.
jsonPath
().
getString
(
"lottery.title"
));
...
...
@@ -103,13 +103,13 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
}
else
if
(
i
==
1
){
for
(
int
j
=
0
;
j
<
2
;
j
++){
if
(
j
==
0
){
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
2720
);
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
7504
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
)),
"collectGoods"
,
"校验中奖类型失败"
);
logger
.
info
(
"校验自定义中奖奖项信息成功,自定义活动游戏中奖奖品类型"
+
response
.
jsonPath
().
getString
(
"lottery.type"
));
}
else
if
(
j
==
1
){
//第二次中谢谢参与,开奖不满足中奖条件
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
2720
);
Response
response
=
playNewActivityResult
(
"19933"
,
"r3oq9gqkf"
,
"243"
,
7504
);
String
type
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
));
Assert
.
assertTrue
((
type
.
contains
(
"thanks"
))||(
type
.
contains
(
"lucky"
)));
logger
.
info
(
"校验中奖谢谢参与成功,奖项类型为"
+
response
.
jsonPath
().
getString
(
"lottery.type"
));
...
...
@@ -130,12 +130,12 @@ public class 集卡_单奖项_用户中奖限制测试_DuibaTest extends DuibaTe
String
awardsType
=
awardResponse
.
jsonPath
().
getString
(
"data.config.rewards[0].rlType"
);
for
(
int
i
=
0
;
i
<
2
;
i
++){
Response
response
=
playNewActivityResult1
(
"19929"
,
"r3oq9gqkf"
,
"239"
,
2720
);
Response
response
=
playNewActivityResult1
(
"19929"
,
"r3oq9gqkf"
,
"239"
,
7504
);
//校验中奖结果类型
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
)),
"collectGoods"
,
"校验中奖类型失败"
);
logger
.
info
(
"校验中奖类型成功,自定义活动游戏中奖奖品类型为"
+
response
.
jsonPath
().
getString
(
"lottery.type"
));
Response
openResponse
=
playCollectResult
(
"239"
,
"19929"
,
2720
);
Response
openResponse
=
playCollectResult
(
"239"
,
"19929"
,
7504
);
Assert
.
assertEquals
(
openResponse
.
jsonPath
().
getString
(
"lottery.title"
),
awardsName
,
"校验奖项失败"
);
Assert
.
assertEquals
(
openResponse
.
jsonPath
().
getString
(
"lottery.type"
),
awardsType
,
"校验奖项失败"
);
logger
.
info
(
"校验活动中奖信息name和type成功,奖品信息为:"
+
openResponse
.
jsonPath
().
getString
(
"lottery.title"
));
...
...
src/test/java/http/cases/DeveloperTest/自有活动出奖_DuibaTest.java
View file @
63e50d30
...
...
@@ -34,15 +34,15 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
Map
map
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 674900849714500524"
);
long
remaining
=
(
long
)
map
.
get
(
"stock"
);
Response
response
=
newActivityService
.
doJoin2
(
"21803"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"21803"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
response
.
print
();
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
response
.
print
();
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
...
...
@@ -67,34 +67,34 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
//领奖操作
String
recordId
=
MatcherString
.
getString
(
response
.
asString
(),
"recordId=(.*?)&"
,
1
);
response
=
newActivityService
.
doTakePrize
(
2720
,
type
,
recordId
);
response
=
newActivityService
.
doTakePrize
(
7505
,
type
,
recordId
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"message"
),
"领奖成功"
);
logger
.
info
(
"结果:"
+
type
+
"领奖流程成功"
);
//校验领奖后的订单状态
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0
687
where id = '"
+
orderId
+
"'"
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0
189
where id = '"
+
orderId
+
"'"
);
String
main_orderId
=
String
.
valueOf
(
selectResult
.
get
(
"main_order_num"
));
logger
.
info
(
"主订单为:"
+
main_orderId
);
Map
<
String
,
Object
>
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"' "
);
Map
<
String
,
Object
>
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
String
flowWork
=
String
.
valueOf
(
selectResult2
.
get
(
"flowwork_stage"
));
logger
.
info
(
"领奖后数据库订单节点:"
+
flowWork
);
int
j
=
10
;
while
(
j
>
0
&&
!
flowWork
.
equals
(
"SupplierExchange-started"
))
{
Thread
.
sleep
(
300
);
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"' "
);
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
flowWork
=
String
.
valueOf
(
selectResult2
.
get
(
"flowwork_stage"
));
logger
.
info
(
"领奖后数据库订单节点:"
+
flowWork
);
j
--;
}
Assert
.
assertEquals
(
flowWork
,
"SupplierExchange-started"
,
"数据库主订单流程节点校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"biz_params"
)),
"胡梦新:18258853242:浙江省:杭州市:西湖区:西溪街道:数娱大厦
"
,
"数据库主订单biz_params校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"biz_params"
)),
"胡梦新:18258853242:浙江省:杭州市:西湖区:西溪街道:数娱大厦"
,
"数据库主订单biz_params校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"pay_status"
)),
"none"
,
"数据库主订单pay_status校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"status"
)),
"consume_success"
,
"数据库主订单status校验失败"
);
//发货操作
Map
<
String
,
Object
>
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"' "
);
Map
<
String
,
Object
>
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
String
orderId_send
=
String
.
valueOf
(
selectResult3
.
get
(
"supplier_order_id"
));
logger
.
info
(
"发货订单为:"
+
orderId_send
);
...
...
@@ -103,14 +103,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
logger
.
info
(
"自有实物发货订单成功"
);
//校验发货后的订单状态
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"'"
);
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"'"
);
String
flowWork2
=
String
.
valueOf
(
selectResult3
.
get
(
"flowwork_stage"
));
logger
.
info
(
"发货后数据库订单节点:"
+
flowWork2
);
int
k
=
10
;
while
(
k
>
0
&&
!
flowWork2
.
equals
(
"Success-complete"
))
{
Thread
.
sleep
(
1000
);
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"' "
);
selectResult3
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
flowWork2
=
String
.
valueOf
(
selectResult3
.
get
(
"flowwork_stage"
));
logger
.
info
(
"发货后数据库订单节点:"
+
flowWork2
);
k
--;
...
...
@@ -121,14 +121,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
(
description
=
"出奖及订单校验"
)
public
void
出奖自有优惠券
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"21792"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"21792"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -148,17 +148,17 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
Assert
.
assertEquals
(
coupon_code
,
"123123123"
,
"coupon_code不正确"
);
Assert
.
assertEquals
(
coupon_key
,
"123123"
,
"coupon_key不正确"
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0
687
where id = '"
+
orderId
+
"' "
,
null
);
Map
<
String
,
Object
>
selectResult
=
jdbc
.
findSimpleResult
(
"select * from credits_hdtool.hdtool_orders_0
189
where id = '"
+
orderId
+
"' "
,
null
);
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_0
687
where order_num = '"
+
main_orderId
+
"' "
);
Map
<
String
,
Object
>
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
logger
.
info
(
"数据库订单节点:"
+
selectResult2
.
get
(
"flowwork_stage"
));
String
flowWork
=
String
.
valueOf
(
selectResult2
.
get
(
"flowwork_stage"
));
int
j
=
10
;
while
(
j
>
0
&&
!
flowWork
.
equals
(
"Success-complete"
))
{
Thread
.
sleep
(
300
);
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
687
where order_num = '"
+
main_orderId
+
"' "
);
selectResult2
=
jdbc
.
findSimpleResult
(
"select * from orders_consumer.orders_0
189
where order_num = '"
+
main_orderId
+
"' "
);
flowWork
=
String
.
valueOf
(
selectResult2
.
get
(
"flowwork_stage"
));
logger
.
info
(
"数据库订单节点:"
+
flowWork
);
j
--;
...
...
@@ -171,14 +171,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
Map
map
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 674900860200070105"
);
long
remaining
=
(
long
)
map
.
get
(
"stock"
);
Response
response
=
newActivityService
.
doJoin2
(
"21793"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"21793"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -207,14 +207,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
public
void
出奖兑吧实物
()
throws
Exception
{
Map
map
=
jdbc
.
findSimpleResult
(
"select * from stock.tb_stock where stock_id = 674900440770170322 "
);
long
remaining
=
(
long
)
map
.
get
(
"stock"
);
Response
response
=
newActivityService
.
doJoin2
(
"22637"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22637"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
response
.
prettyPeek
();
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
...
...
@@ -241,14 +241,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
public
void
出奖兑吧优惠券
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"22636"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22636"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -269,14 +269,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
public
void
出奖话费
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"22647"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22647"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -296,14 +296,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
public
void
出奖支付宝
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"22648"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22648"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -323,14 +323,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
public
void
出奖
Q
币
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"22649"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22649"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
@@ -350,14 +350,14 @@ public class 自有活动出奖_DuibaTest extends DuibaTestBase {
@Test
public
void
出奖福袋
()
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
"22651"
,
"h5ps61"
);
Response
response
=
newActivityService
.
doJoin2
(
7505
,
"22651"
,
"h5ps61"
);
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
String
result
=
response
.
jsonPath
().
getString
(
"result"
);
int
i
=
30
;
while
(
i
>
0
&&
result
.
equals
(
"0"
)){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
);
response
=
newActivityService
.
getOrderStatus2
(
7505
,
orderId
);
result
=
response
.
jsonPath
().
getString
(
"result"
);
i
--;
}
...
...
src/test/java/http/cases/NewActivityTest/奖品发放限制_DuibaTest.java
View file @
63e50d30
...
...
@@ -43,10 +43,10 @@ public class 奖品发放限制_DuibaTest extends DuibaTestBase {
//数据库删除
try
{
//case:[奖品发放限制测试_永久]数据处理:删除永久中奖记录
jdbc
.
update
(
"UPDATE ckvtable.tb_kvtable_0
687 SET int_value = '0' WHERE vkey = 'activity-centerwinOptionNum_100025007
_35868_hdtool25884'"
);
jdbc
.
update
(
"UPDATE ckvtable.tb_kvtable_0
177 SET int_value = '0' WHERE vkey = 'activity-centerwinOptionNum_100176049
_35868_hdtool25884'"
);
//case:[奖品发放限制测试_每日]数据处理:删除每日中奖记录
String
y_m_d
=
getTime2
(
0
);
String
key
=
"k05_PRIZE_K001_"
+
y_m_d
+
"_hdtool25933_100
025007
"
;
String
key
=
"k05_PRIZE_K001_"
+
y_m_d
+
"_hdtool25933_100
176049
"
;
hbaseService
.
deleteHBASEKey2
(
key
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
);
...
...
@@ -75,12 +75,12 @@ public class 奖品发放限制_DuibaTest extends DuibaTestBase {
public
void
奖品发放限制测试
_
每日
()
throws
Exception
{
//第一次抽奖
Response
response
=
this
.
新活动工具接口传参
(
7
500
,
"35920"
,
"adsdas"
,
"iOS"
);
Response
response
=
this
.
新活动工具接口传参
(
7
499
,
"35920"
,
"adsdas"
,
"iOS"
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
)),
"phonebill"
,
"第一次抽奖出奖类型失败,请考虑是否activity-access-web发布了master分支所导致"
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.title"
)),
"话费"
,
"第一次抽奖出奖title失败"
);
//第二次抽奖
response
=
this
.
新活动工具接口传参
(
7
500
,
"35920"
,
"adsdas"
,
"iOS"
);
response
=
this
.
新活动工具接口传参
(
7
499
,
"35920"
,
"adsdas"
,
"iOS"
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.type"
)),
"lucky"
,
"第一次抽奖出奖类型失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"lottery.useBtnText"
)),
"马上使用"
,
"第一次抽奖出奖文案失败"
);
...
...
src/test/java/http/cases/NewActivityTest/扣库存测试_DuibaTest.java
View file @
63e50d30
...
...
@@ -273,17 +273,17 @@ public class 扣库存测试_DuibaTest extends DuibaTestBase {
}
public
Response
新活动工具接口传参
(
String
activityId
,
String
token
,
String
device
)
throws
Exception
{
Response
response
=
newActivityService
.
doJoin2
(
activityId
,
token
);
Response
response
=
newActivityService
.
doJoin2
(
7500
,
activityId
,
token
);
response
.
prettyPrint
();
String
orderId
=
response
.
jsonPath
().
getString
(
"orderId"
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
,
device
);
response
=
newActivityService
.
getOrderStatus2
(
7500
,
orderId
,
device
);
response
.
prettyPrint
();
String
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
int
i
=
30
;
while
(
i
>
0
&&(
result
.
equals
(
"0"
))){
Thread
.
sleep
(
1000
);
response
=
newActivityService
.
getOrderStatus2
(
orderId
,
device
);
response
=
newActivityService
.
getOrderStatus2
(
7500
,
orderId
,
device
);
result
=
String
.
valueOf
(
response
.
jsonPath
().
getString
(
"result"
));
i
--;
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