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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
集卡_单奖项_用户中奖限制测试_DuibaTest.java
.../cases/CollectActivityTest/集卡_单奖项_用户中奖限制测试_DuibaTest.java
+6
-6
自有活动出奖_DuibaTest.java
src/test/java/http/cases/DeveloperTest/自有活动出奖_DuibaTest.java
+0
-0
奖品发放限制_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
This diff is collapsed.
Click to expand it.
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