Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
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
龚小红
oto
Commits
ee1ba3cb
Commit
ee1ba3cb
authored
Jul 16, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新删除接口
parent
da66bcf8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
254 additions
and
196 deletions
+254
-196
ArticalPersonCard.java
.../java/com/kjj/cases/assistant/card/ArticalPersonCard.java
+1
-1
PersonCard.java
src/test/java/com/kjj/cases/assistant/card/PersonCard.java
+1
-1
Customer.java
src/test/java/com/kjj/cases/live/agent/Customer.java
+1
-1
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+57
-23
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+164
-142
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+27
-16
wechatTestNG.xml
src/test/wechatTestNG.xml
+3
-12
No files found.
src/test/java/com/kjj/cases/
basics
/card/ArticalPersonCard.java
→
src/test/java/com/kjj/cases/
assistant
/card/ArticalPersonCard.java
View file @
ee1ba3cb
package
com
.
kjj
.
cases
.
basics
.
card
;
package
com
.
kjj
.
cases
.
assistant
.
card
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
...
...
src/test/java/com/kjj/cases/
basics
/card/PersonCard.java
→
src/test/java/com/kjj/cases/
assistant
/card/PersonCard.java
View file @
ee1ba3cb
package
com
.
kjj
.
cases
.
basics
.
card
;
package
com
.
kjj
.
cases
.
assistant
.
card
;
import
com.kjj.bean.card.GoodMajor
;
import
com.kjj.bean.card.WechatCard
;
...
...
src/test/java/com/kjj/cases/live/agent/Customer.java
View file @
ee1ba3cb
...
...
@@ -78,7 +78,7 @@ public class Customer implements Authorization {
int
customerNum
=
response
.
jsonPath
().
getInt
(
"data.customerNum"
);
Assert
.
assertTrue
(
customerNum
>
26
,
network
.
message
(
BasicConfig
.
MOBILE_count
,
"总客户数量不对"
,
response
.
body
().
asString
()));
int
lastOneNewNum
=
response
.
jsonPath
().
getJsonObject
(
"data.lastOneNewNum"
);
Assert
.
assertTrue
(
lastOneNewNum
>
1
7
,
network
.
message
(
BasicConfig
.
MOBILE_count
,
"上场新增客户数量"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
lastOneNewNum
>
1
5
,
network
.
message
(
BasicConfig
.
MOBILE_count
,
"上场新增客户数量"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
ee1ba3cb
...
...
@@ -1408,24 +1408,23 @@ public class SaveLive implements Authorization {
}
/**
* 翻牌活动配置
* 翻牌
集字
活动配置
*/
// @Test(description = "保存翻牌配置", priority = 69)
// public void 保存翻牌配置() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("withdrawalAmount", 100);
// Params.put("withdrawalCondition", 1);
// Params.put("withdrawalNum", 1);
// Params.put("invitePresentNum", 1);
// Params.put("initPresentNum", 10);
// Params.put("imgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Params.put("secondImgUrl", "https://yun.dui88.com/kjy/image/20210608/1623132676884.jpg");
// Response response = network.postResponse(Params, BasicConfig.MANAGER_card);
// Params.put("showAmount", 100);
// Params.put("personalShowAmount",1);
// Params.put("inviteNum",1);
// Params.put("invitePresentNum",1);
// Params.put("amount", 1);
// Params.put("num", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_flipWord);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_
ca
rd, "保存翻牌配置失败", response.body().asString()));
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_
flipWo
rd, "保存翻牌配置失败", response.body().asString()));
//
// }
//
...
...
@@ -1433,10 +1432,10 @@ public class SaveLive implements Authorization {
// public void 查看直播翻牌配置详情() {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_
ca
rdDetail);
// Response response = network.getResponse(Params, BasicConfig.MANAGER_
wo
rdDetail);
// Object data = response.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_
ca
rdDetail, "查看直播翻牌配置详情失败", response.body().asString()));
// Assert.assertNotNull(data, network.message(Params, BasicConfig.MANAGER_
wo
rdDetail, "查看直播翻牌配置详情失败", response.body().asString()));
//
// }
//
...
...
@@ -1446,10 +1445,10 @@ public class SaveLive implements Authorization {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Params.put("confStatus", 1);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_
switch
);
// Response response = network.postResponse(Params, BasicConfig.MANAGER_
wordSwitchStatus
);
// boolean data = response.jsonPath().getBoolean("data");
// System.out.println(data);
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_
switch
, "开启翻牌配置失败", response.body().asString()));
// Assert.assertTrue(data, network.message(Params, BasicConfig.MANAGER_
wordSwitchStatus
, "开启翻牌配置失败", response.body().asString()));
//
// }
//
...
...
@@ -1458,13 +1457,13 @@ public class SaveLive implements Authorization {
// Map<String, Object> Params = new HashMap<>();
// Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
// Response response = network.getResponse(Params, BasicConfig.MANAGER_getConfDetail);
// boolean
cardConfBuildStatus = response.jsonPath().getBoolean("data.ca
rdConfBuildStatus");
// System.out.println(
ca
rdConfBuildStatus);
// Assert.assertTrue(
ca
rdConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
// boolean
flipWordConfBuildStatus = response.jsonPath().getBoolean("data.flipWo
rdConfBuildStatus");
// System.out.println(
flipWo
rdConfBuildStatus);
// Assert.assertTrue(
flipWo
rdConfBuildStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未配置翻牌", response.body().asString()));
//
// boolean
cardConfStatus = response.jsonPath().getBoolean("data.ca
rdConfStatus");
// System.out.println(
ca
rdConfStatus);
// Assert.assertTrue(
ca
rdConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
// boolean
flipWordConfStatus = response.jsonPath().getBoolean("data.flipWo
rdConfStatus");
// System.out.println(
flipWo
rdConfStatus);
// Assert.assertTrue(
flipWo
rdConfStatus, network.message(Params, BasicConfig.MANAGER_getConfDetail, "未开启翻牌", response.body().asString()));
//
//
// }
...
...
@@ -1749,6 +1748,7 @@ public class SaveLive implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_redSwitchStatus
,
"开启攒现金红包配置失败"
,
response
.
body
().
asString
()));
}
/**
* 闯关答题
*/
...
...
@@ -2012,11 +2012,27 @@ public class SaveLive implements Authorization {
}
@Test
(
description
=
"查看直播好运配置状态"
,
priority
=
108
)
public
void
查看直播好运配置状态
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
boolean
configFortune
=
response
.
jsonPath
().
getBoolean
(
"data.configFortune"
);
System
.
out
.
println
(
configFortune
);
Assert
.
assertTrue
(
configFortune
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置好运红包"
,
response
.
body
().
asString
()));
boolean
fortuneConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.fortuneConfBuildStatus"
);
System
.
out
.
println
(
fortuneConfBuildStatus
);
Assert
.
assertTrue
(
fortuneConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启好运红包配置"
,
response
.
body
().
asString
()));
}
/**
* 直播预告页弹窗
*/
@Test
(
description
=
"直播预告页弹窗配置"
,
priority
=
10
8
)
@Test
(
description
=
"直播预告页弹窗配置"
,
priority
=
10
9
)
public
void
直播预告页弹窗配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
@@ -2031,7 +2047,7 @@ public class SaveLive implements Authorization {
}
@Test
(
description
=
"预告页弹窗详情"
,
priority
=
1
09
)
@Test
(
description
=
"预告页弹窗详情"
,
priority
=
1
10
)
public
void
预告页弹窗详情
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
@@ -2042,7 +2058,7 @@ public class SaveLive implements Authorization {
}
@Test
(
description
=
"开启预告页弹窗"
,
priority
=
11
0
)
@Test
(
description
=
"开启预告页弹窗"
,
priority
=
11
1
)
public
void
开启预告页弹窗
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
@@ -2054,7 +2070,25 @@ public class SaveLive implements Authorization {
}
@Test
(
description
=
"查看直播预告页弹窗配置状态"
,
priority
=
112
)
public
void
查看直播预告页弹窗配置状态
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
boolean
preLayerConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.preLayerConfStatus"
);
System
.
out
.
println
(
preLayerConfStatus
);
Assert
.
assertTrue
(
preLayerConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置预告页弹窗"
,
response
.
body
().
asString
()));
boolean
preLayerOpenStatus
=
response
.
jsonPath
().
getBoolean
(
"data.preLayerOpenStatus"
);
System
.
out
.
println
(
preLayerOpenStatus
);
Assert
.
assertTrue
(
preLayerOpenStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启预告页弹窗"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
ee1ba3cb
...
...
@@ -259,9 +259,6 @@ public class Lottery implements Authorization {
submitInfoParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
submitInfoParam
.
put
(
"confId"
,
this
.
List_ConfId
.
get
(
0
).
getWelfareConfId
());
submitInfoParam
.
put
(
"winnerName"
,
"中奖姓名XX"
);
// submitInfoParam.put("region", "");
// submitInfoParam.put("location", "");
// submitInfoParam.put("phoneNum", "");
Response
submitInfoRes
=
network
.
postResponse
(
submitInfoParam
,
BasicConfig
.
USER_submitInfo
);
Boolean
result
=
submitInfoRes
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
result
);
...
...
@@ -269,24 +266,9 @@ public class Lottery implements Authorization {
ThreadSleepUtils
.
sleep
(
3000
);
}
@Test
(
description
=
"访客A中奖任务"
,
priority
=
19
)
public
void
访客
A
中奖任务
()
{
visitorAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
luckDetailParam
=
new
HashMap
<>();
luckDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
luckDetailRes
=
network
.
getResponse
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
);
try
{
Boolean
hasDrawTask
=
luckDetailRes
.
jsonPath
().
getBoolean
(
"data.hasDrawTask"
);
Assert
.
assertTrue
(
hasDrawTask
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
USER_result
,
"查询中奖任务失败"
,
luckDetailRes
.
body
().
asString
()));
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"result = "
+
JSON
.
toJSONString
(
luckDetailRes
.
jsonPath
().
get
()));
throw
e
;
}
}
@Test
(
description
=
"访客A
中奖任务_分享直播间"
,
priority
=
20
)
public
void
访客
A
中奖任务
_
分享直播间
()
{
@Test
(
description
=
"访客A
_分享直播间"
,
priority
=
19
)
public
void
访客
A_
分享直播间
()
{
visitorAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
...
...
@@ -300,8 +282,9 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"中奖任务邀请C关系绑定"
,
priority
=
21
)
public
void
中奖任务邀请
C
关系绑定
()
{
@Test
(
description
=
"邀请C关系绑定"
,
priority
=
20
)
public
void
邀请
C
关系绑定
()
{
visitorAuth3
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -313,8 +296,8 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"
中奖任务
邀请C绑定结果和绑定凭证"
,
priority
=
22
)
public
void
获取访客
C
绑定结果和绑定凭证
()
{
@Test
(
description
=
"邀请C绑定结果和绑定凭证"
,
priority
=
22
)
public
void
邀请
C
绑定结果和绑定凭证
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
...
...
@@ -326,24 +309,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客C给访客A助力"
,
priority
=
23
)
public
void
访客
C
给访客
A
助力
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
assistParam
=
new
HashMap
<>();
assistParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
assistParam
.
put
(
"shareSign"
,
shareSign
);
assistParam
.
put
(
"shareType"
,
3
);
assistParam
.
put
(
"confId"
,
this
.
List_ConfId
.
get
(
0
).
getWelfareConfId
());
Response
response
=
network
.
postResponse
(
assistParam
,
BasicConfig
.
MOBILE_assist
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客C给访客A助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客C到场"
,
priority
=
24
)
@Test
(
description
=
"访客C到场"
,
priority
=
23
)
public
void
访客
C
到场
()
{
visitorAuth3
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -354,20 +320,9 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
//访客B绑定访客A后获取访客A的中奖任务信息
@Test
(
description
=
"访客C获取访客A的中奖任务信息"
,
priority
=
25
)
public
void
访客
C
获取访客
A
的中奖任务信息
()
{
visitorAuth3
();
Map
<
String
,
Object
>
inviteDrawDetailParam
=
new
HashMap
<>();
inviteDrawDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
inviteDrawDetailRes
=
network
.
getResponse
(
inviteDrawDetailParam
,
BasicConfig
.
ANCHOR_inviteDrawDetail
);
Object
result
=
inviteDrawDetailRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
result
);
Assert
.
assertNotNull
(
result
,
network
.
message
(
inviteDrawDetailParam
,
BasicConfig
.
ANCHOR_inviteDrawDetail
,
"查询邀请人中奖信息失败"
,
inviteDrawDetailRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客C关注直播间"
,
priority
=
2
6
)
@Test
(
description
=
"访客C关注直播间"
,
priority
=
2
4
)
public
void
访客
C
关注直播间
()
{
visitorAuth3
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -378,7 +333,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客C抽奖码数量"
,
priority
=
2
7
)
@Test
(
description
=
"访客C抽奖码数量"
,
priority
=
2
5
)
public
void
访客
C
抽奖码数量
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -389,22 +344,89 @@ public class Lottery implements Authorization {
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
myCountParam
,
BasicConfig
.
USER_myCount
,
"获取抽奖码数量失败"
,
myCountRes
.
body
().
asString
()));
}
//好运红包
@Test
(
description
=
"分享者访客A获取好运红包"
,
priority
=
26
)
public
void
分享者访客
A
获取好运红包
()
{
visitorAuth
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"scene"
,
4
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_getRed
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_getRed
,
"好运红包获取失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客A
中奖任务是否完成"
,
priority
=
28
)
public
void
访客
A
中奖任务是否完成
()
{
@Test
(
description
=
"访客A
分享好运红包给访客B"
,
priority
=
27
)
public
void
访客
A
分享好运红包给访客
B
()
{
visitorAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
luckDetailParam
=
new
HashMap
<>();
luckDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
luckDetailRes
=
network
.
getResponse
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
);
boolean
hasDrawTask
=
luckDetailRes
.
jsonPath
().
getJsonObject
(
"data.hasDrawTask"
);
System
.
out
.
println
(
hasDrawTask
);
Assert
.
assertTrue
(
hasDrawTask
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
,
"查询中奖任务失败"
,
luckDetailRes
.
body
().
asString
()));
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"shareType"
,
11
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_helpInfo
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_helpInfo
,
"分享失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客B获取好运红包领取记录"
,
priority
=
28
)
public
void
访客
B
获取好运红包领取记录
()
{
visitorAuth13
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_receiveRecord
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_receiveRecord
,
"访客B获取好运红包领取记录失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客B领取好运红包"
,
priority
=
29
)
public
void
访客
B
领取好运红包
()
{
visitorAuth13
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"shareUserId"
,
"Kj20ODYz"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MOBILE_receiverOpen
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_receiverOpen
,
"访客B领取好运红包失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客B参与记录"
,
priority
=
30
)
public
void
访客
B
参与记录
()
{
visitorAuth13
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"shareUserId"
,
"Kj20ODYz"
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_joinRecord
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_joinRecord
,
"访客B参与记录查询失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客A抽奖券列表"
,
priority
=
29
)
@Test
(
description
=
"访客A获取好运红包领取记录"
,
priority
=
31
)
public
void
访客
A
获取好运红包领取记录
()
{
visitorAuth13
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"shareUserId"
,
"Kj20ODYz"
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_joinRecord
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MOBILE_joinRecord
,
"访客A获取好运红包领取记录失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客A抽奖券列表"
,
priority
=
32
)
public
void
访客
A
抽奖券列表
()
{
visitorAuth
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -415,18 +437,18 @@ public class Lottery implements Authorization {
Response
myLotteryCodeRes
=
network
.
getResponse
(
myLotteryCodeParam
,
BasicConfig
.
MOBILE_MyLotteryCode
);
Object
data
=
myLotteryCodeRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
List
<
Object
>
values
=
myLotteryCodeRes
.
jsonPath
().
getList
(
"data.list"
);
boolean
result
=
false
;
for
(
Object
value
:
values
)
{
if
(
Objects
.
equals
(((
Map
)
value
).
get
(
"codeSource"
),
5
))
{
result
=
true
;
break
;
}
}
Assert
.
assert
True
(
result
,
network
.
message
(
myLotteryCodeParam
,
BasicConfig
.
MOBILE_MyLotteryCode
,
"查询访客A抽奖券列表失败"
,
myLotteryCodeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客A抽奖码数量"
,
priority
=
3
0
)
//
List<Object> values = myLotteryCodeRes.jsonPath().getList("data.list");
//
boolean result = false;
//
for (Object value : values) {
//
if (Objects.equals(((Map) value).get("codeSource"), 5)) {
//
result = true;
//
break;
//
}
//
}
Assert
.
assert
NotNull
(
data
,
network
.
message
(
myLotteryCodeParam
,
BasicConfig
.
MOBILE_MyLotteryCode
,
"查询访客A抽奖券列表失败"
,
myLotteryCodeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客A抽奖码数量"
,
priority
=
3
3
)
public
void
访客
A
抽奖码数量
()
{
visitorAuth
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -439,7 +461,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客B幸运任务"
,
priority
=
3
1
)
@Test
(
description
=
"访客B幸运任务"
,
priority
=
3
4
)
public
void
访客
B
幸运任务
()
{
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -457,7 +479,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客B直播中分享直播间"
,
priority
=
3
2
)
@Test
(
description
=
"访客B直播中分享直播间"
,
priority
=
3
5
)
public
void
访客
B
直播中分享直播间
()
{
visitorAuth2
();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
...
...
@@ -472,7 +494,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请D关系绑定"
,
priority
=
3
3
)
@Test
(
description
=
"幸运任务邀请D关系绑定"
,
priority
=
3
6
)
public
void
幸运任务邀请
D
关系绑定
()
{
visitorAuth4
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
...
@@ -485,7 +507,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请D绑定结果和绑定凭证"
,
priority
=
3
4
)
@Test
(
description
=
"幸运任务邀请D绑定结果和绑定凭证"
,
priority
=
3
7
)
public
void
幸运任务邀请
D
绑定结果和绑定凭证
()
{
visitorAuth4
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -498,7 +520,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客D给访客B助力"
,
priority
=
3
5
)
@Test
(
description
=
"访客D给访客B助力"
,
priority
=
3
8
)
public
void
访客
D
给访客
B
助力
()
{
visitorAuth4
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -513,7 +535,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客D给访客B助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客D到场"
,
priority
=
3
6
)
@Test
(
description
=
"访客D到场"
,
priority
=
3
9
)
public
void
访客
D
到场
()
{
visitorAuth4
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -524,7 +546,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客D关注直播间"
,
priority
=
37
)
@Test
(
description
=
"访客D关注直播间"
,
priority
=
40
)
public
void
访客
D
关注直播间
()
{
visitorAuth4
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -535,7 +557,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客D抽奖码数量"
,
priority
=
38
)
@Test
(
description
=
"访客D抽奖码数量"
,
priority
=
41
)
public
void
访客
D
抽奖码数量
()
{
visitorAuth4
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -548,7 +570,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请E关系绑定"
,
priority
=
39
)
@Test
(
description
=
"幸运任务邀请E关系绑定"
,
priority
=
42
)
public
void
幸运任务邀请
E
关系绑定
()
{
visitorAuth5
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
...
@@ -561,7 +583,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请E绑定结果和绑定凭证"
,
priority
=
4
0
)
@Test
(
description
=
"幸运任务邀请E绑定结果和绑定凭证"
,
priority
=
4
3
)
public
void
幸运任务邀请
E
绑定结果和绑定凭证
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -574,7 +596,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客E给访客B助力"
,
priority
=
4
1
)
@Test
(
description
=
"访客E给访客B助力"
,
priority
=
4
4
)
public
void
访客
E
给访客
B
助力
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -589,7 +611,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客E给访客B助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客E到场"
,
priority
=
4
2
)
@Test
(
description
=
"访客E到场"
,
priority
=
4
5
)
public
void
访客
E
到场
()
{
visitorAuth5
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -600,7 +622,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客E关注直播间"
,
priority
=
4
3
)
@Test
(
description
=
"访客E关注直播间"
,
priority
=
4
6
)
public
void
访客
E
关注直播间
()
{
visitorAuth5
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -611,7 +633,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客E抽奖码数量"
,
priority
=
4
4
)
@Test
(
description
=
"访客E抽奖码数量"
,
priority
=
4
7
)
public
void
访客
E
抽奖码数量
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -624,7 +646,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请F关系绑定"
,
priority
=
4
5
)
@Test
(
description
=
"幸运任务邀请F关系绑定"
,
priority
=
4
8
)
public
void
幸运任务邀请
F
关系绑定
()
{
visitorAuth6
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
...
@@ -637,7 +659,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请F绑定结果和绑定凭证"
,
priority
=
4
6
)
@Test
(
description
=
"幸运任务邀请F绑定结果和绑定凭证"
,
priority
=
4
9
)
public
void
幸运任务邀请
F
绑定结果和绑定凭证
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -649,7 +671,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客F给访客B助力"
,
priority
=
47
)
@Test
(
description
=
"访客F给访客B助力"
,
priority
=
50
)
public
void
访客
F
给访客
B
助力
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -664,7 +686,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客F给访客B助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客F到场"
,
priority
=
48
)
@Test
(
description
=
"访客F到场"
,
priority
=
51
)
public
void
访客
F
到场
()
{
visitorAuth6
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -675,7 +697,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客F关注直播间"
,
priority
=
49
)
@Test
(
description
=
"访客F关注直播间"
,
priority
=
52
)
public
void
访客
F
关注直播间
()
{
visitorAuth6
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -686,7 +708,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客F抽奖码数量"
,
priority
=
5
0
)
@Test
(
description
=
"访客F抽奖码数量"
,
priority
=
5
3
)
public
void
访客
F
抽奖码数量
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -700,7 +722,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请G关系绑定"
,
priority
=
5
1
)
@Test
(
description
=
"幸运任务邀请G关系绑定"
,
priority
=
5
4
)
public
void
幸运任务邀请
G
关系绑定
()
{
visitorAuth7
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
...
@@ -713,7 +735,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"幸运任务邀请G绑定结果和绑定凭证"
,
priority
=
5
2
)
@Test
(
description
=
"幸运任务邀请G绑定结果和绑定凭证"
,
priority
=
5
5
)
public
void
幸运任务邀请
G
绑定结果和绑定凭证
()
{
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -725,7 +747,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客G给访客B助力"
,
priority
=
5
3
)
@Test
(
description
=
"访客G给访客B助力"
,
priority
=
5
6
)
public
void
访客
G
给访客
B
助力
()
{
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
2000
);
...
...
@@ -740,7 +762,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客G给访客B助力失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"访客G到场"
,
priority
=
5
4
)
@Test
(
description
=
"访客G到场"
,
priority
=
5
7
)
public
void
访客
G
到场
()
{
visitorAuth7
();
//黑名单用户
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -751,7 +773,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客G关注直播间"
,
priority
=
5
5
)
@Test
(
description
=
"访客G关注直播间"
,
priority
=
5
8
)
public
void
访客
G
关注直播间
()
{
visitorAuth7
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -762,7 +784,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客G抽奖码数量"
,
priority
=
5
6
)
@Test
(
description
=
"访客G抽奖码数量"
,
priority
=
5
9
)
public
void
访客
G
抽奖码数量
()
{
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -776,7 +798,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客B幸运任务是否完成"
,
priority
=
57
)
@Test
(
description
=
"访客B幸运任务是否完成"
,
priority
=
60
)
public
void
访客
B
幸运任务是否完成
()
{
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -789,7 +811,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客B的抽奖券列表"
,
priority
=
58
)
@Test
(
description
=
"访客B的抽奖券列表"
,
priority
=
61
)
public
void
访客
B
的抽奖券列表
()
{
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -810,7 +832,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"访客B的抽奖码数量"
,
priority
=
59
)
@Test
(
description
=
"访客B的抽奖码数量"
,
priority
=
62
)
public
void
访客
B
抽奖码数量
()
{
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -823,7 +845,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"开始第二轮抽奖"
,
priority
=
6
0
)
@Test
(
description
=
"开始第二轮抽奖"
,
priority
=
6
3
)
public
void
开始第二轮抽奖
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -836,7 +858,7 @@ public class Lottery implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
startParam
,
BasicConfig
.
ANCHOR_start
,
"开启第二轮抽奖失败"
,
startRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询第二轮正在抽奖的福利"
,
priority
=
6
1
)
@Test
(
description
=
"查询第二轮正在抽奖的福利"
,
priority
=
6
4
)
public
void
查询第二轮正在抽奖的福利
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -850,7 +872,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"查询第二轮是否可以结束抽奖状态"
,
priority
=
6
2
)
@Test
(
description
=
"查询第二轮是否可以结束抽奖状态"
,
priority
=
6
5
)
public
void
查询第二轮是否可以结束抽奖状态
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -863,7 +885,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
statusParam
,
BasicConfig
.
ANCHOR_status
,
"抽奖状态查询失败"
,
statusRes
.
body
().
asString
()));
}
@Test
(
description
=
"结束第二轮抽奖"
,
priority
=
6
3
)
@Test
(
description
=
"结束第二轮抽奖"
,
priority
=
6
6
)
public
void
结束第二轮抽奖
()
{
adminAuth
();
Map
<
String
,
Object
>
endParam
=
new
HashMap
<>();
...
...
@@ -876,7 +898,7 @@ public class Lottery implements Authorization {
}
//昵称:刘超 孝感区域指定中奖
@Test
(
description
=
"孝感访客C是否中奖"
,
priority
=
6
4
)
@Test
(
description
=
"孝感访客C是否中奖"
,
priority
=
6
7
)
public
void
孝感访客
C
是否中奖
()
{
visitorAuth3
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -895,7 +917,7 @@ public class Lottery implements Authorization {
}
//昵称:李执--区域中奖用户
@Test
(
description
=
"北京访客D查询是否中奖"
,
priority
=
6
5
)
@Test
(
description
=
"北京访客D查询是否中奖"
,
priority
=
6
8
)
public
void
北京访客
D
查询是否中奖
()
{
visitorAuth4
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -914,7 +936,7 @@ public class Lottery implements Authorization {
}
//昵称:周成
@Test
(
description
=
"杭州访客E是否中奖"
,
priority
=
6
6
)
@Test
(
description
=
"杭州访客E是否中奖"
,
priority
=
6
9
)
public
void
杭州访客
E
是否中奖
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -934,7 +956,7 @@ public class Lottery implements Authorization {
}
//昵称:新强
@Test
(
description
=
"厦门访客F是否中奖"
,
priority
=
67
)
@Test
(
description
=
"厦门访客F是否中奖"
,
priority
=
70
)
public
void
厦门访客
F
是否中奖
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -953,7 +975,7 @@ public class Lottery implements Authorization {
}
//黑名单用户过滤
@Test
(
description
=
"黑名单访客G是否中奖"
,
priority
=
68
)
@Test
(
description
=
"黑名单访客G是否中奖"
,
priority
=
71
)
public
void
黑名单访客
G
是否中奖
()
{
visitorAuth7
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -974,7 +996,7 @@ public class Lottery implements Authorization {
//第三轮企业指定中奖
@Test
(
description
=
"开始第三轮抽奖"
,
priority
=
69
)
@Test
(
description
=
"开始第三轮抽奖"
,
priority
=
72
)
public
void
开始第三轮抽奖
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -987,7 +1009,7 @@ public class Lottery implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
startParam
,
BasicConfig
.
ANCHOR_start
,
"开启第三轮抽奖失败"
,
startRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询第三轮正在抽奖的福利"
,
priority
=
7
0
)
@Test
(
description
=
"查询第三轮正在抽奖的福利"
,
priority
=
7
3
)
public
void
查询第三轮正在抽奖的福利
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1001,7 +1023,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"查询第三轮是否可以结束抽奖状态"
,
priority
=
7
1
)
@Test
(
description
=
"查询第三轮是否可以结束抽奖状态"
,
priority
=
7
4
)
public
void
查询第三轮是否可以结束抽奖状态
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1014,7 +1036,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
statusParam
,
BasicConfig
.
ANCHOR_status
,
"抽奖状态查询失败"
,
statusRes
.
body
().
asString
()));
}
@Test
(
description
=
"结束第三轮抽奖"
,
priority
=
7
2
)
@Test
(
description
=
"结束第三轮抽奖"
,
priority
=
7
5
)
public
void
结束第三轮抽奖
()
{
adminAuth
();
Map
<
String
,
Object
>
endParam
=
new
HashMap
<>();
...
...
@@ -1026,7 +1048,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
endParam
,
BasicConfig
.
ANCHOR_end
,
"结束第三轮抽奖失败"
,
endRes
.
body
().
asString
()));
}
@Test
(
description
=
"企业指定访客E是否中奖"
,
priority
=
7
3
)
@Test
(
description
=
"企业指定访客E是否中奖"
,
priority
=
7
6
)
public
void
企业指定访客
E
是否中奖
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1047,7 +1069,7 @@ public class Lottery implements Authorization {
//第4轮团队指定份数
@Test
(
description
=
"不在指定团队访客H到场"
,
priority
=
7
4
)
@Test
(
description
=
"不在指定团队访客H到场"
,
priority
=
7
7
)
public
void
访客
H
到场
()
{
visitorAuth9
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -1058,7 +1080,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客H关注直播间"
,
priority
=
7
5
)
@Test
(
description
=
"访客H关注直播间"
,
priority
=
7
8
)
public
void
访客
H
关注直播间
()
{
visitorAuth9
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -1069,7 +1091,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客H抽奖码数量"
,
priority
=
7
6
)
@Test
(
description
=
"访客H抽奖码数量"
,
priority
=
7
9
)
public
void
访客
H
抽奖码数量
()
{
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1083,7 +1105,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"不在指定团队访客I到场"
,
priority
=
77
)
@Test
(
description
=
"不在指定团队访客I到场"
,
priority
=
80
)
public
void
访客
I
到场
()
{
visitorAuth8
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -1094,7 +1116,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客I关注直播间"
,
priority
=
78
)
@Test
(
description
=
"访客I关注直播间"
,
priority
=
81
)
public
void
访客
I
关注直播间
()
{
visitorAuth8
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -1105,7 +1127,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客I抽奖码数量"
,
priority
=
79
)
@Test
(
description
=
"访客I抽奖码数量"
,
priority
=
82
)
public
void
访客
I
抽奖码数量
()
{
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1119,7 +1141,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"指定团队访客J到场"
,
priority
=
8
0
)
@Test
(
description
=
"指定团队访客J到场"
,
priority
=
8
3
)
public
void
访客
J
到场
()
{
visitorAuth10
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
...
...
@@ -1130,7 +1152,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客J关注直播间"
,
priority
=
8
1
)
@Test
(
description
=
"访客J关注直播间"
,
priority
=
8
4
)
public
void
访客
J
关注直播间
()
{
visitorAuth10
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
...
@@ -1141,7 +1163,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客J抽奖码数量"
,
priority
=
8
2
)
@Test
(
description
=
"访客J抽奖码数量"
,
priority
=
8
5
)
public
void
访客
J
抽奖码数量
()
{
visitorAuth10
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1154,7 +1176,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"开始第四轮抽奖"
,
priority
=
8
3
)
@Test
(
description
=
"开始第四轮抽奖"
,
priority
=
8
6
)
public
void
开始第四轮抽奖
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1167,7 +1189,7 @@ public class Lottery implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
startParam
,
BasicConfig
.
ANCHOR_start
,
"开启第四轮抽奖失败"
,
startRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询第四轮正在抽奖的福利"
,
priority
=
8
4
)
@Test
(
description
=
"查询第四轮正在抽奖的福利"
,
priority
=
8
7
)
public
void
查询第四轮正在抽奖的福利
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1181,7 +1203,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"查询第四轮是否可以结束抽奖状态"
,
priority
=
8
5
)
@Test
(
description
=
"查询第四轮是否可以结束抽奖状态"
,
priority
=
8
8
)
public
void
查询第四轮是否可以结束抽奖状态
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1194,7 +1216,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
statusParam
,
BasicConfig
.
ANCHOR_status
,
"抽奖状态查询失败"
,
statusRes
.
body
().
asString
()));
}
@Test
(
description
=
"结束第四轮抽奖"
,
priority
=
8
6
)
@Test
(
description
=
"结束第四轮抽奖"
,
priority
=
8
9
)
public
void
结束第四轮抽奖
()
{
adminAuth
();
Map
<
String
,
Object
>
endParam
=
new
HashMap
<>();
...
...
@@ -1208,7 +1230,7 @@ public class Lottery implements Authorization {
//企业已指定不能再中奖
@Test
(
description
=
"团队指定访客E是否中奖"
,
priority
=
87
)
@Test
(
description
=
"团队指定访客E是否中奖"
,
priority
=
90
)
public
void
团队指定访客
E
是否中奖
()
{
visitorAuth5
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1226,7 +1248,7 @@ public class Lottery implements Authorization {
}
//团队分配制定中奖
@Test
(
description
=
"团队指定访客是否中奖"
,
priority
=
88
)
@Test
(
description
=
"团队指定访客是否中奖"
,
priority
=
91
)
public
void
团队指定访客是否中奖
()
{
ThreadSleepUtils
.
sleep
(
3000
);
//构建参数
...
...
@@ -1261,7 +1283,7 @@ public class Lottery implements Authorization {
//不在公司指定区域内的用户
@Test
(
description
=
"团队指定访客F是否中奖"
,
priority
=
89
)
@Test
(
description
=
"团队指定访客F是否中奖"
,
priority
=
92
)
public
void
团队指定访客
F
是否中奖
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1280,7 +1302,7 @@ public class Lottery implements Authorization {
@Test
(
description
=
"不在团队指定访客I是否中奖"
,
priority
=
9
0
)
@Test
(
description
=
"不在团队指定访客I是否中奖"
,
priority
=
9
3
)
public
void
不在团队指定访客
I
是否中奖
()
{
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1298,7 +1320,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"开始第五轮抽奖"
,
priority
=
9
1
)
@Test
(
description
=
"开始第五轮抽奖"
,
priority
=
9
4
)
public
void
开始第五轮抽奖
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1311,7 +1333,7 @@ public class Lottery implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
startParam
,
BasicConfig
.
ANCHOR_start
,
"开启第五轮抽奖失败"
,
startRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询第五轮正在抽奖的福利"
,
priority
=
9
2
)
@Test
(
description
=
"查询第五轮正在抽奖的福利"
,
priority
=
9
5
)
public
void
查询第五轮正在抽奖的福利
()
{
visitorAuth6
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -1325,7 +1347,7 @@ public class Lottery implements Authorization {
}
@Test
(
description
=
"查询第五轮是否可以结束抽奖状态"
,
priority
=
9
3
)
@Test
(
description
=
"查询第五轮是否可以结束抽奖状态"
,
priority
=
9
6
)
public
void
查询第五轮是否可以结束抽奖状态
()
{
adminAuth
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -1338,7 +1360,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
statusParam
,
BasicConfig
.
ANCHOR_status
,
"抽奖状态查询失败"
,
statusRes
.
body
().
asString
()));
}
@Test
(
description
=
"结束第五轮抽奖"
,
priority
=
9
4
)
@Test
(
description
=
"结束第五轮抽奖"
,
priority
=
9
7
)
public
void
结束第五轮抽奖
()
{
adminAuth
();
Map
<
String
,
Object
>
endParam
=
new
HashMap
<>();
...
...
@@ -1352,7 +1374,7 @@ public class Lottery implements Authorization {
//团队分配指定中奖
@Test
(
description
=
"普通抽奖轮次访客是否中奖"
,
priority
=
9
5
)
@Test
(
description
=
"普通抽奖轮次访客是否中奖"
,
priority
=
9
8
)
public
void
普通抽奖轮次访客是否中奖
()
{
ThreadSleepUtils
.
sleep
(
3000
);
//构建参数
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
ee1ba3cb
...
...
@@ -99,10 +99,12 @@ public class BasicConfig {
public
static
final
String
MANAGER_redConfDetail
=
MANAGER_HOST
+
"/kjy/manager/live/fortune/red/confDetail"
;
public
static
final
String
MANAGER_redSwitch
=
MANAGER_HOST
+
"/kjy/manager/live/fortune/red/status/switch"
;
public
static
final
String
MANAGER_insertOrUpdate
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/insertOrUpdate"
;
public
static
final
String
MANAGER_preLayer
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/preLayer"
;
public
static
final
String
MANAGER_openPreLayer
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/openPreLayer"
;
public
static
final
String
MOBILE_receiveRecord
=
MOBILE_HOST
+
"/kjy/live/fortune/receiver/receiveRecord"
;
public
static
final
String
MOBILE_receiverOpen
=
MOBILE_HOST
+
"/kjy/live/fortune/receiver/open"
;
public
static
final
String
MOBILE_joinRecord
=
MOBILE_HOST
+
"/kjy/live/fortune/receiver/joinRecord"
;
// *************** 闯关答题 ***************
public
static
final
String
MANAGER_addOrUpdateQues
=
MANAGER_HOST
+
"/kjy/manager/pass/ques/addOrUpdateQues"
;
...
...
@@ -176,20 +178,25 @@ public class BasicConfig {
public
static
final
String
ANCHOR_listLiveFreeReward
=
MOBILE_HOST
+
"/kjy/live/lottery/listLiveFreeReward"
;
public
static
final
String
ANCHOR_receive
=
MOBILE_HOST
+
"/kjy/live/user/lottery/receive"
;
// *************** 翻牌红包 ***************
public
static
final
String
MANAGER_card
=
MANAGER_HOST
+
"/kjy/manager/live/flip/card/save"
;
public
static
final
String
MANAGER_switch
=
MANAGER_HOST
+
"/kjy/manager/live/flip/card/status/switch"
;
public
static
final
String
MANAGER_cardDetail
=
MANAGER_HOST
+
"/kjy/manager/live/flip/card/detail"
;
public
static
final
String
MOBILE_status
=
MOBILE_HOST
+
"/kjy/live/flip/card/status"
;
public
static
final
String
MOBILE_cardDetail
=
MOBILE_HOST
+
"/kjy/live/flip/card/detail"
;
public
static
final
String
MOBILE_userInfo
=
MOBILE_HOST
+
"/kjy/live/flip/card/userInfo"
;
public
static
final
String
MOBILE_cardOpen
=
MOBILE_HOST
+
"/kjy/live/flip/card/open"
;
public
static
final
String
MOBILE_participateInfo
=
MOBILE_HOST
+
"/kjy/live/flip/card/participateInfo"
;
public
static
final
String
MOBILE_withdrawal
=
MOBILE_HOST
+
"/kjy/live/flip/card/withdrawal"
;
public
static
final
String
MOBILE_withdrawalResult
=
MOBILE_HOST
+
"/kjy/live/flip/card/withdrawalResult"
;
public
static
final
String
MOBILE_withdrawalRecord
=
MOBILE_HOST
+
"/kjy/live/flip/card/withdrawalRecord"
;
// *************** 翻牌集字红包 ***************
public
static
final
String
MANAGER_flipWord
=
MANAGER_HOST
+
"/kjy/manager/flip/word/saveOrUpdate"
;
public
static
final
String
MANAGER_wordSwitchStatus
=
MANAGER_HOST
+
"/kjy/manager/flip/word/switchStatus"
;
public
static
final
String
MANAGER_wordDetail
=
MANAGER_HOST
+
"/kjy/manager/flip/word/detail"
;
public
static
final
String
MOBILE_status
=
MOBILE_HOST
+
"/kjy/live/flip/word/status"
;
public
static
final
String
MOBILE_wordConf
=
MOBILE_HOST
+
"/kjy/live/flip/word/conf"
;
public
static
final
String
MOBILE_checkIn
=
MOBILE_HOST
+
"/kjy/live/flip/word/checkIn"
;
public
static
final
String
MOBILE_history
=
MOBILE_HOST
+
"/kjy/live/flip/word/user/history"
;
public
static
final
String
MOBILE_finishStatus
=
MOBILE_HOST
+
"/kjy/live/flip/word/user/finishStatus"
;
public
static
final
String
MOBILE_redOpen
=
MOBILE_HOST
+
"/kjy/live/flip/word/red/open"
;
public
static
final
String
MOBILE_redOpenState
=
MOBILE_HOST
+
"/kjy/live/flip/word/red/open/state"
;
public
static
final
String
MOBILE_abort
=
MOBILE_HOST
+
"/kjy/live/flip/word/red/abort"
;
public
static
final
String
MOBILE_appointment
=
MOBILE_HOST
+
"/kjy/live/user/appointment"
;
public
static
final
String
MOBILE_tasks
=
MOBILE_HOST
+
"/kjy/live/flip/word/user/tasks"
;
public
static
final
String
MOBILE_record
=
MOBILE_HOST
+
"/kjy/live/flip/word/user/record"
;
public
static
final
String
MOBILE_turn
=
MOBILE_HOST
+
"/kjy/live/flip/word/turn"
;
public
static
final
String
MOBILE_turnState
=
MOBILE_HOST
+
"/kjy/live/flip/word/turn/state"
;
// *************** 直播间过渡视频 ***************
public
static
final
String
MANAGER_confCaveOrUpdate
=
MANAGER_HOST
+
"/kjy/manager/live/trans/video/conf/saveOrUpdate"
;
public
static
final
String
MANAGER_videoSwitch
=
MANAGER_HOST
+
"/kjy/manager/live/trans/video/conf/status/switch"
;
...
...
@@ -216,6 +223,10 @@ public class BasicConfig {
public
static
final
String
MOBILE_open
=
MOBILE_HOST
+
"/clue/guess/number/red/open"
;
public
static
final
String
MOBILE_result
=
MOBILE_HOST
+
"/clue/guess/number/red/result"
;
public
static
final
String
MANAGER_encode
=
MANAGER_HOST
+
"/kjy/manager/testUser/encode"
;
// *************** 宝箱裂变 ***************
public
static
final
String
MANAGER_getList4Admin
=
MANAGER_HOST
+
"/kjy/manager/welfare/pre/conf/getList4Admin"
;
public
static
final
String
MANAGER_saveTreasureConf
=
MANAGER_HOST
+
"/kjy/manager/live/treasure/saveTreasureConf"
;
...
...
@@ -290,7 +301,7 @@ public class BasicConfig {
public
static
final
String
ANCHOR_status
=
MOBILE_HOST
+
"/conf/live/lottery/status"
;
public
static
final
String
ANCHOR_end
=
MOBILE_HOST
+
"/conf/live/lottery/end"
;
public
static
final
String
ANCHOR_luckDetail
=
MOBILE_HOST
+
"/clue/lottery/task/luckDetail"
;
public
static
final
String
ANCHOR_
inviteDrawDetail
=
MOBILE_HOST
+
"/clue/lottery/task/inviteDrawDetail
"
;
public
static
final
String
ANCHOR_
getRed
=
MOBILE_HOST
+
"/kjy/live/fortune/sharer/getRed
"
;
// *************** 访客端 ***************
public
static
final
String
USER_SUBSCRIBE
=
MOBILE_HOST
+
"/kjy/live/user/appointment/subscribe"
;
...
...
src/test/wechatTestNG.xml
View file @
ee1ba3cb
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"集客助手"
verbose=
"1"
thread-count=
"3"
>
<!-- <test preserve-order="true" name="首页" >-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Home"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="新手任务">-->
<!-- <classes>-->
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"支付"
>
<classes>
<class
name=
"com.kjj.cases.basics.Pay"
/>
...
...
@@ -43,12 +34,12 @@
</test>
<test
preserve-order=
"true"
name=
"我的名片"
>
<classes>
<class
name=
"com.kjj.cases.
basics
.card.PersonCard"
/>
<class
name=
"com.kjj.cases.
assistant
.card.PersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"文章中个人名片"
>
<classes>
<class
name=
"com.kjj.cases.
basics
.card.ArticalPersonCard"
/>
<class
name=
"com.kjj.cases.
assistant
.card.ArticalPersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"种草素材"
>
...
...
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