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
973f688d
Commit
973f688d
authored
May 28, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增猜数字红包
parent
7fda6d13
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
3005 additions
and
21583 deletions
+3005
-21583
CondDetail.java
src/test/java/com/kjj/bean/lottery/CondDetail.java
+9
-0
TreasureAward.java
src/test/java/com/kjj/bean/manager/TreasureAward.java
+1
-0
LotteryCode.java
...test/java/com/kjj/cases/live/LotteryCode/LotteryCode.java
+37
-114
AdminAuthorization.java
...est/java/com/kjj/cases/live/admin/AdminAuthorization.java
+26
-2
LiveGuess.java
src/test/java/com/kjj/cases/live/guess/LiveGuess.java
+339
-0
ManagerGuess.java
src/test/java/com/kjj/cases/live/guess/ManagerGuess.java
+32
-32
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+105
-105
TreasureTime.java
src/test/java/com/kjj/cases/live/lottery/TreasureTime.java
+422
-0
Share.java
src/test/java/com/kjj/cases/live/manager/Share.java
+84
-0
TreasureTime.java
src/test/java/com/kjj/cases/live/manager/TreasureTime.java
+49
-44
Limited.java
src/test/java/com/kjj/cases/live/red/Limited.java
+0
-2
LiveVistorRed.java
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
+44
-41
Treasure.java
src/test/java/com/kjj/cases/live/treasure/Treasure.java
+268
-214
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+52
-13
JsonUtil.java
src/test/java/com/kjj/utils/JsonUtil.java
+1
-0
liveTestNG.xml
src/test/liveTestNG.xml
+20
-1
report.html
test-output/report.html
+1516
-21015
No files found.
src/test/java/com/kjj/bean/lottery/CondDetail.java
0 → 100644
View file @
973f688d
package
com
.
kjj
.
bean
.
lottery
;
import
lombok.Data
;
@Data
public
class
CondDetail
{
private
String
treasureConfId
;
}
src/test/java/com/kjj/bean/manager/TreasureAward.java
View file @
973f688d
...
@@ -15,6 +15,7 @@ public class TreasureAward {
...
@@ -15,6 +15,7 @@ public class TreasureAward {
private
Integer
maxNum
;
private
Integer
maxNum
;
private
Integer
treasureProbability
;
private
Integer
treasureProbability
;
private
Integer
winLimitCount
;
private
Integer
winLimitCount
;
private
Integer
isLimit
;
...
...
src/test/java/com/kjj/cases/live/LotteryCode/LotteryCode.java
View file @
973f688d
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/admin/AdminAuthorization.java
View file @
973f688d
...
@@ -129,7 +129,7 @@ public interface AdminAuthorization {
...
@@ -129,7 +129,7 @@ public interface AdminAuthorization {
}
}
/**
/**
* 访客M(大妹子
保险)非实名用户授权,ID:102
* 访客M(大妹子
)非实名用户授权,ID:299
*/
*/
default
void
visitorAuth13
()
{
default
void
visitorAuth13
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY13
);
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY13
);
...
@@ -137,7 +137,7 @@ public interface AdminAuthorization {
...
@@ -137,7 +137,7 @@ public interface AdminAuthorization {
}
}
/**
/**
* 访客N(光头强)非实名用户授权,ID:
173
* 访客N(光头强)非实名用户授权,ID:
540
*/
*/
default
void
visitorAuth14
()
{
default
void
visitorAuth14
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY14
);
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY14
);
...
@@ -176,6 +176,30 @@ public interface AdminAuthorization {
...
@@ -176,6 +176,30 @@ public interface AdminAuthorization {
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY18
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY18
);
}
}
/**
* 访客T(林国芸)ID:786
*/
default
void
visitorAuth19
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth19
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth19
);
}
/**
* 访客Y(孙心桂)ID:785
*/
default
void
visitorAuth20
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth20
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth20
);
}
/**
* 访客W(谢翊美)ID:791
*/
default
void
visitorAuth21
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth21
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth21
);
}
}
}
src/test/java/com/kjj/cases/live/guess/LiveGuess.java
0 → 100644
View file @
973f688d
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/guess/ManagerGuess.java
View file @
973f688d
...
@@ -94,32 +94,32 @@ public class ManagerGuess implements AdminAuthorization {
...
@@ -94,32 +94,32 @@ public class ManagerGuess implements AdminAuthorization {
@Test
(
description
=
"编辑猜数字红包"
,
priority
=
5
)
@Test
(
description
=
"编辑猜数字红包"
,
priority
=
5
)
public
void
编辑猜数字红包
()
{
public
void
编辑猜数字红包
()
{
Map
<
String
,
Object
>
Amount
Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
update
Param
=
new
HashMap
<>();
Amount
Param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
update
Param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Amount
Param
.
put
(
"redAmount"
,
88
);
update
Param
.
put
(
"redAmount"
,
88
);
Amount
Param
.
put
(
"redRealNum"
,
1
);
update
Param
.
put
(
"redRealNum"
,
1
);
Amount
Param
.
put
(
"redShowNum"
,
1
);
update
Param
.
put
(
"redShowNum"
,
1
);
Amount
Param
.
put
(
"guessMinNum"
,
1
);
update
Param
.
put
(
"guessMinNum"
,
1
);
Amount
Param
.
put
(
"guessMaxNum"
,
10
);
update
Param
.
put
(
"guessMaxNum"
,
10
);
Amount
Param
.
put
(
"guessLeastTime"
,
4
);
update
Param
.
put
(
"guessLeastTime"
,
4
);
Amount
Param
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
update
Param
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
Response
response
=
network
.
postResponse
(
Amount
Param
,
BasicConfig
.
MANAGER_saveOrUpdate1
);
Response
response
=
network
.
postResponse
(
update
Param
,
BasicConfig
.
MANAGER_saveOrUpdate1
);
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
(
Amount
Param
,
BasicConfig
.
MANAGER_saveOrUpdate1
,
"新增猜数字红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
update
Param
,
BasicConfig
.
MANAGER_saveOrUpdate1
,
"新增猜数字红包失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"删除猜数字红包"
,
priority
=
6
)
@Test
(
description
=
"删除猜数字红包"
,
priority
=
6
)
public
void
删除猜数字红包
()
{
public
void
删除猜数字红包
()
{
Map
<
String
,
Object
>
de
tai
lParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
delParam
=
new
HashMap
<>();
de
tai
lParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
delParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
de
tai
lParam
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
delParam
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
Response
response
=
network
.
postResponse
(
de
tai
lParam
,
BasicConfig
.
MANAGER_del_1
);
Response
response
=
network
.
postResponse
(
delParam
,
BasicConfig
.
MANAGER_del_1
);
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
(
de
tai
lParam
,
BasicConfig
.
MANAGER_del_1
,
"删除猜数字红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
delParam
,
BasicConfig
.
MANAGER_del_1
,
"删除猜数字红包失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -187,19 +187,19 @@ public class ManagerGuess implements AdminAuthorization {
...
@@ -187,19 +187,19 @@ public class ManagerGuess implements AdminAuthorization {
@Test
(
description
=
"直播前编辑猜数字红包"
,
priority
=
11
)
@Test
(
description
=
"直播前编辑猜数字红包"
,
priority
=
11
)
public
void
直播前编辑猜数字红包
()
{
public
void
直播前编辑猜数字红包
()
{
adminAuth
();
adminAuth
();
Map
<
String
,
Object
>
Amount
Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
update
Param
=
new
HashMap
<>();
Amount
Param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
update
Param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Amount
Param
.
put
(
"redAmount"
,
99
);
update
Param
.
put
(
"redAmount"
,
99
);
Amount
Param
.
put
(
"redRealNum"
,
1
);
update
Param
.
put
(
"redRealNum"
,
1
);
Amount
Param
.
put
(
"redShowNum"
,
10
);
update
Param
.
put
(
"redShowNum"
,
10
);
Amount
Param
.
put
(
"guessMinNum"
,
1
);
update
Param
.
put
(
"guessMinNum"
,
1
);
Amount
Param
.
put
(
"guessMaxNum"
,
10
);
update
Param
.
put
(
"guessMaxNum"
,
10
);
Amount
Param
.
put
(
"guessLeastTime"
,
4
);
update
Param
.
put
(
"guessLeastTime"
,
4
);
Amount
Param
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
update
Param
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
Response
response
=
network
.
postResponse
(
Amount
Param
,
BasicConfig
.
MOBILE_saveOrUpdate
);
Response
response
=
network
.
postResponse
(
update
Param
,
BasicConfig
.
MOBILE_saveOrUpdate
);
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
(
Amount
Param
,
BasicConfig
.
MOBILE_saveOrUpdate
,
"直播前编辑猜数字红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
update
Param
,
BasicConfig
.
MOBILE_saveOrUpdate
,
"直播前编辑猜数字红包失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -207,13 +207,13 @@ public class ManagerGuess implements AdminAuthorization {
...
@@ -207,13 +207,13 @@ public class ManagerGuess implements AdminAuthorization {
@Test
(
description
=
"直播前删除猜数字红包"
,
priority
=
12
)
@Test
(
description
=
"直播前删除猜数字红包"
,
priority
=
12
)
public
void
直播前删除猜数字红包
()
{
public
void
直播前删除猜数字红包
()
{
adminAuth
();
adminAuth
();
Map
<
String
,
Object
>
de
tai
lParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
delParam
=
new
HashMap
<>();
de
tai
lParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
delParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
de
tai
lParam
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
delParam
.
put
(
"confId"
,
this
.
confid
.
get
(
0
).
getConfId
());
Response
response
=
network
.
postResponse
(
de
tai
lParam
,
BasicConfig
.
MOBILE_delete
);
Response
response
=
network
.
postResponse
(
delParam
,
BasicConfig
.
MOBILE_delete
);
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
(
de
tai
lParam
,
BasicConfig
.
MOBILE_delete
,
"直播前删除猜数字红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
delParam
,
BasicConfig
.
MOBILE_delete
,
"直播前删除猜数字红包失败"
,
response
.
body
().
asString
()));
}
}
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
973f688d
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/lottery/TreasureTime.java
View file @
973f688d
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/manager/Share.java
0 → 100644
View file @
973f688d
package
com
.
kjj
.
cases
.
live
.
manager
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
Share
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"新增常规小程序分享"
,
priority
=
1
)
public
void
新增常规小程序分享
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"mpShareUrl"
,
"//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg"
);
saveParam
.
put
(
"mpShareTitle"
,
"「{{welfareName}}」常规分享文案{{name}}"
);
saveParam
.
put
(
"shareType"
,
1
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MOBILE_info
,
"新增常规小程序分享失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"新增红包小程序分享"
,
priority
=
2
)
public
void
新增红包宝箱小程序分享
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"mpShareUrl"
,
"//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg"
);
saveParam
.
put
(
"mpShareTitle"
,
"「{{welfareName}}」红包分享文案{{name}}"
);
saveParam
.
put
(
"shareType"
,
2
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MOBILE_info
,
"新增红包小程序分享失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"新增直播宝箱小程序分享"
,
priority
=
3
)
public
void
新增直播宝箱小程序分享
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"mpShareUrl"
,
"//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg"
);
saveParam
.
put
(
"mpShareTitle"
,
"「{{welfareName}}」宝箱裂变分享文案{{name}}"
);
saveParam
.
put
(
"shareType"
,
4
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MOBILE_info
,
"新增直播宝箱小程序分享失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"新增猜数红包小程序分享"
,
priority
=
4
)
public
void
新增猜数红包小程序分享
()
{
Map
<
String
,
Object
>
saveParam
=
new
HashMap
<>();
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"mpShareUrl"
,
"//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg"
);
saveParam
.
put
(
"mpShareTitle"
,
"「{{welfareName}}」猜数字红包分享文案{{name}}"
);
saveParam
.
put
(
"shareType"
,
5
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveOrUpdateMpShare
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MOBILE_info
,
"新增猜数红包小程序分享失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/TreasureTime.java
View file @
973f688d
...
@@ -47,35 +47,35 @@ public class TreasureTime implements AdminAuthorization {
...
@@ -47,35 +47,35 @@ public class TreasureTime implements AdminAuthorization {
TreasureCode
treasureCode
=
new
TreasureCode
();
TreasureCode
treasureCode
=
new
TreasureCode
();
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setMaxNum
(
null
);
treasureCode
.
setMaxNum
(
0
);
treasureCode
.
setRuleType
(
1
);
treasureCode
.
setRuleType
(
1
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
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
,
"
第一轮宝箱时长配置失败
"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_update1
,
"
停留时长1分钟固定抽奖码
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取第
一
轮宝箱配置详情"
,
priority
=
3
)
@Test
(
description
=
"获取第
1
轮宝箱配置详情"
,
priority
=
3
)
public
void
获取第
一
轮宝箱配置详情
()
{
public
void
获取第
1
轮宝箱配置详情
()
{
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
0
).
getTreasureConfId
());
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
0
).
getTreasureConfId
());
Response
response
=
network
.
getResponse
(
detailParam
,
BasicConfig
.
MANAGER_detail1
);
Response
response
=
network
.
getResponse
(
detailParam
,
BasicConfig
.
MANAGER_detail1
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
detailParam
,
BasicConfig
.
MANAGER_detail1
,
"获取第
一
轮宝箱配置详情失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
detailParam
,
BasicConfig
.
MANAGER_detail1
,
"获取第
1
轮宝箱配置详情失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"停留时长2分钟
随机抽奖码
"
,
priority
=
4
)
@Test
(
description
=
"停留时长2分钟
现金红包
"
,
priority
=
4
)
public
void
停留时长
2
分钟
随机抽奖码
()
{
public
void
停留时长
2
分钟
现金红包
()
{
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
1
).
getTreasureConfId
());
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
1
).
getTreasureConfId
());
updateParam
.
put
(
"boxConfType"
,
1
);
updateParam
.
put
(
"boxConfType"
,
2
);
updateParam
.
put
(
"openCondition"
,
2
);
updateParam
.
put
(
"openCondition"
,
2
);
TreasureCode
treasureCode
=
new
TreasureCode
();
TreasureCode
treasureCode
=
new
TreasureCode
();
...
@@ -84,30 +84,53 @@ public class TreasureTime implements AdminAuthorization {
...
@@ -84,30 +84,53 @@ public class TreasureTime implements AdminAuthorization {
treasureCode
.
setRuleType
(
2
);
treasureCode
.
setRuleType
(
2
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
TreasureRed
treasureRed
=
new
TreasureRed
();
treasureRed
.
setRedTotalAmount
(
100
);
treasureRed
.
setRuleType
(
1
);
treasureRed
.
setTotalNum
(
1
);
treasureRed
.
setFixedNum
(
30
);
updateParam
.
put
(
"treasureRed"
,
treasureRed
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
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
,
"
第二轮宝箱时长
配置失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_update1
,
"
停留时长2分钟现金红包
配置失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取第
二
轮宝箱配置详情"
,
priority
=
5
)
@Test
(
description
=
"获取第
2
轮宝箱配置详情"
,
priority
=
5
)
public
void
获取第
二
轮宝箱配置详情
()
{
public
void
获取第
2
轮宝箱配置详情
()
{
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
1
).
getTreasureConfId
());
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
1
).
getTreasureConfId
());
Response
response
=
network
.
getResponse
(
detailParam
,
BasicConfig
.
MANAGER_detail1
);
Response
response
=
network
.
getResponse
(
detailParam
,
BasicConfig
.
MANAGER_detail1
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
detailParam
,
BasicConfig
.
MANAGER_detail1
,
"获取第二轮宝箱配置详情失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
detailParam
,
BasicConfig
.
MANAGER_detail1
,
"获取第2轮宝箱配置详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询奖品列表"
,
priority
=
6
)
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
=
"停留时长3分钟
随机抽奖码"
,
priority
=
6
)
@Test
(
description
=
"停留时长3分钟
实物奖品"
,
priority
=
7
)
public
void
停留时长
3
分钟
随机抽奖码
()
{
public
void
停留时长
3
分钟
实物奖品
()
{
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
2
).
getTreasureConfId
());
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
2
).
getTreasureConfId
());
updateParam
.
put
(
"boxConfType"
,
1
);
updateParam
.
put
(
"boxConfType"
,
3
);
updateParam
.
put
(
"openCondition"
,
3
);
updateParam
.
put
(
"openCondition"
,
3
);
TreasureCode
treasureCode
=
new
TreasureCode
();
TreasureCode
treasureCode
=
new
TreasureCode
();
...
@@ -116,22 +139,23 @@ public class TreasureTime implements AdminAuthorization {
...
@@ -116,22 +139,23 @@ public class TreasureTime implements AdminAuthorization {
treasureCode
.
setRuleType
(
1
);
treasureCode
.
setRuleType
(
1
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
TreasureRed
treasureRed
=
new
TreasureRed
();
TreasureAward
treasureAward
=
new
TreasureAward
();
treasureRed
.
setRedTotalAmount
(
100
);
treasureAward
.
setAwardName
(
"萌娃锦鲤"
);
treasureRed
.
setRuleType
(
1
);
treasureAward
.
setBizConfId
(
0
);
treasureRed
.
setTotalNum
(
3
);
treasureAward
.
setIsLimit
(
2
);
treasureRed
.
setFixedNum
(
30
);
treasureAward
.
setTotalNum
(
1
);
updateParam
.
put
(
"treasureRed"
,
treasureRed
);
treasureAward
.
setWelfareId
(
this
.
id
.
get
(
5
).
getId
());
updateParam
.
put
(
"treasureAward"
,
treasureAward
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
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
,
"第
三
轮宝箱时长配置失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_update1
,
"第
3
轮宝箱时长配置失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"获取第三轮宝箱配置详情"
,
priority
=
7
)
@Test
(
description
=
"获取第三轮宝箱配置详情"
,
priority
=
8
)
public
void
获取第三轮宝箱配置详情
()
{
public
void
获取第三轮宝箱配置详情
()
{
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
detailParam
=
new
HashMap
<>();
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
2
).
getTreasureConfId
());
detailParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
2
).
getTreasureConfId
());
...
@@ -142,39 +166,20 @@ public class TreasureTime implements AdminAuthorization {
...
@@ -142,39 +166,20 @@ public class TreasureTime implements AdminAuthorization {
}
}
@Test
(
description
=
"查询奖品列表"
,
priority
=
8
)
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
=
"停留时长4分钟随机抽奖码"
,
priority
=
9
)
@Test
(
description
=
"停留时长4分钟随机抽奖码"
,
priority
=
9
)
public
void
停留时长
4
分钟随机抽奖码
()
{
public
void
停留时长
4
分钟随机抽奖码
()
{
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
3
).
getTreasureConfId
());
updateParam
.
put
(
"treasureConfId"
,
this
.
ConfId
.
get
(
3
).
getTreasureConfId
());
updateParam
.
put
(
"boxConfType"
,
1
);
updateParam
.
put
(
"boxConfType"
,
1
);
updateParam
.
put
(
"openCondition"
,
3
);
updateParam
.
put
(
"openCondition"
,
4
);
TreasureCode
treasureCode
=
new
TreasureCode
();
TreasureCode
treasureCode
=
new
TreasureCode
();
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setFixedNum
(
1
);
treasureCode
.
setMaxNum
(
6
);
treasureCode
.
setMaxNum
(
6
);
treasureCode
.
setRuleType
(
1
);
treasureCode
.
setRuleType
(
2
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
updateParam
.
put
(
"treasureCode"
,
treasureCode
);
TreasureAward
treasureAward
=
new
TreasureAward
();
treasureAward
.
setWelfareId
(
this
.
id
.
get
(
5
).
getId
());
treasureAward
.
setTotalNum
(-
1
);
updateParam
.
put
(
"treasureAward"
,
treasureAward
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_update1
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
src/test/java/com/kjj/cases/live/red/Limited.java
View file @
973f688d
...
@@ -212,9 +212,7 @@ public class Limited implements AdminAuthorization {
...
@@ -212,9 +212,7 @@ public class Limited implements AdminAuthorization {
boolean
openResult
=
response
.
jsonPath
().
getBoolean
(
"data.openResult"
);
boolean
openResult
=
response
.
jsonPath
().
getBoolean
(
"data.openResult"
);
System
.
out
.
println
(
openResult
);
System
.
out
.
println
(
openResult
);
Assert
.
assertTrue
(
openResult
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipate
,
"参与失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
openResult
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipate
,
"参与失败"
,
response
.
body
().
asString
()));
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data.result"
);
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data.result"
);
System
.
out
.
println
(
result
);
System
.
out
.
println
(
result
);
System
.
out
.
println
(
"访客A领取答题红包_答题正确 timestamp:"
+
new
Date
().
getTime
());
System
.
out
.
println
(
"访客A领取答题红包_答题正确 timestamp:"
+
new
Date
().
getTime
());
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipate
,
"答题失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_QuesParticipate
,
"答题失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
View file @
973f688d
...
@@ -318,8 +318,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -318,8 +318,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*访客端-访客A获取直播间参数-getShareSign*/
/*访客端-访客A获取直播间参数-getShareSign*/
@Test
(
description
=
"访客
A
获取直播间参数"
,
priority
=
19
)
@Test
(
description
=
"访客
H
获取直播间参数"
,
priority
=
19
)
public
void
访客
A
获取直播间参数
()
public
void
访客
H
获取直播间参数
()
{
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -334,8 +334,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -334,8 +334,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*访客端-访客B查询被助力者访客A的信息*/
/*访客端-访客B查询被助力者访客A的信息*/
@Test
(
description
=
"访客
B查询被助力者访客A
的信息"
,
priority
=
20
)
@Test
(
description
=
"访客
I查询被助力者访客H
的信息"
,
priority
=
20
)
public
void
访客
B
查询被助力者访客
A
的信息
()
public
void
访客
I
查询被助力者访客
H
的信息
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -348,23 +348,25 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -348,23 +348,25 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*访客端-访客B帮访客A助力*/
/*访客端-访客B帮访客A助力*/
@Test
(
description
=
"访客
B帮访客A
助力"
,
priority
=
21
)
@Test
(
description
=
"访客
I帮访客H
助力"
,
priority
=
21
)
public
void
访客
B
帮访客
A
助力
()
public
void
访客
I
帮访客
H
助力
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
ThreadSleepUtils
.
sleep
(
2000
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Map
<
String
,
Object
>
assistParam
=
new
HashMap
<>();
params
.
put
(
"shareSign"
,
red_sharesign
);
assistParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confRedPacketId"
,
confId_Red
);
assistParam
.
put
(
"shareSign"
,
red_sharesign
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_RedLuckHelp
);
assistParam
.
put
(
"shareType"
,
5
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"success"
);
assistParam
.
put
(
"confId"
,
confId_Red
);
System
.
out
.
println
(
JSON
.
toJSONString
(
data
));
Response
response
=
network
.
postResponse
(
assistParam
,
BasicConfig
.
MOBILE_assist
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_RedLuckHelp
,
"帮好友助力失败"
,
response
.
body
().
asString
()));
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
}
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客D给访客B助力失败"
,
response
.
body
().
asString
()));
}
/*访客端-访客B获取直播间参数-getShareSign*/
/*访客端-访客B获取直播间参数-getShareSign*/
@Test
(
description
=
"访客
B
获取直播间参数"
,
priority
=
22
)
@Test
(
description
=
"访客
I
获取直播间参数"
,
priority
=
22
)
public
void
访客
B
获取直播间参数
()
public
void
访客
I
获取直播间参数
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -378,9 +380,9 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -378,9 +380,9 @@ public class LiveVistorRed implements AdminAuthorization {
Assert
.
assertNotNull
(
red_sharesign
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_GETSHARESIGN
,
"获取直播间参数失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
red_sharesign
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_GETSHARESIGN
,
"获取直播间参数失败"
,
response
.
body
().
asString
()));
}
}
/*访客端-访客A查询被助力者访客B的信息*/
@Test
(
description
=
"访客
A查询被助力者访客B
的信息"
,
priority
=
23
)
@Test
(
description
=
"访客
H查询被助力者访客I
的信息"
,
priority
=
23
)
public
void
访客
A
查询被助力者访客
B
的信息
()
public
void
访客
H
查询被助力者访客
I
的信息
()
{
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -393,21 +395,22 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -393,21 +395,22 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*访客端-访客A帮访客B助力*/
/*访客端-访客A帮访客B助力*/
@Test
(
description
=
"访客
A帮访客B
助力"
,
priority
=
24
)
@Test
(
description
=
"访客
H帮访客I
助力"
,
priority
=
24
)
public
void
访客
A
帮访客
B
助力
()
public
void
访客
H
帮访客
I
助力
()
{
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
ThreadSleepUtils
.
sleep
(
2000
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Map
<
String
,
Object
>
assistParam
=
new
HashMap
<>();
params
.
put
(
"shareSign"
,
red_sharesign
);
assistParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confRedPacketId"
,
confId_Red
);
assistParam
.
put
(
"shareSign"
,
red_sharesign
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_RedLuckHelp
);
assistParam
.
put
(
"shareType"
,
5
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"success"
);
assistParam
.
put
(
"confId"
,
confId_Red
);
System
.
out
.
println
(
JSON
.
toJSONString
(
data
));
Response
response
=
network
.
postResponse
(
assistParam
,
BasicConfig
.
MOBILE_assist
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_RedLuckHelp
,
"帮好友助力失败"
,
response
.
body
().
asString
()));
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
assistParam
,
BasicConfig
.
MOBILE_assist
,
"访客D给访客B助力失败"
,
response
.
body
().
asString
()));
}
}
/*被助力者A-手气王助力详情信息查询*/
/*被助力者A-手气王助力详情信息查询*/
@Test
(
description
=
"红包详情助力信息"
,
priority
=
25
)
@Test
(
description
=
"红包详情助力信息"
,
priority
=
25
)
public
void
红包详情助力信息
()
public
void
红包详情助力信息
()
...
@@ -423,8 +426,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -423,8 +426,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*被助力者B-手气王助力详情信息查询*/
/*被助力者B-手气王助力详情信息查询*/
@Test
(
description
=
"被助力者
B
-红包详情助力信息"
,
priority
=
26
)
@Test
(
description
=
"被助力者
I
-红包详情助力信息"
,
priority
=
26
)
public
void
被助力者
B
红包详情助力信息
()
public
void
被助力者
I
红包详情助力信息
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -464,8 +467,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -464,8 +467,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*查询访客端访客B红包状态*/
/*查询访客端访客B红包状态*/
@Test
(
description
=
"查询访客端访客
B
红包状态"
,
priority
=
29
)
@Test
(
description
=
"查询访客端访客
I
红包状态"
,
priority
=
29
)
public
void
查询访客端访客
B
红包状态
()
public
void
查询访客端访客
I
红包状态
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -478,8 +481,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -478,8 +481,8 @@ public class LiveVistorRed implements AdminAuthorization {
/*访客A开手气王红包*/
/*访客A开手气王红包*/
@Test
(
description
=
"访客
A
开手气王红包"
,
priority
=
30
)
@Test
(
description
=
"访客
H
开手气王红包"
,
priority
=
30
)
public
void
访客
A
开手气王红包
()
public
void
访客
H
开手气王红包
()
{
{
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
63000
);
ThreadSleepUtils
.
sleep
(
63000
);
...
@@ -493,8 +496,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -493,8 +496,8 @@ public class LiveVistorRed implements AdminAuthorization {
}
}
/*访客B开手气王红包*/
/*访客B开手气王红包*/
@Test
(
description
=
"访客
B
开手气王红包"
,
priority
=
31
)
@Test
(
description
=
"访客
I
开手气王红包"
,
priority
=
31
)
public
void
访客
B
开手气王红包
()
public
void
访客
I
开手气王红包
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -567,8 +570,8 @@ public class LiveVistorRed implements AdminAuthorization {
...
@@ -567,8 +570,8 @@ public class LiveVistorRed implements AdminAuthorization {
/*访客B领红包轮询结果*/
/*访客B领红包轮询结果*/
@Test
(
description
=
"访客
B
领手气王红包轮询结果"
,
priority
=
36
)
@Test
(
description
=
"访客
I
领手气王红包轮询结果"
,
priority
=
36
)
public
void
访客
B
领手气王红包轮询结果
()
public
void
访客
I
领手气王红包轮询结果
()
{
{
visitorAuth8
();
visitorAuth8
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
src/test/java/com/kjj/cases/live/treasure/Treasure.java
View file @
973f688d
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
973f688d
...
@@ -38,18 +38,25 @@ public class BasicConfig {
...
@@ -38,18 +38,25 @@ public class BasicConfig {
public
static
String
VISITORKEY11
=
"LEH7epeHVDJWzhZ6DiexTHnsaP1qQtqg4bchCs73vvVo9tdZjkmmjNMWkCsgrygU4cJaXfwzr7j51EK9Xcxdt2YdXnQjU"
;
public
static
String
VISITORKEY11
=
"LEH7epeHVDJWzhZ6DiexTHnsaP1qQtqg4bchCs73vvVo9tdZjkmmjNMWkCsgrygU4cJaXfwzr7j51EK9Xcxdt2YdXnQjU"
;
//直播访客 (饺子)ID:97
//直播访客 (饺子)ID:97
public
static
String
VISITORKEY12
=
"5MgSyboxqzAQZZJEsTf43nVX38FgyAUo2fAxaP2wGJUTHcnhCNQ6xm4rZ8nMSjRk2BTsYwRhe1kABXuFmTA7JsepCEpa"
;
public
static
String
VISITORKEY12
=
"5MgSyboxqzAQZZJEsTf43nVX38FgyAUo2fAxaP2wGJUTHcnhCNQ6xm4rZ8nMSjRk2BTsYwRhe1kABXuFmTA7JsepCEpa"
;
//直播访客 (大妹子
保险)ID:102
//直播访客 (大妹子
)ID:299
public
static
String
VISITORKEY13
=
"LEH7epeHVDJWzhZ6DiexTHnsa
P1qN9UZzYqpqzJA2Rdew611Z1Jx5JYQdByks4WNm9sPEYEcPjPWGB332v28BWjXfbFH
f"
;
public
static
String
VISITORKEY13
=
"LEH7epeHVDJWzhZ6DiexTHnsa
N9w9oWNN5DjmEBUV6rxQBX1gPqEDy6fBAMhJF4ZNUHR681CqgJaAwkQttsd8aB5WdCD
f"
;
//直播访客 (光头强)ID:
173
//直播访客 (光头强)ID:
540
public
static
String
VISITORKEY14
=
"LEH7epeHVDJWzhZ6DiexTHnsa
P1qN9UaB5Y7kQYL8TWRUMmAdzUP34yhV8w3PVg4uV5rxYeuetNdSU1HkUJ84QzXYYSF1
"
;
public
static
String
VISITORKEY14
=
"LEH7epeHVDJWzhZ6DiexTHnsa
N9w9oWNUSEzLEnhXW7GvsDSbF1XDBJeeBRLp1u37nEXDs6aRhV7i8uxwJSKdaMFDutDp
"
;
//直播访客 (少侠)ID:7
9
//直播访客 (少侠)ID:7
88
public
static
String
VISITORKEY15
=
"
5MgSyboxqzAQZZJEsTf43nVX38FgxYNfSo46ZMTRoniw9Rwh4vcC4373uQZR8B4f7re8nYAH3ePzUamTSWp57TLkhYGM
"
;
public
static
String
VISITORKEY15
=
"
LEH7epeHVDJWzhZ6DiexTHnsaN9w9oWNQGsjS7kCzWj4MRh8UEgj65qMf774qQKtXQCskA56o29SkFTd6Zvc82mKjQ2P1
"
;
//直播访客 (抬头有飞碟)ID:99
//直播访客 (抬头有飞碟)ID:99
public
static
String
VISITORKEY16
=
"5MgSyboxqzAQZZJEsTf43nVX38FgxYNfT62QtXBfd44D2QpfhS1MHjzggYiRmLtzAqHLps4SB7m5PsqQQYkjS7hcPHSu"
;
public
static
String
VISITORKEY16
=
"5MgSyboxqzAQZZJEsTf43nVX38FgxYNfT62QtXBfd44D2QpfhS1MHjzggYiRmLtzAqHLps4SB7m5PsqQQYkjS7hcPHSu"
;
//直播访客 (枫城)ID:77
//直播访客 (枫城)ID:77
public
static
String
VISITORKEY17
=
"5MgSyboxqzAQZZJEsTf43nVX38FgxYNfR7C5mkWn1EaJAymDPCSQyz3eaqsq7Wn47NU1cUqKXMHSEEbHfhXiv9Bq6XCc"
;
public
static
String
VISITORKEY17
=
"5MgSyboxqzAQZZJEsTf43nVX38FgxYNfR7C5mkWn1EaJAymDPCSQyz3eaqsq7Wn47NU1cUqKXMHSEEbHfhXiv9Bq6XCc"
;
//直播访客 (小老弟来了)ID:94
//直播访客 (小老弟来了)ID:726
public
static
String
VISITORKEY18
=
"5MgSyboxqzAQZZJEsTf43nVX38FgxYNfQ9pD69dnWxFV6NvpU2hiZ9J5kVEeFYdcviUxqNs5i37hvQEzCtzqhr7ywbwq"
;
public
static
String
VISITORKEY18
=
"LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXAbLLH4y37kY1Bh1zjcGqq8H65TzBAApa8c4h8PYXwogLPa8swFPNEpBqgqBRPH"
;
//直播访客 (林国芸)ID:786
public
static
String
visitorAuth19
=
"LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXAUTTB6fYfPQ57LstgL84LnTWTZRadaM23vPXd7x2Q8Dos7RdCpWYg9AcJeUDz5"
;
//直播访客 (孙心桂)ID:785
public
static
String
visitorAuth20
=
"LEH7epeHVDJWzhZ6DiexTHnsaN9w9oXATWauEgZhrnVmFDGYrbyvfbCiHrAsmpMp7LRpUYvHTCCVYrfQJZZZeAGXs5q9B"
;
//直播访客 (谢翊美)ID:791
public
static
String
visitorAuth21
=
"LEH7epeHVDJWzhZ6DiexTHnsaN9w9oX4LYmRiH4EYLayw7oTtnaZ4YpLUcVaMTnAUuz5jSPcnRQgDm7R2XRS6AQgJqtta"
;
//***********************************************************************
//***********************************************************************
// 基础线代理人 TKU
// 基础线代理人 TKU
...
@@ -91,13 +98,26 @@ public class BasicConfig {
...
@@ -91,13 +98,26 @@ public class BasicConfig {
public
static
final
String
MANAGER_detail_1
=
MANAGER_HOST
+
"/kjy/manager/red/guess/detail"
;
public
static
final
String
MANAGER_detail_1
=
MANAGER_HOST
+
"/kjy/manager/red/guess/detail"
;
public
static
final
String
MANAGER_del_1
=
MANAGER_HOST
+
"/kjy/manager/red/guess/delete"
;
public
static
final
String
MANAGER_del_1
=
MANAGER_HOST
+
"/kjy/manager/red/guess/delete"
;
//助播端
public
static
final
String
MOBILE_guessList
=
MOBILE_HOST
+
"/conf/live/red/guess/list"
;
public
static
final
String
MOBILE_saveOrUpdate2
=
MOBILE_HOST
+
"/conf/live/red/guess/saveOrUpdate"
;
public
static
final
String
MOBILE_detail1
=
MOBILE_HOST
+
"/conf/live/red/guess/detail"
;
public
static
final
String
MOBILE_startOrEnd
=
MOBILE_HOST
+
"/conf/live/red/guess/startOrEnd"
;
public
static
final
String
MOBILE_saveOrUpdate
=
MOBILE_HOST
+
"/conf/pre/red/guess/saveOrUpdate"
;
public
static
final
String
MOBILE_saveOrUpdate
=
MOBILE_HOST
+
"/conf/pre/red/guess/saveOrUpdate"
;
public
static
final
String
MOBILE_findDetail
=
MOBILE_HOST
+
"/conf/pre/red/findDetail"
;
public
static
final
String
MOBILE_findDetail
=
MOBILE_HOST
+
"/conf/pre/red/findDetail"
;
public
static
final
String
MOBILE_list
=
MOBILE_HOST
+
"/conf/pre/red/guess/list"
;
public
static
final
String
MOBILE_list
=
MOBILE_HOST
+
"/conf/pre/red/guess/list"
;
public
static
final
String
MOBILE_detail
=
MOBILE_HOST
+
"/conf/pre/red/guess/detail"
;
public
static
final
String
MOBILE_detail
=
MOBILE_HOST
+
"/conf/pre/red/guess/detail"
;
public
static
final
String
MOBILE_delete
=
MOBILE_HOST
+
"/conf/pre/red/guess/delete"
;
public
static
final
String
MOBILE_delete
=
MOBILE_HOST
+
"/conf/pre/red/guess/delete"
;
public
static
final
String
MOBILE_confDetail
=
MOBILE_HOST
+
"/clue/guess/number/red/confDetail"
;
public
static
final
String
MOBILE_userDetail
=
MOBILE_HOST
+
"/clue/guess/number/red/userDetail"
;
public
static
final
String
MOBILE_guess
=
MOBILE_HOST
+
"/clue/guess/number/red/guess"
;
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 MOBILE_ = MOBILE_HOST + "";
// public static final String MOBILE_ = MOBILE_HOST + "";
// public static final String MOBILE_ = MOBILE_HOST + "";
// *************** 宝箱裂变 ***************
// *************** 宝箱裂变 ***************
public
static
final
String
MANAGER_getList4Admin
=
MANAGER_HOST
+
"/kjy/manager/welfare/pre/conf/getList4Admin"
;
public
static
final
String
MANAGER_getList4Admin
=
MANAGER_HOST
+
"/kjy/manager/welfare/pre/conf/getList4Admin"
;
...
@@ -114,10 +134,25 @@ public class BasicConfig {
...
@@ -114,10 +134,25 @@ public class BasicConfig {
public
static
final
String
MANAGER_participateList
=
MOBILE_HOST
+
"/kjy/live/treasure/participateList"
;
public
static
final
String
MANAGER_participateList
=
MOBILE_HOST
+
"/kjy/live/treasure/participateList"
;
// *************** 宝箱停留时长 ***************
// *************** 助力分享 ***************
public
static
final
String
MOBILE_sign
=
MOBILE_HOST
+
"/kjy/live/share/help/sign"
;
public
static
final
String
MOBILE_simple
=
MOBILE_HOST
+
"/kjy/live/help/simple"
;
public
static
final
String
MOBILE_info
=
MOBILE_HOST
+
"/kjy/live/help/info"
;
public
static
final
String
MOBILE_helpInfo
=
MOBILE_HOST
+
"/kjy/live/share/help/info"
;
public
static
final
String
MOBILE_assist
=
MOBILE_HOST
+
"/kjy/live/help/assist"
;
// *************** 时长宝箱 ***************
public
static
final
String
MANAGER_list1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/list"
;
public
static
final
String
MANAGER_list1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/list"
;
public
static
final
String
MANAGER_detail1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/detail"
;
public
static
final
String
MANAGER_detail1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/detail"
;
public
static
final
String
MANAGER_update1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/update"
;
public
static
final
String
MANAGER_update1
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/update"
;
public
static
final
String
MOBILE_timeDetail
=
MOBILE_HOST
+
"/kjy/live/treasure/time/detail"
;
public
static
final
String
MOBILE_joinDetail
=
MOBILE_HOST
+
"/kjy/live/treasure/time/joinDetail/simple"
;
public
static
final
String
MOBILE_finish
=
MOBILE_HOST
+
"/kjy/live/treasure/time/finish"
;
public
static
final
String
MOBILE_joinDetail1
=
MOBILE_HOST
+
"/kjy/live/treasure/time/joinDetail"
;
public
static
final
String
MOBILE_treasureOpen
=
MOBILE_HOST
+
"/kjy/live/treasure/time/open"
;
public
static
final
String
MOBILE_joinResult
=
MOBILE_HOST
+
"/kjy/live/treasure/time/joinResult"
;
// *************** 代理人指定中奖 ***************
// *************** 代理人指定中奖 ***************
...
@@ -190,9 +225,11 @@ public class BasicConfig {
...
@@ -190,9 +225,11 @@ public class BasicConfig {
public
static
final
String
MANAGER_rewardList
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/list"
;
public
static
final
String
MANAGER_rewardList
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/list"
;
public
static
final
String
MANAGER_delete
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/delete"
;
public
static
final
String
MANAGER_delete
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/delete"
;
public
static
final
String
MANAGER_update
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/update"
;
public
static
final
String
MANAGER_update
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/update"
;
public
static
final
String
MANAGER_TreasureBenefits
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/list"
;
public
static
final
String
MANAGER_TreasureDetail
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/detail"
;
//小程序分享
public
static
final
String
MANAGER_TreasureConUpdate
=
MANAGER_HOST
+
"/kjy/manager/treasure/time/conf/update"
;
public
static
final
String
MANAGER_saveOrUpdateMpShare
=
MANAGER_HOST
+
"/kjy/manager/live/share/saveOrUpdateMpShare"
;
public
static
final
String
MANAGER_
=
MANAGER_HOST
+
""
;
// public static final String MANAGER_ = MANAGER_HOST + "";
// *************** 代理人 ***************
// *************** 代理人 ***************
//代理人列表//
//代理人列表//
...
@@ -238,6 +275,8 @@ public class BasicConfig {
...
@@ -238,6 +275,8 @@ public class BasicConfig {
public
static
final
String
MOBILE_Code
=
MOBILE_HOST
+
"/clue/invitation/code"
;
public
static
final
String
MOBILE_Code
=
MOBILE_HOST
+
"/clue/invitation/code"
;
public
static
final
String
MOBILE_MyLotteryCode
=
MOBILE_HOST
+
"/kjy/live/lottery/myLotteryCode"
;
public
static
final
String
MOBILE_MyLotteryCode
=
MOBILE_HOST
+
"/kjy/live/lottery/myLotteryCode"
;
//投票
//投票
public
static
final
String
MOBILE_ChoiceCurrentDetail
=
MOBILE_HOST
+
"/conf/live/choice/currentDetail"
;
public
static
final
String
MOBILE_ChoiceCurrentDetail
=
MOBILE_HOST
+
"/conf/live/choice/currentDetail"
;
public
static
final
String
MOBILE_AddChoice
=
MOBILE_HOST
+
"/conf/live/choice/addChoice"
;
public
static
final
String
MOBILE_AddChoice
=
MOBILE_HOST
+
"/conf/live/choice/addChoice"
;
...
...
src/test/java/com/kjj/utils/JsonUtil.java
View file @
973f688d
...
@@ -3,6 +3,7 @@ package com.kjj.utils;
...
@@ -3,6 +3,7 @@ package com.kjj.utils;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.bean.manager.GuessList
;
import
groovy.json.JsonBuilder
;
import
groovy.json.JsonBuilder
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
...
...
src/test/liveTestNG.xml
View file @
973f688d
...
@@ -19,6 +19,12 @@
...
@@ -19,6 +19,12 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"小程序分享"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.Share"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"获取抽奖码校验"
>
<test
preserve-order=
"true"
name=
"获取抽奖码校验"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.LotteryCode.LotteryCode"
/>
<class
name=
"com.kjj.cases.live.LotteryCode.LotteryCode"
/>
...
@@ -37,7 +43,6 @@
...
@@ -37,7 +43,6 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"宝箱时长"
>
<test
preserve-order=
"true"
name=
"宝箱时长"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.manager.TreasureTime"
/>
<class
name=
"com.kjj.cases.live.manager.TreasureTime"
/>
...
@@ -102,6 +107,7 @@
...
@@ -102,6 +107,7 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"助播-开启直播"
>
<test
preserve-order=
"true"
name=
"助播-开启直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.anchor.OpenLive"
/>
<class
name=
"com.kjj.cases.live.anchor.OpenLive"
/>
...
@@ -119,6 +125,13 @@
...
@@ -119,6 +125,13 @@
<class
name=
"com.kjj.cases.live.lottery.Lottery"
/>
<class
name=
"com.kjj.cases.live.lottery.Lottery"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"猜数字红包"
>
<classes>
<class
name=
"com.kjj.cases.live.guess.LiveGuess"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"免费领福利"
>
<test
preserve-order=
"true"
name=
"免费领福利"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.FreeReward.FreeReward"
/>
<class
name=
"com.kjj.cases.live.FreeReward.FreeReward"
/>
...
@@ -171,6 +184,12 @@
...
@@ -171,6 +184,12 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"直播中时长宝箱"
>
<classes>
<class
name=
"com.kjj.cases.live.lottery.TreasureTime"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.anchor.CloseLive"
/>
<class
name=
"com.kjj.cases.live.anchor.CloseLive"
/>
...
...
test-output/report.html
View file @
973f688d
This diff is collapsed.
Click to expand it.
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