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
80d5cf18
Commit
80d5cf18
authored
Apr 21, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业指定中奖
parent
291e23f4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
30 deletions
+41
-30
AdminAuthorization.java
...est/java/com/kjj/cases/live/admin/AdminAuthorization.java
+9
-0
DesignatedWinner.java
...est/java/com/kjj/cases/live/lottery/DesignatedWinner.java
+1
-1
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
+4
-2
LiveVistorRed.java
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
+17
-17
QuestionAwards.java
src/test/java/com/kjj/cases/live/red/QuestionAwards.java
+6
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-4
No files found.
src/test/java/com/kjj/cases/live/admin/AdminAuthorization.java
View file @
80d5cf18
...
...
@@ -88,5 +88,14 @@ public interface AdminAuthorization {
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY8
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY8
);
}
/**
* 访客H(喜洋洋)授权
*/
default
void
visitorAuth9
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY9
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY9
);
}
}
src/test/java/com/kjj/cases/live/lottery/DesignatedWinner.java
View file @
80d5cf18
...
...
@@ -247,7 +247,7 @@ public class DesignatedWinner implements AdminAuthorization {
public
void
代理人指定访客中奖表单提交
()
{
Map
<
String
,
Object
>
SubmitParam
=
new
HashMap
<>();
SubmitParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
SubmitParam
.
put
(
"visitorId"
,
"Kj2
2NzI2Mw
"
);
SubmitParam
.
put
(
"visitorId"
,
"Kj2
0ODYz
"
);
Response
SubmitRes
=
network
.
postResponse
(
SubmitParam
,
BasicConfig
.
MOBILE_AgentSpecifyAwardSubmit
);
Object
data
=
SubmitRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/cases/live/manager/SaveAndUpdate.java
View file @
80d5cf18
package
com
.
kjj
.
cases
.
live
.
manager
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.manager.AnswerBean
;
import
com.kjj.bean.manager.AnswerListBean
;
import
com.kjj.bean.manager.RewardPkBean
;
...
...
@@ -221,8 +222,8 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
getLiveAwardListParam
,
BasicConfig
.
MANAGER_getLiveAwardList
,
"查询奖品列表失败"
,
getLiveAwardListRes
.
body
().
asString
()));
}
@Test
(
description
=
"指定中奖
奖品
"
,
priority
=
11
)
public
void
指定中奖
奖品
()
{
@Test
(
description
=
"指定中奖
配置
"
,
priority
=
11
)
public
void
指定中奖
配置
()
{
Map
<
String
,
Object
>
saveSpecifyAwardParam
=
new
HashMap
<>();
saveSpecifyAwardParam
.
put
(
"Id"
,
""
);
saveSpecifyAwardParam
.
put
(
"liveId"
,
liveID
);
...
...
@@ -233,6 +234,7 @@ public class SaveAndUpdate implements AdminAuthorization {
saveSpecifyAwardParam
.
put
(
"privilegeScope"
,
1
);
saveSpecifyAwardParam
.
put
(
"inviteCount"
,
1
);
saveSpecifyAwardParam
.
put
(
"welfareConfId"
,
welfareConfId
);
System
.
out
.
println
(
"saveSpecifyAwardParam------------------------"
+
JSON
.
toJSONString
(
saveSpecifyAwardParam
));
Response
saveSpecifyAwardRes
=
network
.
postResponse
(
saveSpecifyAwardParam
,
BasicConfig
.
MANAGER_SAVESPECIFYAWARD
);
boolean
data7
=
saveSpecifyAwardRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data7
);
...
...
src/test/java/com/kjj/cases/live/red/LiveVistorRed.java
View file @
80d5cf18
...
...
@@ -151,7 +151,7 @@ public class LiveVistorRed implements AdminAuthorization {
public
void
红包状态查询列表
()
{
ThreadSleepUtils
.
sleep
(
2000
);
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_FindRedList
);
...
...
@@ -168,7 +168,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"访客A开普通红包"
,
priority
=
9
)
public
void
访客
A
开普通红包
()
{
visitorAuth
();
visitorAuth
9
();
ThreadSleepUtils
.
sleep
(
60000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -212,7 +212,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"红包个数"
,
priority
=
12
)
public
void
红包个数
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
confId_Red
);
...
...
@@ -228,7 +228,7 @@ public class LiveVistorRed implements AdminAuthorization {
public
void
领普通红包轮询结果
()
{
ThreadSleepUtils
.
sleep
(
10000
);
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
confId_Red
);
...
...
@@ -242,7 +242,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"领红包结果"
,
priority
=
14
)
public
void
领红包结果
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
confId_Red
);
...
...
@@ -257,7 +257,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"查询红包领取结果列表"
,
priority
=
15
)
public
void
查询红包领取结果列表
()
{
visitorAuth
();
visitorAuth
9
();
ThreadSleepUtils
.
sleep
(
20000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -321,7 +321,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"访客A获取直播间参数"
,
priority
=
19
)
public
void
访客
A
获取直播间参数
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"shareType"
,
2
);
...
...
@@ -382,7 +382,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"访客A查询被助力者访客B的信息"
,
priority
=
23
)
public
void
访客
A
查询被助力者访客
B
的信息
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_Red
);
params
.
put
(
"shareSign"
,
red_sharesign
);
...
...
@@ -396,7 +396,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"访客A帮访客B助力"
,
priority
=
24
)
public
void
访客
A
帮访客
B
助力
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"shareSign"
,
red_sharesign
);
...
...
@@ -412,7 +412,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"红包详情助力信息"
,
priority
=
25
)
public
void
红包详情助力信息
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_Red
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -454,7 +454,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"再次查询红包状态"
,
priority
=
28
)
public
void
再次查询红包状态列表
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_FindRedList
);
...
...
@@ -481,7 +481,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"访客A开手气王红包"
,
priority
=
30
)
public
void
访客
A
开手气王红包
()
{
visitorAuth
();
visitorAuth
9
();
ThreadSleepUtils
.
sleep
(
63000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -511,7 +511,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"手气王红包状态查询"
,
priority
=
32
)
public
void
手气王红包状态查询列表
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_FindRedList
);
...
...
@@ -524,7 +524,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"领手气王红包结果查询"
,
priority
=
33
)
public
void
领手气王红包结果查询
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
confId_Red
);
...
...
@@ -538,7 +538,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"查询手气王红包领取结果列表"
,
priority
=
34
)
public
void
查询手气王红包领取结果列表
()
{
visitorAuth
();
visitorAuth
9
();
ThreadSleepUtils
.
sleep
(
15000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -555,7 +555,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"领手气王红包轮询结果"
,
priority
=
35
)
public
void
领手气王红包轮询结果
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"confId"
,
confId_Red
);
...
...
@@ -585,7 +585,7 @@ public class LiveVistorRed implements AdminAuthorization {
@Test
(
description
=
"手气王公示"
,
priority
=
37
)
public
void
手气王公示
()
{
visitorAuth
();
visitorAuth
9
();
ThreadSleepUtils
.
sleep
(
15000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/cases/live/red/QuestionAwards.java
View file @
80d5cf18
...
...
@@ -207,7 +207,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"查询访客端有奖答题配置详情"
,
priority
=
7
)
public
void
查询访客端有奖答题配置详情
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_QuesDetail
);
...
...
@@ -243,7 +243,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"访客A领取答题红包-答题正确"
,
priority
=
9
)
public
void
访客
A
领取答题红包成功
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"quesConfId"
,
confId_ques
);
...
...
@@ -304,7 +304,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"领取答题红包结果"
,
priority
=
13
)
public
void
领取答题红包结果
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"quesConfId"
,
confId_ques
);
...
...
@@ -367,7 +367,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"查询访客端有奖答题-福利类型的配置详情"
,
priority
=
17
)
public
void
查询访客端有奖答题福利类型配置详情
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_QuesDetail
);
...
...
@@ -390,7 +390,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"领取有奖答题福利类型-错误选项"
,
priority
=
18
)
public
void
领取有奖答题福利类型选择错误
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"quesConfId"
,
confId_reward
);
...
...
@@ -466,7 +466,7 @@ public class QuestionAwards implements AdminAuthorization {
@Test
(
description
=
"领取有奖答题福利类型结果"
,
priority
=
23
)
public
void
领取有奖答题福利类型结果
()
{
visitorAuth
();
visitorAuth
9
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"quesConfId"
,
confId_reward
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
80d5cf18
...
...
@@ -12,16 +12,16 @@ public class BasicConfig {
public
static
String
ADMIN_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnsy27vJ5iyL7U5xfY7SmyYGfEoTV5n7LGS9CsYKeQUAaczX94yaV3d4K97F37Yz7LUzipki"
;
// 直播代理人 (艳玲)
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"
;
//直播访客 (
嘿 保险
)
public
static
String
VISITORKEY
=
"
LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW
"
;
//直播访客 (
志勇
)
public
static
String
VISITORKEY
=
"
zFNkBc7JtvLPL6ifAfXbcgYH7WruadyTs58VQNVezBEHURWFkb861yA3TQfkngLojnBnDenawiYNbNADYRdv1vFcDi
"
;
//直播访客 (茶仔)
public
static
String
VISITORKEY2
=
"zFNkBc7JtvLPL6ifAfXbcgYH7WrugVmhv4CXQVq1CN1Y2C8pcBXoPvUPFbkWj7HbdkFpe4oX6SLjczK3ruYpQ8EaQ5"
;
//直播访客 (刘超)
public
static
String
VISITORKEY3
=
"LEH7epeHVDJWzhZ6DiexTHnsaP3ed5NWb7fwGDRPzUCcfxMKyEZr5fYSmKv5AZVQu1w2FRoEvz6mP3RzfeKLqjV8Kq1XE"
;
//直播访客 (李执)
public
static
String
VISITORKEY4
=
"5MgSyboxqzAQZZJEsTf43nVX8FkunrWfgVgxhR9mmo6thaPjMjfgUM62TrCUYvnSdn3kTGsGvJsSaiS4m5LS1up5twWa"
;
//直播访客 (
志勇
)
public
static
String
VISITORKEY9
=
"
zFNkBc7JtvLPL6ifAfXbcgYH7WruadyTs58VQNVezBEHURWFkb861yA3TQfkngLojnBnDenawiYNbNADYRdv1vFcDi
"
;
//直播访客 (
嘿保险
)
public
static
String
VISITORKEY9
=
"
LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW
"
;
//直播访客 (周成)
public
static
String
VISITORKEY5
=
"LEH7epeHVDJWzhZ6DiexTHnsy28uMFcnMj6a1Nh76ZtqrBohi2vbvjsoksZjyRcqFdSgh5zddoi95S8gKvBbuggy6Bhku"
;
//直播访客 (新强)
...
...
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