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
7b95cd47
Commit
7b95cd47
authored
Apr 27, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
奖品签收
parent
13fe04ee
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1195 additions
and
233 deletions
+1195
-233
QuseRewardList.java
src/test/java/com/kjj/bean/answer/QuseRewardList.java
+1
-1
AdminAuthorization.java
...est/java/com/kjj/cases/live/admin/AdminAuthorization.java
+2
-2
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+73
-0
Add.java
src/test/java/com/kjj/cases/live/manager/QuesReward/Add.java
+268
-0
TeamAssignment.java
...com/kjj/cases/live/manager/QuesReward/TeamAssignment.java
+7
-7
Unlimited.java
...java/com/kjj/cases/live/manager/QuesReward/Unlimited.java
+32
-2
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
+1
-212
Limited.java
src/test/java/com/kjj/cases/live/red/Limited.java
+527
-0
Unlimited.java
src/test/java/com/kjj/cases/live/red/Unlimited.java
+251
-0
User.java
src/test/java/com/kjj/cases/live/user/User.java
+4
-0
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-2
liveTestNG.xml
src/test/liveTestNG.xml
+27
-7
No files found.
src/test/java/com/kjj/bean/answer/QuseRewardList.java
View file @
7b95cd47
...
...
@@ -7,7 +7,7 @@ import java.util.List;
@Data
public
class
QuseRewardList
{
private
List
<
QuesList
>
list
;
private
List
<
Qu
seRewardList
.
Qu
esList
>
list
;
@Data
public
static
class
QuesList
{
private
String
quesConfId
;
...
...
src/test/java/com/kjj/cases/live/admin/AdminAuthorization.java
View file @
7b95cd47
...
...
@@ -27,7 +27,7 @@ public interface AdminAuthorization {
}
/**
* 访客A(
嘿保险)授权,代理人指定中奖用户 ,ID:907
* 访客A(
志勇)授权,代理人指定中奖用户
*/
default
void
visitorAuth
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY
);
...
...
@@ -89,7 +89,7 @@ public interface AdminAuthorization {
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY8
);
}
/**
* 访客
H(喜洋洋)授权
* 访客
I(嘿保险)授权,ID:907
*/
default
void
visitorAuth9
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY9
);
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
7b95cd47
...
...
@@ -1042,5 +1042,78 @@ public class Lottery implements AdminAuthorization {
}
@Test
(
description
=
"代理人分享直播间"
,
priority
=
74
)
public
void
代理人分享直播间
()
{
agentAuth
();
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
signParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
signParam
.
put
(
"shareType"
,
2
);
Response
signRes
=
network
.
getResponse
(
signParam
,
BasicConfig
.
MOBILE_GETSHARESIGN
);
HashMap
data
=
signRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
this
.
shareSign
=
(
String
)
data
.
get
(
"shareSign"
);
System
.
out
.
println
(
shareSign
);
Assert
.
assertNotNull
(
shareSign
,
network
.
message
(
signParam
,
BasicConfig
.
MOBILE_GETSHARESIGN
,
"分享失败"
,
signRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客H关系绑定"
,
priority
=
75
)
public
void
访客
H
关系绑定
()
{
visitorAuth9
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
bindingParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
bindingParam
.
put
(
"shareSign"
,
shareSign
);
Response
bindingRes
=
network
.
postResponse
(
bindingParam
,
BasicConfig
.
MOBILE_binding
);
boolean
success
=
bindingRes
.
jsonPath
().
getJsonObject
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
bindingParam
,
BasicConfig
.
MOBILE_binding
,
"绑定失败"
,
bindingRes
.
body
().
asString
()));
}
@Test
(
description
=
"中奖任务邀请H绑定结果和绑定凭证"
,
priority
=
76
)
public
void
获取访客
H
绑定结果和绑定凭证
()
{
visitorAuth9
();
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
HashMap
data
=
tokenRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
this
.
token
=
(
String
)
data
.
get
(
"token"
);
System
.
out
.
println
(
token
);
Object
token
=
tokenRes
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
token
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
@Test
(
description
=
"中奖任务邀请H根据绑定凭证发放抽奖码"
,
priority
=
77
)
public
void
中奖任务邀请
H
根据绑定凭证发放抽奖码
()
{
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
500
);
Map
<
String
,
Object
>
codeParam
=
new
HashMap
<>();
codeParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
codeParam
.
put
(
"token"
,
token
);
Response
codeRes
=
network
.
getResponse
(
codeParam
,
BasicConfig
.
MOBILE_Code
);
boolean
success
=
codeRes
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
codeParam
,
BasicConfig
.
MOBILE_Code
,
"发放抽奖码失败"
,
codeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客H到场"
,
priority
=
78
)
public
void
访客
H
到场
()
{
visitorAuth9
();
Map
<
String
,
Object
>
connectSuccessParam
=
new
HashMap
<>();
connectSuccessParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
connectSuccessoRes
=
network
.
getResponse
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
);
boolean
success
=
connectSuccessoRes
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
connectSuccessoRes
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/manager/QuesReward/Add.java
0 → 100644
View file @
7b95cd47
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/manager/QuesReward/TeamAssignment.java
View file @
7b95cd47
...
...
@@ -45,7 +45,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"获取答题按团队分配的团队列表"
,
priority
=
2
)
public
void
获取答题按团队分配的团队列表
()
{
Map
<
String
,
Object
>
TeamParam
=
new
HashMap
<>();
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
TeamParam
.
put
(
"pageIndex"
,
1
);
TeamParam
.
put
(
"pageSize"
,
50
);
Response
response
=
network
.
getResponse
(
TeamParam
,
BasicConfig
.
MANAGER_TeamAssignmentList
);
...
...
@@ -58,7 +58,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"添加团队"
,
priority
=
3
)
public
void
添加团队
()
{
Map
<
String
,
Object
>
addTeamParam
=
new
HashMap
<>();
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
addTeamParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
addTeamParam
.
put
(
"teamIds"
,
Arrays
.
asList
(
3837
,
3324
,
3817
));
Response
response
=
network
.
postResponse
(
addTeamParam
,
BasicConfig
.
MANAGER_addTeam
);
...
...
@@ -72,7 +72,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"获取答题已分配的团队列表"
,
priority
=
4
)
public
void
获取答题已分配的团队列表
()
{
Map
<
String
,
Object
>
TeamParam
=
new
HashMap
<>();
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
TeamParam
.
put
(
"pageIndex"
,
1
);
TeamParam
.
put
(
"pageSize"
,
50
);
Response
response
=
network
.
getResponse
(
TeamParam
,
BasicConfig
.
MANAGER_TeamAssignmentList
);
...
...
@@ -86,7 +86,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"单个团队删除"
,
priority
=
5
)
public
void
单个团队删除
()
{
Map
<
String
,
Object
>
TeamParam
=
new
HashMap
<>();
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
TeamParam
.
put
(
"id"
,
this
.
teamID
.
get
(
0
).
getId
());
Response
response
=
network
.
postResponse
(
TeamParam
,
BasicConfig
.
MANAGER_delTeam
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -98,7 +98,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"一键清空团队"
,
priority
=
6
)
public
void
一键清空团队
()
{
Map
<
String
,
Object
>
TeamParam
=
new
HashMap
<>();
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
TeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
Response
response
=
network
.
postResponse
(
TeamParam
,
BasicConfig
.
MANAGER_deleteAll
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
@@ -109,7 +109,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"添加指定中奖团队"
,
priority
=
7
)
public
void
添加指定中奖团队
()
{
Map
<
String
,
Object
>
addTeamParam
=
new
HashMap
<>();
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
addTeamParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
addTeamParam
.
put
(
"teamIds"
,
Arrays
.
asList
(
3817
));
Response
response
=
network
.
postResponse
(
addTeamParam
,
BasicConfig
.
MANAGER_addTeam
);
...
...
@@ -123,7 +123,7 @@ public class TeamAssignment implements AdminAuthorization {
@Test
(
description
=
"开启团队配置开关"
,
priority
=
8
)
public
void
开启团队配置开关
()
{
Map
<
String
,
Object
>
addTeamParam
=
new
HashMap
<>();
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
1
).
getId
());
addTeamParam
.
put
(
"confId"
,
this
.
ListConfid
.
get
(
2
).
getId
());
Response
response
=
network
.
postResponse
(
addTeamParam
,
BasicConfig
.
MANAGER_updateTeam
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/cases/live/manager/QuesReward/Unlimited.java
View file @
7b95cd47
...
...
@@ -19,7 +19,37 @@ public class Unlimited implements AdminAuthorization {
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"获取有奖答题列表信息"
,
priority
=
1
)
@Test
(
description
=
"修改本场答题规则仅一次中奖"
,
priority
=
1
)
public
void
修改本场答题规则仅一次中奖
()
{
Map
<
String
,
Object
>
updateParam
=
new
HashMap
<>();
updateParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
// updateParam.put("liveId", 2960);
updateParam
.
put
(
"redPacketRuleType"
,
1
);
updateParam
.
put
(
"welfareRuleType"
,
1
);
Response
response
=
network
.
postResponse
(
updateParam
,
BasicConfig
.
MANAGER_updateQuestionPrizesRule
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
updateParam
,
BasicConfig
.
MANAGER_updateQuestionPrizesRule
,
"答题有奖红包规则无限制"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"答题有奖限制中奖1次"
,
priority
=
2
)
public
void
答题有奖限制中奖
1
次
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
getConfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
// getConfParam.put("liveId", 2960);
Response
response
=
network
.
getResponse
(
getConfParam
,
BasicConfig
.
MANAGER_getQuestionPrizesRule
);
Object
redPacketRuleType
=
response
.
jsonPath
().
getJsonObject
(
"data.redPacketRuleType"
);
System
.
out
.
println
(
redPacketRuleType
);
Assert
.
assertEquals
(
redPacketRuleType
,
1
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getQuestionPrizesRule
,
"答题有奖红包限制1次"
,
response
.
body
().
asString
()));
Object
welfareRuleType
=
response
.
jsonPath
().
getJsonObject
(
"data.welfareRuleType"
);
System
.
out
.
println
(
welfareRuleType
);
Assert
.
assertEquals
(
welfareRuleType
,
1
,
network
.
message
(
getConfParam
,
BasicConfig
.
MANAGER_getQuestionPrizesRule
,
"答题有奖红包限制1次"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取有奖答题列表信息"
,
priority
=
3
)
public
void
获取有奖答题列表信息
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
getConfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
@@ -31,7 +61,7 @@ public class Unlimited implements AdminAuthorization {
}
@Test
(
description
=
"本场答题无限制中奖规则"
,
priority
=
2
)
@Test
(
description
=
"本场答题无限制中奖规则"
,
priority
=
4
)
public
void
本场答题无限制中奖规则
()
{
Map
<
String
,
Object
>
getConfParam
=
new
HashMap
<>();
getConfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
View file @
7b95cd47
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/red/Limited.java
0 → 100644
View file @
7b95cd47
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/red/Unlimited.java
0 → 100644
View file @
7b95cd47
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/user/User.java
View file @
7b95cd47
...
...
@@ -290,4 +290,8 @@ public class User implements AdminAuthorization {
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
7b95cd47
...
...
@@ -27,9 +27,9 @@ public class BasicConfig {
//直播访客 (新强)
public
static
String
VISITORKEY6
=
"DyGoVEPj7nANppy7P8NS4Z4v3PAwxeqJodqYrmwYkoHYMsV4yAxbTXwZ5wWmGQTddQgxdWoNCmN43P8fzhcuWRmdE"
;
//直播访客 (熊二)
public
static
String
VISITORKEY7
=
"LEH7epeHVDJWzhZ6DiexTHns
y28pGo5XmzZG7KzUUKbJwaH84WuambhcvuhbKjYEBPivHr6LyYkQiCkh1fAg4BKKkJmoX
"
;
public
static
String
VISITORKEY7
=
"LEH7epeHVDJWzhZ6DiexTHns
aPwQpbsXDYKqcguWGz3bANuXof13XAd74h5DvPeMkgMPmBhjxykz4C2a2V4oZLhdHDMvS
"
;
//直播访客 (熊大)
public
static
String
VISITORKEY8
=
"LEH7epeHVDJWzhZ6DiexTHns
y28pGo5bL75Lr5VqnVBDBqZVAUZDaFbXuMHKrnKVvTa8qAQcvrVmqN9fxue59EMwYib7p
"
;
public
static
String
VISITORKEY8
=
"LEH7epeHVDJWzhZ6DiexTHns
aPwQpcHvNnpxzrpy7o6fLHsDiQ8X6jiwuiHAr3PWST2a1qMd5nZY6UrQdGuHCi82jhBPs
"
;
// 基础线代理人 TKU
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm"
;
...
...
src/test/liveTestNG.xml
View file @
7b95cd47
...
...
@@ -19,19 +19,20 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题
无限制
配置"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.QuesReward.
Unlimite
d"
/>
</classes>
<test
preserve-order=
"true"
name=
"有奖答题配置"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.QuesReward.
Ad
d"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题团队配置"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.QuesReward.TeamAssignment"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题限制
1次
中奖"
>
<test
preserve-order=
"true"
name=
"有奖答题限制中奖"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.QuesReward.limited"
/>
</classes>
...
...
@@ -118,11 +119,30 @@
<class
name=
"com.kjj.cases.live.red.LiveVistorRed"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题"
>
<!-- <test preserve-order="true" name="有奖答题">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.red.QuestionAwards"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"有奖答题限制1次中奖"
>
<classes>
<class
name=
"com.kjj.cases.live.red.
QuestionAwards
"
/>
<class
name=
"com.kjj.cases.live.red.
Limited
"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题无限制配置"
>
<classes>
<class
name=
"com.kjj.cases.live.manager.QuesReward.Unlimited"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"有奖答题限制无限制中奖"
>
<classes>
<class
name=
"com.kjj.cases.live.red.Unlimited"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"投票"
>
<classes>
<class
name=
"com.kjj.cases.live.choice.Choice"
/>
...
...
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