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
a8b48fde
Commit
a8b48fde
authored
Sep 11, 2021
by
xiamengchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/20210907-xmc
# Conflicts: # src/test/liveTestNG.xml
parents
8b758343
de46e8bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
425 additions
and
277 deletions
+425
-277
FlipCard.java
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
+90
-24
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+30
-169
SimpleLiveConfig.java
.../java/com/kjj/cases/live/liveConfig/SimpleLiveConfig.java
+151
-0
DesignatedWinner.java
...est/java/com/kjj/cases/live/lottery/DesignatedWinner.java
+0
-6
Treasure.java
src/test/java/com/kjj/cases/live/treasure/Treasure.java
+154
-78
No files found.
src/test/java/com/kjj/cases/live/flipCard/FlipCard.java
View file @
a8b48fde
...
@@ -6,16 +6,84 @@ import com.kjj.constants.LiveConstants;
...
@@ -6,16 +6,84 @@ import com.kjj.constants.LiveConstants;
import
com.kjj.utils.ThreadSleepUtils
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.util.*
;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
public
class
FlipCard
implements
Authorization
{
public
class
FlipCard
implements
Authorization
{
public
String
redConfId
;
public
String
redConfId
;
public
String
shareSign
;
public
String
shareSign
;
@Test
(
description
=
"查询翻牌集字配置状态"
,
priority
=
1
)
@BeforeClass
public
void
setUp
()
{
ssoLogin
();
}
/**
* 翻牌集字活动配置
*/
@Test
(
description
=
"保存翻牌配置"
,
priority
=
1
)
public
void
保存翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"amount"
,
1000
);
Params
.
put
(
"helpNum"
,
1
);
Params
.
put
(
"num"
,
2
);
Params
.
put
(
"showAmount"
,
1000
);
Params
.
put
(
"showMaxAmount"
,
1000
);
Params
.
put
(
"poolType"
,
1
);
Params
.
put
(
"openSceneType"
,
1
);
Params
.
put
(
"freeNum"
,
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_flipWord
,
"保存翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播翻牌配置详情"
,
priority
=
2
)
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_wordDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordDetail
,
"查看直播翻牌配置详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启翻牌配置"
,
priority
=
3
)
public
void
开启翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"confStatus"
,
2
);
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_wordSwitchStatus
,
"开启翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播配置"
,
priority
=
4
)
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
flipWordConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfBuildStatus"
);
System
.
out
.
println
(
flipWordConfBuildStatus
);
Assert
.
assertTrue
(
flipWordConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置翻牌"
,
response
.
body
().
asString
()));
boolean
flipWordConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfStatus"
);
System
.
out
.
println
(
flipWordConfStatus
);
Assert
.
assertTrue
(
flipWordConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启翻牌"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询翻牌集字配置状态"
,
priority
=
5
)
public
void
查询翻牌集字配置状态
()
{
public
void
查询翻牌集字配置状态
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -27,7 +95,7 @@ public class FlipCard implements Authorization {
...
@@ -27,7 +95,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"查询翻牌集字配置详情"
,
priority
=
2
)
@Test
(
description
=
"查询翻牌集字配置详情"
,
priority
=
6
)
public
void
查询翻牌集字配置详情
()
{
public
void
查询翻牌集字配置详情
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -41,7 +109,7 @@ public class FlipCard implements Authorization {
...
@@ -41,7 +109,7 @@ public class FlipCard implements Authorization {
//用户任务完成
//用户任务完成
@Test
(
description
=
"访客H分享直播间"
,
priority
=
3
)
@Test
(
description
=
"访客H分享直播间"
,
priority
=
7
)
public
void
访客
H
分享直播间
()
{
public
void
访客
H
分享直播间
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -55,7 +123,7 @@ public class FlipCard implements Authorization {
...
@@ -55,7 +123,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
4
)
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
8
)
public
void
根据分享类型获取分享内容
()
{
public
void
根据分享类型获取分享内容
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -68,7 +136,7 @@ public class FlipCard implements Authorization {
...
@@ -68,7 +136,7 @@ public class FlipCard implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_helpInfo
,
"根据分享类型获取分享内容"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_helpInfo
,
"根据分享类型获取分享内容"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客邀请关系绑定"
,
priority
=
5
)
@Test
(
description
=
"访客邀请关系绑定"
,
priority
=
9
)
public
void
访客邀请关系绑定
()
{
public
void
访客邀请关系绑定
()
{
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -89,7 +157,7 @@ public class FlipCard implements Authorization {
...
@@ -89,7 +157,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"获取绑定结果和绑定凭证"
,
priority
=
6
)
@Test
(
description
=
"获取绑定结果和绑定凭证"
,
priority
=
10
)
public
void
获取绑定结果和绑定凭证
()
{
public
void
获取绑定结果和绑定凭证
()
{
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -110,7 +178,7 @@ public class FlipCard implements Authorization {
...
@@ -110,7 +178,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"已登录查询分享人头像昵称"
,
priority
=
7
)
@Test
(
description
=
"已登录查询分享人头像昵称"
,
priority
=
11
)
public
void
已登录查询分享人头像昵称
()
{
public
void
已登录查询分享人头像昵称
()
{
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -135,7 +203,7 @@ public class FlipCard implements Authorization {
...
@@ -135,7 +203,7 @@ public class FlipCard implements Authorization {
@Test
(
description
=
"访客H获得助力"
,
priority
=
8
)
@Test
(
description
=
"访客H获得助力"
,
priority
=
12
)
public
void
访客
H
获得助力
()
{
public
void
访客
H
获得助力
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
visitorAuth22
();
visitorAuth22
();
...
@@ -166,7 +234,7 @@ public class FlipCard implements Authorization {
...
@@ -166,7 +234,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"访客S分享直播间"
,
priority
=
9
)
@Test
(
description
=
"访客S分享直播间"
,
priority
=
13
)
public
void
访客
S
分享直播间
()
{
public
void
访客
S
分享直播间
()
{
visitorAuth22
();
visitorAuth22
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -180,7 +248,7 @@ public class FlipCard implements Authorization {
...
@@ -180,7 +248,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"访客S获得助力"
,
priority
=
1
0
)
@Test
(
description
=
"访客S获得助力"
,
priority
=
1
4
)
public
void
访客
S
获得助力
()
{
public
void
访客
S
获得助力
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -204,7 +272,7 @@ public class FlipCard implements Authorization {
...
@@ -204,7 +272,7 @@ public class FlipCard implements Authorization {
}
}
//签到
//签到
@Test
(
description
=
"用户签到"
,
priority
=
1
1
)
@Test
(
description
=
"用户签到"
,
priority
=
1
5
)
public
void
用户签到
()
{
public
void
用户签到
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -227,7 +295,7 @@ public class FlipCard implements Authorization {
...
@@ -227,7 +295,7 @@ public class FlipCard implements Authorization {
//预约
//预约
@Test
(
description
=
"翻牌集字_预约"
,
priority
=
1
2
)
@Test
(
description
=
"翻牌集字_预约"
,
priority
=
1
6
)
public
void
翻牌集字
_
预约
()
{
public
void
翻牌集字
_
预约
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -252,7 +320,7 @@ public class FlipCard implements Authorization {
...
@@ -252,7 +320,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"用户完成任务情况"
,
priority
=
1
3
)
@Test
(
description
=
"用户完成任务情况"
,
priority
=
1
7
)
public
void
用户完成任务情况
()
{
public
void
用户完成任务情况
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -281,7 +349,7 @@ public class FlipCard implements Authorization {
...
@@ -281,7 +349,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"查询用户翻牌剩余次数"
,
priority
=
1
4
)
@Test
(
description
=
"查询用户翻牌剩余次数"
,
priority
=
1
8
)
public
void
查询用户翻牌剩余次数
()
{
public
void
查询用户翻牌剩余次数
()
{
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -303,7 +371,7 @@ public class FlipCard implements Authorization {
...
@@ -303,7 +371,7 @@ public class FlipCard implements Authorization {
@Test
(
description
=
"翻牌"
,
priority
=
1
5
)
@Test
(
description
=
"翻牌"
,
priority
=
1
9
)
public
void
翻牌
()
{
public
void
翻牌
()
{
for
(
int
i
=
0
;
i
<
6
;
i
++){
for
(
int
i
=
0
;
i
<
6
;
i
++){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -348,7 +416,7 @@ public class FlipCard implements Authorization {
...
@@ -348,7 +416,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"用户参与翻牌详情"
,
priority
=
16
)
@Test
(
description
=
"用户参与翻牌详情"
,
priority
=
20
)
public
void
用户参与翻牌详情
()
{
public
void
用户参与翻牌详情
()
{
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -373,7 +441,7 @@ public class FlipCard implements Authorization {
...
@@ -373,7 +441,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"翻牌集字领取历史记录"
,
priority
=
17
)
@Test
(
description
=
"翻牌集字领取历史记录"
,
priority
=
21
)
public
void
翻牌集字领取历史记录
()
{
public
void
翻牌集字领取历史记录
()
{
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -397,7 +465,7 @@ public class FlipCard implements Authorization {
...
@@ -397,7 +465,7 @@ public class FlipCard implements Authorization {
//开红包
//开红包
@Test
(
description
=
"用户开红包资格查询"
,
priority
=
18
)
@Test
(
description
=
"用户开红包资格查询"
,
priority
=
22
)
public
void
用户开红包资格查询
()
{
public
void
用户开红包资格查询
()
{
ThreadSleepUtils
.
sleep
(
5000
);
ThreadSleepUtils
.
sleep
(
5000
);
...
@@ -417,7 +485,7 @@ public class FlipCard implements Authorization {
...
@@ -417,7 +485,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"放弃开红包"
,
priority
=
19
)
@Test
(
description
=
"放弃开红包"
,
priority
=
23
)
public
void
放弃开红包
()
{
public
void
放弃开红包
()
{
visitorAuth22
();
visitorAuth22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -431,7 +499,7 @@ public class FlipCard implements Authorization {
...
@@ -431,7 +499,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"开红包"
,
priority
=
2
0
)
@Test
(
description
=
"开红包"
,
priority
=
2
4
)
public
void
开红包
()
{
public
void
开红包
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -443,7 +511,7 @@ public class FlipCard implements Authorization {
...
@@ -443,7 +511,7 @@ public class FlipCard implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpen
,
"开红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpen
,
"开红包失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户开红包状态查询"
,
priority
=
2
1
)
@Test
(
description
=
"用户开红包状态查询"
,
priority
=
2
5
)
public
void
用户开红包状态查询
()
{
public
void
用户开红包状态查询
()
{
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -466,7 +534,7 @@ public class FlipCard implements Authorization {
...
@@ -466,7 +534,7 @@ public class FlipCard implements Authorization {
}
}
@Test
(
description
=
"开红包结果"
,
priority
=
2
2
)
@Test
(
description
=
"开红包结果"
,
priority
=
2
6
)
public
void
开红包结果
()
{
public
void
开红包结果
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -480,6 +548,4 @@ public class FlipCard implements Authorization {
...
@@ -480,6 +548,4 @@ public class FlipCard implements Authorization {
Assert
.
assertTrue
(
redAmount
==
1000
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpenState
,
"红包金额不对"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
redAmount
==
1000
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_redOpenState
,
"红包金额不对"
,
response
.
body
().
asString
()));
}
}
}
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
a8b48fde
package
com
.
kjj
.
cases
.
live
.
liveConfig
;
package
com
.
kjj
.
cases
.
live
.
liveConfig
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.bean.answer.AddReward
;
import
com.kjj.bean.answer.AddReward
;
...
@@ -7,21 +8,19 @@ import com.kjj.bean.answer.RewardList;
...
@@ -7,21 +8,19 @@ import com.kjj.bean.answer.RewardList;
import
com.kjj.bean.issue.Dialogue
;
import
com.kjj.bean.issue.Dialogue
;
import
com.kjj.bean.lottery.ConfIdList
;
import
com.kjj.bean.lottery.ConfIdList
;
import
com.kjj.bean.manager.*
;
import
com.kjj.bean.manager.*
;
import
com.kjj.bean.secondKill.SecondKillList
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.IdMakeUtil
;
import
com.kjj.utils.IdMakeUtil
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.ThreadSleepUtils
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.bson.json.JsonParseException
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.util.*
;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
...
@@ -32,6 +31,7 @@ public class SaveLive implements Authorization {
...
@@ -32,6 +31,7 @@ public class SaveLive implements Authorization {
public
long
welfareConfId
;
public
long
welfareConfId
;
private
Integer
taskId
;
private
Integer
taskId
;
public
List
<
RedList
>
redId
;
public
List
<
RedList
>
redId
;
public
List
<
WelfareList
>
id
;
//奖品列表id
@BeforeClass
@BeforeClass
public
void
setUp
()
{
public
void
setUp
()
{
...
@@ -422,12 +422,6 @@ public class SaveLive implements Authorization {
...
@@ -422,12 +422,6 @@ public class SaveLive implements Authorization {
}
}
/**
* 裂变宝箱配置
*/
public
List
<
WelfareList
>
id
;
public
JSONObject
treasureConf
;
@Test
(
description
=
"查询配置奖品列表"
,
priority
=
20
)
@Test
(
description
=
"查询配置奖品列表"
,
priority
=
20
)
public
void
查询配置奖品列表
()
{
public
void
查询配置奖品列表
()
{
Map
<
String
,
Object
>
getListParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
getListParam
=
new
HashMap
<>();
...
@@ -443,75 +437,6 @@ public class SaveLive implements Authorization {
...
@@ -443,75 +437,6 @@ public class SaveLive implements Authorization {
Assert
.
assertNotNull
(
list
,
network
.
message
(
getListParam
,
BasicConfig
.
MANAGER_getList4Admin
,
"查询奖品列表失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
list
,
network
.
message
(
getListParam
,
BasicConfig
.
MANAGER_getList4Admin
,
"查询奖品列表失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"宝箱实物中奖限制1次"
,
priority
=
21
)
public
void
宝箱实物中奖限制
1
次
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"openCondition"
,
1
);
saveParam
.
put
(
"openNum"
,
10
);
TreasureAward
treasureAward
=
new
TreasureAward
();
treasureAward
.
setWelfareId
(
this
.
id
.
get
(
0
).
getId
());
treasureAward
.
setAwardName
(
"宝箱锦鲤"
);
treasureAward
.
setTreasureProbability
(
10000
);
treasureAward
.
setTreasureType
(
3
);
treasureAward
.
setRuleType
(
1
);
treasureAward
.
setTotalNum
(
3
);
treasureAward
.
setWinLimitCount
(
1
);
saveParam
.
put
(
"treasureAward"
,
treasureAward
);
TreasureRed
treasureRed
=
new
TreasureRed
();
treasureRed
.
setRedTotalAmount
(
100
);
treasureRed
.
setRuleType
(
2
);
treasureRed
.
setTotalNum
(
2
);
treasureRed
.
setTreasureProbability
(
0
);
treasureRed
.
setTreasureType
(
2
);
treasureRed
.
setWinLimitCount
(
1
);
treasureRed
.
setShowAmount
(
200
);
saveParam
.
put
(
"treasureRed"
,
treasureRed
);
TreasureCode
treasureCode
=
new
TreasureCode
();
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setMaxNum
(
3
);
treasureCode
.
setRuleType
(
2
);
treasureCode
.
setTreasureProbability
(
0
);
treasureCode
.
setTreasureType
(
1
);
saveParam
.
put
(
"treasureCode"
,
treasureCode
);
saveParam
.
put
(
"treasurePeriod"
,
3
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveTreasureConf
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MANAGER_saveTreasureConf
,
"新增宝箱裂变配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询宝箱配置详情"
,
priority
=
22
)
public
void
查询宝箱配置详情
()
{
Map
<
String
,
Object
>
confDetailParam
=
new
HashMap
<>();
confDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
);
System
.
out
.
println
(
response
);
Integer
openCondition
=
response
.
jsonPath
().
getInt
(
"data.openCondition"
);
System
.
out
.
println
(
openCondition
);
Assert
.
assertTrue
(
openCondition
>
0
,
network
.
message
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
,
"查询宝箱配置详情失败"
,
response
.
body
().
asString
()));
treasureConf
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
response
.
jsonPath
().
get
(
"data"
)));
}
@Test
(
description
=
"开启宝箱配置"
,
priority
=
23
)
public
void
开启宝箱配置
()
{
Map
<
String
,
Object
>
switchStatusParam
=
new
HashMap
<>();
switchStatusParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
switchStatusParam
.
put
(
"confStatus"
,
1
);
Response
response
=
network
.
postResponse
(
switchStatusParam
,
BasicConfig
.
MANAGER_switchStatus
);
boolean
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
switchStatusParam
,
BasicConfig
.
MANAGER_switchStatus
,
"开启宝箱失败"
,
response
.
body
().
asString
()));
}
/**
/**
* 时长宝箱配置
* 时长宝箱配置
*/
*/
...
@@ -549,7 +474,6 @@ public class SaveLive implements Authorization {
...
@@ -549,7 +474,6 @@ public class SaveLive implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_update1
,
"停留时长1分钟固定抽奖码"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_update1
,
"停留时长1分钟固定抽奖码"
,
response
.
body
().
asString
()));
}
}
...
@@ -1417,66 +1341,39 @@ public class SaveLive implements Authorization {
...
@@ -1417,66 +1341,39 @@ public class SaveLive implements Authorization {
}
}
/**
/**
*
翻牌集字活动
配置
*
准客户承诺话术
配置
*/
*/
@Test
(
description
=
"保存客户承诺话术配置"
,
priority
=
69
)
@Test
(
description
=
"保存翻牌配置"
,
priority
=
69
)
public
void
保存客户承诺话术配置
(){
public
void
保存翻牌配置
()
{
ssoLogin
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"amount"
,
1000
);
Params
.
put
(
"helpNum"
,
1
);
Params
.
put
(
"num"
,
2
);
Params
.
put
(
"showAmount"
,
1000
);
Params
.
put
(
"showMaxAmount"
,
1000
);
Params
.
put
(
"poolType"
,
1
);
Params
.
put
(
"openSceneType"
,
1
);
Params
.
put
(
"freeNum"
,
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_flipWord
,
"保存翻牌配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看直播翻牌配置详情"
,
priority
=
70
)
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_wordDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordDetail
,
"查看直播翻牌配置详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启翻牌配置"
,
priority
=
71
)
public
void
开启翻牌配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"confStatus"
,
2
);
ArrayList
<
Dialogue
>
dialogues
=
new
ArrayList
<>();
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
);
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"一度问题1"
,
"一度问题2"
,
"一度问题3"
)),
"一度代理人结束语"
,
"一度代理人欢迎语"
,
"一度承诺标题"
,
"一度承诺描述"
,
"一度承诺按钮文案"
,
"一度行动承诺"
,
1
));
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
0
));
System
.
out
.
println
(
data
);
Params
.
put
(
"dialogues"
,
dialogues
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_wordSwitchStatus
,
"开启翻牌配置失败"
,
response
.
body
().
asString
()));
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
);
System
.
out
.
println
(
Params
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
,
"保存客户承诺话术配置失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看
直播配置"
,
priority
=
72
)
@Test
(
description
=
"查看
客户承诺话术配置"
,
priority
=
70
)
public
void
查看
直播
配置
()
{
public
void
查看
客户承诺话术
配置
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_findDialogue
);
boolean
flipWordConfBuildStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfBuildStatus"
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
flipWordConfBuildStatus
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
flipWordConfBuildStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置翻牌"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"查看客户承诺话术为空"
,
response
.
body
().
asString
()));
boolean
flipWordConfStatus
=
response
.
jsonPath
().
getBoolean
(
"data.flipWordConfStatus"
);
System
.
out
.
println
(
flipWordConfStatus
);
Assert
.
assertTrue
(
flipWordConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未开启翻牌"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"客户承诺话术错误"
,
response
.
body
().
asString
()));
String
promiseTitle1
=
response
.
jsonPath
().
getString
(
"data.find{it.inviteType == 1}.promiseTitle"
);
String
promiseTitle2
=
response
.
jsonPath
().
getString
(
"data.find{it.inviteType == 0}.promiseTitle"
);
Assert
.
assertEquals
(
promiseTitle1
,
"一度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"一度客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promiseTitle2
,
"二度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"二度客户承诺话术错误"
,
response
.
body
().
asString
()));
}
}
/**
/**
...
@@ -2111,7 +2008,7 @@ public class SaveLive implements Authorization {
...
@@ -2111,7 +2008,7 @@ public class SaveLive implements Authorization {
Assert
.
assertTrue
(
hasConfAuthPopup
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置预告页弹窗"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
hasConfAuthPopup
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置预告页弹窗"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"授权弹窗配置_直播抽奖"
,
priority
=
114
)
@Test
(
description
=
"授权弹窗配置_直播抽奖"
,
priority
=
114
)
public
void
授权弹窗配置
_
直播抽奖
()
{
public
void
授权弹窗配置
_
直播抽奖
()
{
...
@@ -2388,40 +2285,4 @@ public class SaveLive implements Authorization {
...
@@ -2388,40 +2285,4 @@ public class SaveLive implements Authorization {
Assert
.
assertTrue
(
fissionLotteryConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置亲友抽奖券"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
fissionLotteryConfStatus
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_getConfDetail
,
"未配置亲友抽奖券"
,
response
.
body
().
asString
()));
}
}
/**
* 准客户承诺话术配置
*/
@Test
(
description
=
"保存客户承诺话术配置"
,
priority
=
128
)
public
void
保存客户承诺话术配置
(){
ssoLogin
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
ArrayList
<
Dialogue
>
dialogues
=
new
ArrayList
<>();
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"一度问题1"
,
"一度问题2"
,
"一度问题3"
)),
"一度代理人结束语"
,
"一度代理人欢迎语"
,
"一度承诺标题"
,
"一度承诺描述"
,
"一度承诺按钮文案"
,
"一度行动承诺"
,
1
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
0
));
Params
.
put
(
"dialogues"
,
dialogues
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
);
System
.
out
.
println
(
Params
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveDialogue
,
"保存客户承诺话术配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看客户承诺话术配置"
,
priority
=
129
)
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_findDialogue
);
System
.
out
.
println
(
response
.
body
().
asString
());
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"查看客户承诺话术为空"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"客户承诺话术错误"
,
response
.
body
().
asString
()));
String
promiseTitle1
=
response
.
jsonPath
().
getString
(
"data.find{it.inviteType == 1}.promiseTitle"
);
String
promiseTitle2
=
response
.
jsonPath
().
getString
(
"data.find{it.inviteType == 0}.promiseTitle"
);
Assert
.
assertEquals
(
promiseTitle1
,
"一度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"一度客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promiseTitle2
,
"二度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"二度客户承诺话术错误"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/kjj/cases/live/liveConfig/SimpleLiveConfig.java
0 → 100644
View file @
a8b48fde
package
com
.
kjj
.
cases
.
live
.
liveConfig
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.bean.answer.AddReward
;
import
com.kjj.bean.answer.AddWelfareConf
;
import
com.kjj.bean.answer.RewardList
;
import
com.kjj.bean.issue.Dialogue
;
import
com.kjj.bean.lottery.ConfIdList
;
import
com.kjj.bean.manager.*
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.IdMakeUtil
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
ssoLogin
;
public
class
SimpleLiveConfig
implements
Authorization
{
public
String
liveID
;
public
String
EncodeLiveID
;
public
long
welfareConfId
;
private
Integer
taskId
;
public
List
<
RedList
>
redId
;
@BeforeClass
public
void
setUp
()
{
ssoLogin
();
}
/**
* 创建直播
*/
@Test
(
description
=
"创建直播"
,
priority
=
1
)
public
void
创建直播
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"posterUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/e36cb31828e14a3ebb9d01e6be79ad66.jpg"
);
Params
.
put
(
"videoUrl"
,
"http://streamimg.kjjcrm.com/kjy/image/20210201/1612171657348.mp4"
);
Params
.
put
(
"welfareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg"
);
Params
.
put
(
"coverUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/d4093b24aaca49da8f0e3e276721feea.jpg"
);
Params
.
put
(
"mpShareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg"
);
Params
.
put
(
"title"
,
"直播测试"
+
RandomUtils
.
nextInt
(
1
,
100
));
Params
.
put
(
"mpShareTitle"
,
"自动化直播"
);
Params
.
put
(
"companyId"
,
101
);
Params
.
put
(
"agentInviteAuthType"
,
1
);
Params
.
put
(
"agentInviteAuthLimitNum"
,
1
);
long
noticeTime
=
DateUtils
.
addHours
(
new
Date
(),
2
).
getTime
();
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
Params
.
put
(
"noticeTime"
,
noticeTime
);
Params
.
put
(
"broadcastTime"
,
broadcastTime
);
Params
.
put
(
"shareContent"
,
"自动化直播 #{shortLink}"
);
Params
.
put
(
"shelfStatus"
,
2
);
Params
.
put
(
"secondPoster"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg"
);
Params
.
put
(
"regionType"
,
2
);
Params
.
put
(
"preAwardUrl"
,
"https://yun.dui88.com/kjy/image/20210629/1624949155842.png"
);
Params
.
put
(
"preWindowUrl"
,
"https://yun.dui88.com/kjy/image/20210629/1624949098093.png"
);
Params
.
put
(
"distributionType"
,
0
);
Params
.
put
(
"existSeriesPoster"
,
0
);
List
<
ProvinceCityCodeList
>
provinceCityCode
=
new
ArrayList
<>();
ProvinceCityCodeList
save
=
new
ProvinceCityCodeList
();
save
.
setProvinceCode
(
110000
);
save
.
setCityCode
(
null
);
provinceCityCode
.
add
(
save
);
ProvinceCityCodeList
save1
=
new
ProvinceCityCodeList
();
save1
.
setProvinceCode
(
420000
);
save1
.
setCityCode
(
420900
);
provinceCityCode
.
add
(
save1
);
ProvinceCityCodeList
save2
=
new
ProvinceCityCodeList
();
save2
.
setProvinceCode
(
330000
);
save2
.
setCityCode
(
330100
);
provinceCityCode
.
add
(
save2
);
Params
.
put
(
"provinceCityCodeList"
,
provinceCityCode
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_0
);
liveID
=
response
.
jsonPath
().
getString
(
"data"
);
EncodeLiveID
=
IdMakeUtil
.
encodingId
(
Long
.
valueOf
(
liveID
));
System
.
out
.
println
(
liveID
);
LiveConstants
.
setValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
(),
liveID
);
LiveConstants
.
setValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
(),
EncodeLiveID
);
Assert
.
assertNotNull
(
liveID
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_0
,
"新增直播失败"
,
response
.
body
().
asString
()));
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
());
}
/**
* 基础配置
*/
@Test
(
description
=
"查询直播配置"
,
priority
=
2
)
public
void
查询直播配置
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
liveID
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_getConfDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_getConfDetail
,
"查询配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"单场红包配置"
,
priority
=
3
)
public
void
单场红包配置
()
{
//单场红包限额
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
liveID
);
Params
.
put
(
"maxAmount"
,
100000
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_MaxAmount
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_MaxAmount
,
"单场红包限额配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"展示红包金额"
,
priority
=
4
)
public
void
展示红包金额
()
{
//展示红包金额
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
liveID
);
Params
.
put
(
"showAmount"
,
100000
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_ShowAmount
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_ShowAmount
,
"展示红包配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"直播资料"
,
priority
=
5
)
public
void
直播资料
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
liveID
);
List
<
Material
>
ids
=
new
ArrayList
<>();
ids
.
add
(
new
Material
(
355L
,
0
));
ids
.
add
(
new
Material
(
356L
,
0
));
ids
.
add
(
new
Material
(
357L
,
0
));
ids
.
add
(
new
Material
(
358L
,
0
));
ids
.
add
(
new
Material
(
359L
,
0
));
ids
.
add
(
new
Material
(
960L
,
0
));
ids
.
add
(
new
Material
(
3384L
,
0
));
Params
.
put
(
"resourceList"
,
ids
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_8
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_8
,
"产品资料配置失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/lottery/DesignatedWinner.java
View file @
a8b48fde
...
@@ -329,10 +329,4 @@ public class DesignatedWinner implements Authorization {
...
@@ -329,10 +329,4 @@ public class DesignatedWinner implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardConfParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardConf
,
"代理人指定中奖配置查询失败"
,
AwardConfRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardConfParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardConf
,
"代理人指定中奖配置查询失败"
,
AwardConfRes
.
body
().
asString
()));
}
}
}
}
src/test/java/com/kjj/cases/live/treasure/Treasure.java
View file @
a8b48fde
...
@@ -2,10 +2,15 @@ package com.kjj.cases.live.treasure;
...
@@ -2,10 +2,15 @@ package com.kjj.cases.live.treasure;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.bean.manager.TreasureAward
;
import
com.kjj.bean.manager.TreasureCode
;
import
com.kjj.bean.manager.TreasureRed
;
import
com.kjj.bean.manager.WelfareList
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.ThreadSleepUtils
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
...
@@ -25,19 +30,96 @@ public class Treasure implements Authorization {
...
@@ -25,19 +30,96 @@ public class Treasure implements Authorization {
public
String
shareSign
;
public
String
shareSign
;
public
JSONObject
treasureConf
;
public
JSONObject
treasureConf
;
@Test
(
description
=
"查询宝箱配置详情"
,
priority
=
1
)
/**
* 裂变宝箱配置
*/
public
List
<
WelfareList
>
id
;
@Test
(
description
=
"查询配置奖品列表"
,
priority
=
1
)
public
void
查询配置奖品列表
()
{
Map
<
String
,
Object
>
getListParam
=
new
HashMap
<>();
getListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
getListParam
.
put
(
"companyId"
,
101
);
getListParam
.
put
(
"pageIndex"
,
1
);
getListParam
.
put
(
"pageSize"
,
20
);
getListParam
.
put
(
"welfareType"
,
6
);
Response
response
=
network
.
getResponse
(
getListParam
,
BasicConfig
.
MANAGER_getList4Admin
);
List
<
WelfareList
>
list
=
JsonUtil
.
parseResponseToPageBean
(
response
,
WelfareList
.
class
);
System
.
out
.
println
(
list
);
this
.
id
=
list
;
Assert
.
assertNotNull
(
list
,
network
.
message
(
getListParam
,
BasicConfig
.
MANAGER_getList4Admin
,
"查询奖品列表失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"宝箱实物中奖限制1次"
,
priority
=
2
)
public
void
宝箱实物中奖限制
1
次
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"openCondition"
,
1
);
saveParam
.
put
(
"openNum"
,
10
);
TreasureAward
treasureAward
=
new
TreasureAward
();
treasureAward
.
setWelfareId
(
this
.
id
.
get
(
0
).
getId
());
treasureAward
.
setAwardName
(
"宝箱锦鲤"
);
treasureAward
.
setTreasureProbability
(
10000
);
treasureAward
.
setTreasureType
(
3
);
treasureAward
.
setRuleType
(
1
);
treasureAward
.
setTotalNum
(
3
);
treasureAward
.
setWinLimitCount
(
1
);
saveParam
.
put
(
"treasureAward"
,
treasureAward
);
TreasureRed
treasureRed
=
new
TreasureRed
();
treasureRed
.
setRedTotalAmount
(
100
);
treasureRed
.
setRuleType
(
2
);
treasureRed
.
setTotalNum
(
2
);
treasureRed
.
setTreasureProbability
(
0
);
treasureRed
.
setTreasureType
(
2
);
treasureRed
.
setWinLimitCount
(
1
);
treasureRed
.
setShowAmount
(
200
);
saveParam
.
put
(
"treasureRed"
,
treasureRed
);
TreasureCode
treasureCode
=
new
TreasureCode
();
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setMaxNum
(
3
);
treasureCode
.
setRuleType
(
2
);
treasureCode
.
setTreasureProbability
(
0
);
treasureCode
.
setTreasureType
(
1
);
saveParam
.
put
(
"treasureCode"
,
treasureCode
);
saveParam
.
put
(
"treasurePeriod"
,
3
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveTreasureConf
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MANAGER_saveTreasureConf
,
"新增宝箱裂变配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询宝箱配置详情"
,
priority
=
3
)
public
void
查询宝箱配置详情
()
{
public
void
查询宝箱配置详情
()
{
Map
<
String
,
Object
>
confDetailParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
confDetailParam
=
new
HashMap
<>();
confDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
confDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
);
Response
response
=
network
.
getResponse
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
);
System
.
out
.
println
(
response
);
System
.
out
.
println
(
response
);
Integer
openCondition
=
response
.
jsonPath
().
getInt
(
"data.openCondition"
);
Integer
openCondition
=
response
.
jsonPath
().
getInt
(
"data.openCondition"
);
System
.
out
.
println
(
openCondition
);
System
.
out
.
println
(
openCondition
);
Assert
.
assertTrue
(
openCondition
>
0
,
network
.
message
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
,
"查询宝箱配置详情失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
openCondition
>
0
,
network
.
message
(
confDetailParam
,
BasicConfig
.
MANAGER_confDetail
,
"查询宝箱配置详情失败"
,
response
.
body
().
asString
()));
treasureConf
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
response
.
jsonPath
().
get
(
"data"
)));
treasureConf
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
response
.
jsonPath
().
get
(
"data"
)));
}
}
@Test
(
description
=
"查询直播前宝箱配置状态"
,
priority
=
2
)
@Test
(
description
=
"开启宝箱配置"
,
priority
=
4
)
public
void
开启宝箱配置
()
{
Map
<
String
,
Object
>
switchStatusParam
=
new
HashMap
<>();
switchStatusParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
switchStatusParam
.
put
(
"confStatus"
,
1
);
Response
response
=
network
.
postResponse
(
switchStatusParam
,
BasicConfig
.
MANAGER_switchStatus
);
boolean
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
switchStatusParam
,
BasicConfig
.
MANAGER_switchStatus
,
"开启宝箱失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询直播前宝箱配置状态"
,
priority
=
5
)
public
void
查询宝箱配置状态
()
{
public
void
查询宝箱配置状态
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
statusParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
statusParam
=
new
HashMap
<>();
...
@@ -49,7 +131,7 @@ public class Treasure implements Authorization {
...
@@ -49,7 +131,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"查询直播前宝箱配置信息"
,
priority
=
3
)
@Test
(
description
=
"查询直播前宝箱配置信息"
,
priority
=
6
)
public
void
查询直播前宝箱配置信息
()
{
public
void
查询直播前宝箱配置信息
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -65,7 +147,7 @@ public class Treasure implements Authorization {
...
@@ -65,7 +147,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"选择宝箱"
,
priority
=
4
)
@Test
(
description
=
"选择宝箱"
,
priority
=
7
)
public
void
选择宝箱
()
{
public
void
选择宝箱
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
chooseAwardParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
chooseAwardParam
=
new
HashMap
<>();
...
@@ -79,7 +161,7 @@ public class Treasure implements Authorization {
...
@@ -79,7 +161,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H获取分享加密串"
,
priority
=
5
)
@Test
(
description
=
"访客H获取分享加密串"
,
priority
=
8
)
public
void
访客
H
获取分享加密串
()
{
public
void
访客
H
获取分享加密串
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
...
@@ -93,7 +175,7 @@ public class Treasure implements Authorization {
...
@@ -93,7 +175,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
6
)
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
9
)
public
void
根据分享类型获取分享内容
()
{
public
void
根据分享类型获取分享内容
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -107,7 +189,7 @@ public class Treasure implements Authorization {
...
@@ -107,7 +189,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H与访客B邀请关系绑定"
,
priority
=
7
)
@Test
(
description
=
"访客H与访客B邀请关系绑定"
,
priority
=
10
)
public
void
访客
H
与访客
B
邀请关系绑定
()
{
public
void
访客
H
与访客
B
邀请关系绑定
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -119,7 +201,7 @@ public class Treasure implements Authorization {
...
@@ -119,7 +201,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客B获取绑定结果和绑定凭证"
,
priority
=
8
)
@Test
(
description
=
"访客B获取绑定结果和绑定凭证"
,
priority
=
11
)
public
void
访客
B
获取绑定结果和绑定凭证
()
{
public
void
访客
B
获取绑定结果和绑定凭证
()
{
visitorAuth2
();
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -133,7 +215,7 @@ public class Treasure implements Authorization {
...
@@ -133,7 +215,7 @@ public class Treasure implements Authorization {
//助力流程
//助力流程
@Test
(
description
=
"未登录查询分享人头像昵称"
,
priority
=
9
)
@Test
(
description
=
"未登录查询分享人头像昵称"
,
priority
=
12
)
public
void
未登录查询分享人头像昵称
()
{
public
void
未登录查询分享人头像昵称
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
simpleParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
simpleParam
=
new
HashMap
<>();
...
@@ -147,7 +229,7 @@ public class Treasure implements Authorization {
...
@@ -147,7 +229,7 @@ public class Treasure implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
simpleParam
,
BasicConfig
.
MOBILE_simple
,
"未登录查询分享人头像昵称失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
simpleParam
,
BasicConfig
.
MOBILE_simple
,
"未登录查询分享人头像昵称失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"已登录查询助力信息"
,
priority
=
1
0
)
@Test
(
description
=
"已登录查询助力信息"
,
priority
=
1
3
)
public
void
已登录查询分享人头像昵称
()
{
public
void
已登录查询分享人头像昵称
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -162,7 +244,7 @@ public class Treasure implements Authorization {
...
@@ -162,7 +244,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"用户B给用户H助力"
,
priority
=
1
1
)
@Test
(
description
=
"用户B给用户H助力"
,
priority
=
1
4
)
public
void
用户
B
给用户
H
助力
()
{
public
void
用户
B
给用户
H
助力
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
...
@@ -185,7 +267,7 @@ public class Treasure implements Authorization {
...
@@ -185,7 +267,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客B获取直播所有的订阅消息模板"
,
priority
=
1
2
)
@Test
(
description
=
"访客B获取直播所有的订阅消息模板"
,
priority
=
1
5
)
public
void
获取
B
直播所有的订阅消息模板
()
{
public
void
获取
B
直播所有的订阅消息模板
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
sycParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
sycParam
=
new
HashMap
<>();
...
@@ -196,7 +278,7 @@ public class Treasure implements Authorization {
...
@@ -196,7 +278,7 @@ public class Treasure implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
sycParam
,
BasicConfig
.
USER_wxIdAllList
,
"获取订阅消息失败"
,
sycRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
sycParam
,
BasicConfig
.
USER_wxIdAllList
,
"获取订阅消息失败"
,
sycRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客B预约直播间"
,
priority
=
1
3
)
@Test
(
description
=
"访客B预约直播间"
,
priority
=
1
6
)
public
void
访客
B
预约直播间
()
{
public
void
访客
B
预约直播间
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
sycParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
sycParam
=
new
HashMap
<>();
...
@@ -213,7 +295,7 @@ public class Treasure implements Authorization {
...
@@ -213,7 +295,7 @@ public class Treasure implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
sycParam
,
BasicConfig
.
USER_SYCAPPOINTMENT
,
"预约失败"
,
sycRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
sycParam
,
BasicConfig
.
USER_SYCAPPOINTMENT
,
"预约失败"
,
sycRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客B关注直播间"
,
priority
=
1
4
)
@Test
(
description
=
"访客B关注直播间"
,
priority
=
1
7
)
public
void
访客
B
关注直播间
()
{
public
void
访客
B
关注直播间
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
subscribeParam
=
new
HashMap
<>();
...
@@ -228,7 +310,7 @@ public class Treasure implements Authorization {
...
@@ -228,7 +310,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
subscribeParam
,
BasicConfig
.
USER_SUBSCRIBE
,
"关注失败"
,
subscribeRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客B关注状态查询"
,
priority
=
1
5
)
@Test
(
description
=
"访客B关注状态查询"
,
priority
=
1
8
)
public
void
访客
B
关注状态查询
()
{
public
void
访客
B
关注状态查询
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
findParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
findParam
=
new
HashMap
<>();
...
@@ -240,7 +322,7 @@ public class Treasure implements Authorization {
...
@@ -240,7 +322,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客B保存海报获得抽奖码"
,
priority
=
1
6
)
@Test
(
description
=
"访客B保存海报获得抽奖码"
,
priority
=
1
9
)
public
void
访客
B
保存海报获得抽奖码
()
{
public
void
访客
B
保存海报获得抽奖码
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
savePosterParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
savePosterParam
=
new
HashMap
<>();
...
@@ -252,7 +334,7 @@ public class Treasure implements Authorization {
...
@@ -252,7 +334,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"查询访客B抽奖码数量"
,
priority
=
17
)
@Test
(
description
=
"查询访客B抽奖码数量"
,
priority
=
20
)
public
void
查询访客
B
抽奖码数量
()
{
public
void
查询访客
B
抽奖码数量
()
{
visitorAuth2
();
visitorAuth2
();
Map
<
String
,
Object
>
myCountParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
myCountParam
=
new
HashMap
<>();
...
@@ -264,7 +346,7 @@ public class Treasure implements Authorization {
...
@@ -264,7 +346,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客K邀请关系绑定"
,
priority
=
18
)
@Test
(
description
=
"访客K邀请关系绑定"
,
priority
=
21
)
public
void
访客
K
邀请关系绑定
()
{
public
void
访客
K
邀请关系绑定
()
{
visitorAuth11
();
visitorAuth11
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -276,7 +358,7 @@ public class Treasure implements Authorization {
...
@@ -276,7 +358,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客K获取绑定结果和绑定凭证"
,
priority
=
19
)
@Test
(
description
=
"访客K获取绑定结果和绑定凭证"
,
priority
=
22
)
public
void
访客
K
获取绑定结果和绑定凭证
()
{
public
void
访客
K
获取绑定结果和绑定凭证
()
{
visitorAuth11
();
visitorAuth11
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -288,7 +370,7 @@ public class Treasure implements Authorization {
...
@@ -288,7 +370,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户K给用户H助力"
,
priority
=
2
0
)
@Test
(
description
=
"用户K给用户H助力"
,
priority
=
2
3
)
public
void
用户
K
给用户
H
助力
()
{
public
void
用户
K
给用户
H
助力
()
{
visitorAuth11
();
visitorAuth11
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -304,7 +386,7 @@ public class Treasure implements Authorization {
...
@@ -304,7 +386,7 @@ public class Treasure implements Authorization {
@Test
(
description
=
"访客L邀请关系绑定"
,
priority
=
2
1
)
@Test
(
description
=
"访客L邀请关系绑定"
,
priority
=
2
4
)
public
void
访客
L
邀请关系绑定
()
{
public
void
访客
L
邀请关系绑定
()
{
visitorAuth12
();
visitorAuth12
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -316,7 +398,7 @@ public class Treasure implements Authorization {
...
@@ -316,7 +398,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客L获取绑定结果和绑定凭证"
,
priority
=
2
2
)
@Test
(
description
=
"访客L获取绑定结果和绑定凭证"
,
priority
=
2
5
)
public
void
访客
L
获取绑定结果和绑定凭证
()
{
public
void
访客
L
获取绑定结果和绑定凭证
()
{
visitorAuth12
();
visitorAuth12
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -328,7 +410,7 @@ public class Treasure implements Authorization {
...
@@ -328,7 +410,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户L给用户H助力"
,
priority
=
2
3
)
@Test
(
description
=
"用户L给用户H助力"
,
priority
=
2
6
)
public
void
用户
L
给用户
H
助力
()
{
public
void
用户
L
给用户
H
助力
()
{
visitorAuth12
();
visitorAuth12
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -344,7 +426,7 @@ public class Treasure implements Authorization {
...
@@ -344,7 +426,7 @@ public class Treasure implements Authorization {
@Test
(
description
=
"访客M邀请关系绑定"
,
priority
=
2
4
)
@Test
(
description
=
"访客M邀请关系绑定"
,
priority
=
2
7
)
public
void
访客
M
邀请关系绑定
()
{
public
void
访客
M
邀请关系绑定
()
{
visitorAuth13
();
visitorAuth13
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -356,7 +438,7 @@ public class Treasure implements Authorization {
...
@@ -356,7 +438,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客M获取绑定结果和绑定凭证"
,
priority
=
2
5
)
@Test
(
description
=
"访客M获取绑定结果和绑定凭证"
,
priority
=
2
8
)
public
void
访客
M
获取绑定结果和绑定凭证
()
{
public
void
访客
M
获取绑定结果和绑定凭证
()
{
visitorAuth13
();
visitorAuth13
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -368,7 +450,7 @@ public class Treasure implements Authorization {
...
@@ -368,7 +450,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户M给用户H助力"
,
priority
=
2
6
)
@Test
(
description
=
"用户M给用户H助力"
,
priority
=
2
9
)
public
void
用户
M
给用户
H
助力
()
{
public
void
用户
M
给用户
H
助力
()
{
visitorAuth13
();
visitorAuth13
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -383,7 +465,7 @@ public class Treasure implements Authorization {
...
@@ -383,7 +465,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客P邀请关系绑定"
,
priority
=
27
)
@Test
(
description
=
"访客P邀请关系绑定"
,
priority
=
30
)
public
void
访客
P
邀请关系绑定
()
{
public
void
访客
P
邀请关系绑定
()
{
visitorAuth16
();
visitorAuth16
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -395,7 +477,7 @@ public class Treasure implements Authorization {
...
@@ -395,7 +477,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客P获取绑定结果和绑定凭证"
,
priority
=
28
)
@Test
(
description
=
"访客P获取绑定结果和绑定凭证"
,
priority
=
31
)
public
void
访客
P
获取绑定结果和绑定凭证
()
{
public
void
访客
P
获取绑定结果和绑定凭证
()
{
visitorAuth16
();
visitorAuth16
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -407,7 +489,7 @@ public class Treasure implements Authorization {
...
@@ -407,7 +489,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户P给用户H助力"
,
priority
=
29
)
@Test
(
description
=
"用户P给用户H助力"
,
priority
=
32
)
public
void
用户
P
给用户
H
助力
()
{
public
void
用户
P
给用户
H
助力
()
{
visitorAuth16
();
visitorAuth16
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -422,7 +504,7 @@ public class Treasure implements Authorization {
...
@@ -422,7 +504,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客Q邀请关系绑定"
,
priority
=
3
0
)
@Test
(
description
=
"访客Q邀请关系绑定"
,
priority
=
3
3
)
public
void
访客
Q
邀请关系绑定
()
{
public
void
访客
Q
邀请关系绑定
()
{
visitorAuth17
();
visitorAuth17
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -434,7 +516,7 @@ public class Treasure implements Authorization {
...
@@ -434,7 +516,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客Q获取绑定结果和绑定凭证"
,
priority
=
3
1
)
@Test
(
description
=
"访客Q获取绑定结果和绑定凭证"
,
priority
=
3
4
)
public
void
访客
Q
获取绑定结果和绑定凭证
()
{
public
void
访客
Q
获取绑定结果和绑定凭证
()
{
visitorAuth17
();
visitorAuth17
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -446,7 +528,7 @@ public class Treasure implements Authorization {
...
@@ -446,7 +528,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"用户Q给用户H助力"
,
priority
=
3
2
)
@Test
(
description
=
"用户Q给用户H助力"
,
priority
=
3
5
)
public
void
用户
Q
给用户
H
助力
()
{
public
void
用户
Q
给用户
H
助力
()
{
visitorAuth17
();
visitorAuth17
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -461,7 +543,7 @@ public class Treasure implements Authorization {
...
@@ -461,7 +543,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H查询第1次参与详情的进度显示"
,
priority
=
3
3
)
@Test
(
description
=
"访客H查询第1次参与详情的进度显示"
,
priority
=
3
6
)
public
void
访客
H
查询第
1
次参与详情的进度显示
()
{
public
void
访客
H
查询第
1
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -475,7 +557,7 @@ public class Treasure implements Authorization {
...
@@ -475,7 +557,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H开启第1轮宝箱获得实物"
,
priority
=
3
4
)
@Test
(
description
=
"访客H开启第1轮宝箱获得实物"
,
priority
=
3
7
)
public
void
访客
H
开启第
1
轮宝箱获得实物
()
{
public
void
访客
H
开启第
1
轮宝箱获得实物
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -490,7 +572,7 @@ public class Treasure implements Authorization {
...
@@ -490,7 +572,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第1轮开宝箱参与详情"
,
priority
=
3
5
)
@Test
(
description
=
"访客H第1轮开宝箱参与详情"
,
priority
=
3
8
)
public
void
访客
H
第
1
轮开宝箱参与详情
()
{
public
void
访客
H
第
1
轮开宝箱参与详情
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -510,7 +592,7 @@ public class Treasure implements Authorization {
...
@@ -510,7 +592,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第2次参与详情的进度显示"
,
priority
=
3
6
)
@Test
(
description
=
"访客H第2次参与详情的进度显示"
,
priority
=
3
9
)
public
void
访客
H
第
2
次参与详情的进度显示
()
{
public
void
访客
H
第
2
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -524,7 +606,7 @@ public class Treasure implements Authorization {
...
@@ -524,7 +606,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H开启第2轮宝箱降级抽奖码"
,
priority
=
37
)
@Test
(
description
=
"访客H开启第2轮宝箱降级抽奖码"
,
priority
=
40
)
public
void
访客
H
开启第
2
轮宝箱降级抽奖码
()
{
public
void
访客
H
开启第
2
轮宝箱降级抽奖码
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -540,7 +622,7 @@ public class Treasure implements Authorization {
...
@@ -540,7 +622,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第2轮开宝箱参与详情"
,
priority
=
38
)
@Test
(
description
=
"访客H第2轮开宝箱参与详情"
,
priority
=
41
)
public
void
访客
H
第
2
轮开宝箱参与详情
()
{
public
void
访客
H
第
2
轮开宝箱参与详情
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -560,7 +642,7 @@ public class Treasure implements Authorization {
...
@@ -560,7 +642,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"宝箱实物中奖无限制"
,
priority
=
39
)
@Test
(
description
=
"宝箱实物中奖无限制"
,
priority
=
42
)
public
void
宝箱实物中奖无限制
()
{
public
void
宝箱实物中奖无限制
()
{
JSONObject
treasureAward
=
treasureConf
.
getJSONObject
(
"treasureAward"
);
JSONObject
treasureAward
=
treasureConf
.
getJSONObject
(
"treasureAward"
);
treasureAward
.
put
(
"winLimitCount"
,-
1
);
//-1无限制,1限制1次
treasureAward
.
put
(
"winLimitCount"
,-
1
);
//-1无限制,1限制1次
...
@@ -571,7 +653,7 @@ public class Treasure implements Authorization {
...
@@ -571,7 +653,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第3次参与详情的进度显示"
,
priority
=
4
0
)
@Test
(
description
=
"访客H第3次参与详情的进度显示"
,
priority
=
4
3
)
public
void
访客
H
第
3
次参与详情的进度显示
()
{
public
void
访客
H
第
3
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -584,7 +666,7 @@ public class Treasure implements Authorization {
...
@@ -584,7 +666,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第3次参与详情进度失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第3次参与详情进度失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客H开启第3轮宝箱获得实物"
,
priority
=
4
1
)
@Test
(
description
=
"访客H开启第3轮宝箱获得实物"
,
priority
=
4
4
)
public
void
访客
H
开启第
3
轮宝箱获得实物
()
{
public
void
访客
H
开启第
3
轮宝箱获得实物
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
...
@@ -599,7 +681,7 @@ public class Treasure implements Authorization {
...
@@ -599,7 +681,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第3轮开宝箱参与详情"
,
priority
=
4
2
)
@Test
(
description
=
"访客H第3轮开宝箱参与详情"
,
priority
=
4
5
)
public
void
访客
H
第
3
轮开宝箱参与详情
()
{
public
void
访客
H
第
3
轮开宝箱参与详情
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -619,7 +701,7 @@ public class Treasure implements Authorization {
...
@@ -619,7 +701,7 @@ public class Treasure implements Authorization {
//B 用户邀请
//B 用户邀请
@Test
(
description
=
"访客M获取分享加密串"
,
priority
=
4
3
)
@Test
(
description
=
"访客M获取分享加密串"
,
priority
=
4
6
)
public
void
访客
M
获取分享加密串
()
{
public
void
访客
M
获取分享加密串
()
{
visitorAuth13
();
visitorAuth13
();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
...
@@ -632,7 +714,7 @@ public class Treasure implements Authorization {
...
@@ -632,7 +714,7 @@ public class Treasure implements Authorization {
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
signParam
,
BasicConfig
.
MOBILE_sign
,
"分享失败"
,
signRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
signParam
,
BasicConfig
.
MOBILE_sign
,
"分享失败"
,
signRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客M与访客N邀请关系绑定"
,
priority
=
4
4
)
@Test
(
description
=
"访客M与访客N邀请关系绑定"
,
priority
=
4
7
)
public
void
访客
M
与访客
N
邀请关系绑定
()
{
public
void
访客
M
与访客
N
邀请关系绑定
()
{
visitorAuth14
();
visitorAuth14
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -644,7 +726,7 @@ public class Treasure implements Authorization {
...
@@ -644,7 +726,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客N获取绑定结果和绑定凭证"
,
priority
=
4
5
)
@Test
(
description
=
"访客N获取绑定结果和绑定凭证"
,
priority
=
4
8
)
public
void
访客
N
获取绑定结果和绑定凭证
()
{
public
void
访客
N
获取绑定结果和绑定凭证
()
{
visitorAuth14
();
visitorAuth14
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -657,7 +739,7 @@ public class Treasure implements Authorization {
...
@@ -657,7 +739,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客N给访客M助力"
,
priority
=
4
6
)
@Test
(
description
=
"访客N给访客M助力"
,
priority
=
4
9
)
public
void
访客
N
给访客
M
助力
()
{
public
void
访客
N
给访客
M
助力
()
{
visitorAuth14
();
visitorAuth14
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -671,7 +753,7 @@ public class Treasure implements Authorization {
...
@@ -671,7 +753,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
infoParam
,
BasicConfig
.
MOBILE_assist
,
"访客N给访客M助力失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
infoParam
,
BasicConfig
.
MOBILE_assist
,
"访客N给访客M助力失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客M与访客R邀请关系绑定"
,
priority
=
47
)
@Test
(
description
=
"访客M与访客R邀请关系绑定"
,
priority
=
50
)
public
void
访客
M
与访客
R
邀请关系绑定
()
{
public
void
访客
M
与访客
R
邀请关系绑定
()
{
visitorAuth18
();
visitorAuth18
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -683,7 +765,7 @@ public class Treasure implements Authorization {
...
@@ -683,7 +765,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客R获取绑定结果和绑定凭证"
,
priority
=
48
)
@Test
(
description
=
"访客R获取绑定结果和绑定凭证"
,
priority
=
51
)
public
void
访客
R
获取绑定结果和绑定凭证
()
{
public
void
访客
R
获取绑定结果和绑定凭证
()
{
visitorAuth18
();
visitorAuth18
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -695,7 +777,7 @@ public class Treasure implements Authorization {
...
@@ -695,7 +777,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客R给访客M助力"
,
priority
=
49
)
@Test
(
description
=
"访客R给访客M助力"
,
priority
=
52
)
public
void
访客
R
给访客
M
助力
()
{
public
void
访客
R
给访客
M
助力
()
{
visitorAuth18
();
visitorAuth18
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -711,7 +793,7 @@ public class Treasure implements Authorization {
...
@@ -711,7 +793,7 @@ public class Treasure implements Authorization {
//验证实物奖品数量是否会超发
//验证实物奖品数量是否会超发
@Test
(
description
=
"访客H第4次参与详情的进度显示"
,
priority
=
5
0
)
@Test
(
description
=
"访客H第4次参与详情的进度显示"
,
priority
=
5
3
)
public
void
访客
H
第
4
次参与详情的进度显示
()
{
public
void
访客
H
第
4
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -724,7 +806,7 @@ public class Treasure implements Authorization {
...
@@ -724,7 +806,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客M第1次参与详情的进度显示"
,
priority
=
5
1
)
@Test
(
description
=
"访客M第1次参与详情的进度显示"
,
priority
=
5
4
)
public
void
访客
M
第
1
次参与详情的进度显示
()
{
public
void
访客
M
第
1
次参与详情的进度显示
()
{
visitorAuth13
();
visitorAuth13
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -738,7 +820,7 @@ public class Treasure implements Authorization {
...
@@ -738,7 +820,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H和访客M开启第4轮宝箱实物是否超发"
,
priority
=
5
2
)
@Test
(
description
=
"访客H和访客M开启第4轮宝箱实物是否超发"
,
priority
=
5
5
)
public
void
访客
H
和访客
M
开启第
4
轮宝箱实物是否超发
()
{
public
void
访客
H
和访客
M
开启第
4
轮宝箱实物是否超发
()
{
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
...
@@ -762,7 +844,7 @@ public class Treasure implements Authorization {
...
@@ -762,7 +844,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H和访客M第4轮开宝箱参与详情"
,
priority
=
5
3
)
@Test
(
description
=
"访客H和访客M第4轮开宝箱参与详情"
,
priority
=
5
6
)
public
void
访客
H
和访客
M
第
4
轮开宝箱参与详情
()
{
public
void
访客
H
和访客
M
第
4
轮开宝箱参与详情
()
{
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
infoParam
.
put
(
"treasureConfId"
,
ConfId
);
infoParam
.
put
(
"treasureConfId"
,
ConfId
);
...
@@ -795,7 +877,7 @@ public class Treasure implements Authorization {
...
@@ -795,7 +877,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"宝箱红包限制1次"
,
priority
=
5
4
)
@Test
(
description
=
"宝箱红包限制1次"
,
priority
=
5
7
)
public
void
宝箱红包限制
1
次
()
{
public
void
宝箱红包限制
1
次
()
{
JSONObject
treasureRed
=
treasureConf
.
getJSONObject
(
"treasureRed"
);
JSONObject
treasureRed
=
treasureConf
.
getJSONObject
(
"treasureRed"
);
...
@@ -810,7 +892,7 @@ public class Treasure implements Authorization {
...
@@ -810,7 +892,7 @@ public class Treasure implements Authorization {
}
}
//访客A领取红包
//访客A领取红包
@Test
(
description
=
"访客H第5次参与详情的进度显示"
,
priority
=
5
5
)
@Test
(
description
=
"访客H第5次参与详情的进度显示"
,
priority
=
5
8
)
public
void
访客
H
第
5
次参与详情的进度显示
()
{
public
void
访客
H
第
5
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -822,7 +904,7 @@ public class Treasure implements Authorization {
...
@@ -822,7 +904,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第5次参与详情进度失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第5次参与详情进度失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客H开启第5次宝箱获得红包"
,
priority
=
5
6
)
@Test
(
description
=
"访客H开启第5次宝箱获得红包"
,
priority
=
5
9
)
public
void
访客
H
开启第
5
次宝箱获得红包
()
{
public
void
访客
H
开启第
5
次宝箱获得红包
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
15000
);
ThreadSleepUtils
.
sleep
(
15000
);
...
@@ -838,7 +920,7 @@ public class Treasure implements Authorization {
...
@@ -838,7 +920,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第5轮开宝箱参与详情"
,
priority
=
57
)
@Test
(
description
=
"访客H第5轮开宝箱参与详情"
,
priority
=
60
)
public
void
访客
H
第
5
轮开宝箱参与详情
()
{
public
void
访客
H
第
5
轮开宝箱参与详情
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -858,7 +940,7 @@ public class Treasure implements Authorization {
...
@@ -858,7 +940,7 @@ public class Treasure implements Authorization {
//访客A降级抽奖码
//访客A降级抽奖码
@Test
(
description
=
"访客H第6次参与详情的进度显示"
,
priority
=
58
)
@Test
(
description
=
"访客H第6次参与详情的进度显示"
,
priority
=
61
)
public
void
访客
H
第
6
次参与详情的进度显示
()
{
public
void
访客
H
第
6
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -870,7 +952,7 @@ public class Treasure implements Authorization {
...
@@ -870,7 +952,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第6次参与详情进度失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
invitationNum
>
0
,
network
.
message
(
InfoParam
,
BasicConfig
.
MANAGER_treasureUserInfo
,
"查询第6次参与详情进度失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客H开启第6次宝箱降级抽奖码"
,
priority
=
59
)
@Test
(
description
=
"访客H开启第6次宝箱降级抽奖码"
,
priority
=
62
)
public
void
访客
H
开启第
6
次宝箱降级抽奖码
()
{
public
void
访客
H
开启第
6
次宝箱降级抽奖码
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -885,7 +967,7 @@ public class Treasure implements Authorization {
...
@@ -885,7 +967,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H第6轮开宝箱参与详情"
,
priority
=
6
0
)
@Test
(
description
=
"访客H第6轮开宝箱参与详情"
,
priority
=
6
3
)
public
void
访客
H
第
6
轮开宝箱参与详情
()
{
public
void
访客
H
第
6
轮开宝箱参与详情
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -904,7 +986,7 @@ public class Treasure implements Authorization {
...
@@ -904,7 +986,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客N获取分享加密串"
,
priority
=
6
1
)
@Test
(
description
=
"访客N获取分享加密串"
,
priority
=
6
4
)
public
void
访客
N
获取分享加密串
()
{
public
void
访客
N
获取分享加密串
()
{
visitorAuth14
();
visitorAuth14
();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
...
@@ -918,7 +1000,7 @@ public class Treasure implements Authorization {
...
@@ -918,7 +1000,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客N与访客O邀请关系绑定"
,
priority
=
6
2
)
@Test
(
description
=
"访客N与访客O邀请关系绑定"
,
priority
=
6
5
)
public
void
访客
N
与访客
O
邀请关系绑定
()
{
public
void
访客
N
与访客
O
邀请关系绑定
()
{
visitorAuth15
();
visitorAuth15
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -930,7 +1012,7 @@ public class Treasure implements Authorization {
...
@@ -930,7 +1012,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客O获取绑定结果和绑定凭证"
,
priority
=
6
3
)
@Test
(
description
=
"访客O获取绑定结果和绑定凭证"
,
priority
=
6
6
)
public
void
访客
O
获取绑定结果和绑定凭证
()
{
public
void
访客
O
获取绑定结果和绑定凭证
()
{
visitorAuth15
();
visitorAuth15
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
...
@@ -942,7 +1024,7 @@ public class Treasure implements Authorization {
...
@@ -942,7 +1024,7 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客O给访客N助力"
,
priority
=
6
4
)
@Test
(
description
=
"访客O给访客N助力"
,
priority
=
6
7
)
public
void
访客
O
给访客
N
助力
()
{
public
void
访客
O
给访客
N
助力
()
{
visitorAuth15
();
visitorAuth15
();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -959,7 +1041,7 @@ public class Treasure implements Authorization {
...
@@ -959,7 +1041,7 @@ public class Treasure implements Authorization {
//访客M和N同时抢红包
//访客M和N同时抢红包
@Test
(
description
=
"访客M参与详情的进度显示"
,
priority
=
6
5
)
@Test
(
description
=
"访客M参与详情的进度显示"
,
priority
=
6
8
)
public
void
访客
M
参与详情的进度显示
()
{
public
void
访客
M
参与详情的进度显示
()
{
visitorAuth13
();
visitorAuth13
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -972,7 +1054,7 @@ public class Treasure implements Authorization {
...
@@ -972,7 +1054,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客N参与详情的进度显示"
,
priority
=
6
6
)
@Test
(
description
=
"访客N参与详情的进度显示"
,
priority
=
6
9
)
public
void
访客
N
参与详情的进度显示
()
{
public
void
访客
N
参与详情的进度显示
()
{
visitorAuth14
();
visitorAuth14
();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
InfoParam
=
new
HashMap
<>();
...
@@ -986,7 +1068,7 @@ public class Treasure implements Authorization {
...
@@ -986,7 +1068,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客M和访客N同时开启宝箱验证红包是否超发"
,
priority
=
67
)
@Test
(
description
=
"访客M和访客N同时开启宝箱验证红包是否超发"
,
priority
=
70
)
public
void
访客
M
和访客
N
同时开启宝箱验证红包是否超发
()
{
public
void
访客
M
和访客
N
同时开启宝箱验证红包是否超发
()
{
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
openParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
openParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -1010,7 +1092,7 @@ public class Treasure implements Authorization {
...
@@ -1010,7 +1092,7 @@ public class Treasure implements Authorization {
@Test
(
description
=
"访客M和访客N第7轮开宝箱参与详情"
,
priority
=
68
)
@Test
(
description
=
"访客M和访客N第7轮开宝箱参与详情"
,
priority
=
71
)
public
void
访客
M
和访客
N
第
7
轮开宝箱参与详情
()
{
public
void
访客
M
和访客
N
第
7
轮开宝箱参与详情
()
{
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -1041,7 +1123,7 @@ public class Treasure implements Authorization {
...
@@ -1041,7 +1123,7 @@ public class Treasure implements Authorization {
}
}
@Test
(
description
=
"访客H宝箱领取记录"
,
priority
=
69
)
@Test
(
description
=
"访客H宝箱领取记录"
,
priority
=
72
)
public
void
访客
H
宝箱领取记录
()
{
public
void
访客
H
宝箱领取记录
()
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
...
@@ -1058,7 +1140,7 @@ public class Treasure implements Authorization {
...
@@ -1058,7 +1140,7 @@ public class Treasure implements Authorization {
/**
/**
* 添加代理人绑定关系
* 添加代理人绑定关系
*/
*/
@Test
(
description
=
"代理人绑定"
,
priority
=
7
0
)
@Test
(
description
=
"代理人绑定"
,
priority
=
7
3
)
public
void
代理人绑定
()
{
public
void
代理人绑定
()
{
agentAuth
();
agentAuth
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -1068,10 +1150,4 @@ public class Treasure implements Authorization {
...
@@ -1068,10 +1150,4 @@ public class Treasure implements Authorization {
System
.
out
.
println
(
success
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
}
}
}
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