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
48487484
Commit
48487484
authored
Apr 20, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220420-gxh' into 'master'
修改中奖逻辑,一个客户一场直播仅能实物中奖1次的逻辑 See merge request test-group/kejiji!250
parents
aad4f3a3
0f125bdd
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
44 deletions
+68
-44
Answer.java
src/test/java/com/kjj/cases/live/answer/Answer.java
+18
-10
LiveBinding.java
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
+8
-0
GoldenEgg.java
src/test/java/com/kjj/cases/live/treasure/GoldenEgg.java
+1
-0
Treasure.java
src/test/java/com/kjj/cases/live/treasure/Treasure.java
+4
-5
TreasureTime.java
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
+35
-27
JmeterAccountFile.java
src/test/java/com/kjj/utils/JmeterAccountFile.java
+2
-2
No files found.
src/test/java/com/kjj/cases/live/answer/Answer.java
View file @
48487484
...
@@ -16,11 +16,19 @@ import org.testng.annotations.Test;
...
@@ -16,11 +16,19 @@ import org.testng.annotations.Test;
import
java.util.*
;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
connectSuccess
;
public
class
Answer
implements
Authorization
{
public
class
Answer
implements
Authorization
{
@BeforeClass
@BeforeClass
public
void
setUp
()
{
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
BaseUtils
.
ssoLogin
();
visitorAuth20
();
connectSuccess
();
agentAuth2
();
connectSuccess
();
}
}
public
int
id
;
public
int
id
;
...
@@ -561,7 +569,7 @@ public class Answer implements Authorization {
...
@@ -561,7 +569,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"领取有奖答题福利-访客A答题正确"
,
priority
=
30
)
@Test
(
description
=
"领取有奖答题福利-访客A答题正确"
,
priority
=
30
)
public
void
访客
A
领取有奖答题福利
()
public
void
访客
A
领取有奖答题福利
()
{
{
visitorAuth
3
();
visitorAuth
20
();
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
()));
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
2
).
getQuesConfId
());
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
2
).
getQuesConfId
());
...
@@ -582,7 +590,7 @@ public class Answer implements Authorization {
...
@@ -582,7 +590,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"查询访客A领取有奖答题福利结果"
,
priority
=
31
)
@Test
(
description
=
"查询访客A领取有奖答题福利结果"
,
priority
=
31
)
public
void
查询访客
A
领取有奖答题福利结果
()
public
void
查询访客
A
领取有奖答题福利结果
()
{
{
visitorAuth
3
();
visitorAuth
20
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
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
()));
...
@@ -757,7 +765,7 @@ public class Answer implements Authorization {
...
@@ -757,7 +765,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"访客查询第二轮答题福利"
,
priority
=
40
)
@Test
(
description
=
"访客查询第二轮答题福利"
,
priority
=
40
)
public
void
访客查询第二轮答题福利
()
public
void
访客查询第二轮答题福利
()
{
{
visitorAuth
3
();
visitorAuth
20
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
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
()));
...
@@ -776,7 +784,7 @@ public class Answer implements Authorization {
...
@@ -776,7 +784,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"访客A第二轮领取有奖答题福利-答题正确"
,
priority
=
41
)
@Test
(
description
=
"访客A第二轮领取有奖答题福利-答题正确"
,
priority
=
41
)
public
void
访客
A
第二轮领取有奖答题福利
()
public
void
访客
A
第二轮领取有奖答题福利
()
{
{
visitorAuth
3
();
visitorAuth
20
();
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
()));
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
3
).
getQuesConfId
());
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
3
).
getQuesConfId
());
...
@@ -795,7 +803,7 @@ public class Answer implements Authorization {
...
@@ -795,7 +803,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"查询访客A第二轮有奖答题福利类型结果"
,
priority
=
42
)
@Test
(
description
=
"查询访客A第二轮有奖答题福利类型结果"
,
priority
=
42
)
public
void
查询访客
A
第二轮有奖答题福利类型结果
()
public
void
查询访客
A
第二轮有奖答题福利类型结果
()
{
{
visitorAuth
3
();
visitorAuth
20
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
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
()));
...
@@ -1155,7 +1163,7 @@ public class Answer implements Authorization {
...
@@ -1155,7 +1163,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"领取有奖答题福利类型-访客A答题正确"
,
priority
=
61
)
@Test
(
description
=
"领取有奖答题福利类型-访客A答题正确"
,
priority
=
61
)
public
void
访客
A
领取有奖答题福利类型
()
public
void
访客
A
领取有奖答题福利类型
()
{
{
visitorAuth
3
();
visitorAuth
20
();
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
()));
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
5
).
getQuesConfId
());
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
5
).
getQuesConfId
());
...
@@ -1173,7 +1181,7 @@ public class Answer implements Authorization {
...
@@ -1173,7 +1181,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"访客A领取有奖答题福利结果"
,
priority
=
62
)
@Test
(
description
=
"访客A领取有奖答题福利结果"
,
priority
=
62
)
public
void
访客
A
领取有奖答题福利结果
()
public
void
访客
A
领取有奖答题福利结果
()
{
{
visitorAuth
3
();
visitorAuth
20
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
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
()));
...
@@ -1314,7 +1322,7 @@ public class Answer implements Authorization {
...
@@ -1314,7 +1322,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"访客查询第四轮答题福利"
,
priority
=
70
)
@Test
(
description
=
"访客查询第四轮答题福利"
,
priority
=
70
)
public
void
代理人查询第四轮答题福利
()
public
void
代理人查询第四轮答题福利
()
{
{
a
dminAuth
();
a
gentAuth2
();
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
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_QuesDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_QuesDetail
);
...
@@ -1334,7 +1342,7 @@ public class Answer implements Authorization {
...
@@ -1334,7 +1342,7 @@ public class Answer implements Authorization {
}
}
@Test
(
description
=
"代理人第四轮领取答题福利-答题正确"
,
priority
=
71
)
@Test
(
description
=
"代理人第四轮领取答题福利-答题正确"
,
priority
=
71
)
public
void
代理人第四轮领取答题福利
(){
public
void
代理人第四轮领取答题福利
(){
agentAuth
();
agentAuth
2
();
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
()));
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
7
).
getQuesConfId
());
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
7
).
getQuesConfId
());
...
@@ -1349,7 +1357,7 @@ public class Answer implements Authorization {
...
@@ -1349,7 +1357,7 @@ public class Answer implements Authorization {
@Test
(
description
=
"查询代理人第四轮有奖答题福利类型结果"
,
priority
=
72
)
@Test
(
description
=
"查询代理人第四轮有奖答题福利类型结果"
,
priority
=
72
)
public
void
查询代理人第四轮有奖答题福利类型结果
(){
public
void
查询代理人第四轮有奖答题福利类型结果
(){
//验证管理后台配置实物奖品允许代理人参与并获奖
//验证管理后台配置实物奖品允许代理人参与并获奖
agentAuth
();
agentAuth
2
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
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
()));
...
...
src/test/java/com/kjj/cases/live/liveConfig/LiveBinding.java
View file @
48487484
...
@@ -158,6 +158,14 @@ public class LiveBinding implements Authorization {
...
@@ -158,6 +158,14 @@ public class LiveBinding implements Authorization {
visitorAuth30
();
visitorAuth30
();
binding
(
this
.
shareSign
);;
binding
(
this
.
shareSign
);;
token
();
token
();
visitorAuth20
();
binding
(
this
.
shareSign
);;
token
();
visitorAuth21
();
binding
(
this
.
shareSign
);;
token
();
}
}
@Test
(
description
=
"访客J_分享直播间"
,
priority
=
8
)
@Test
(
description
=
"访客J_分享直播间"
,
priority
=
8
)
...
...
src/test/java/com/kjj/cases/live/treasure/GoldenEgg.java
View file @
48487484
...
@@ -275,6 +275,7 @@ public class GoldenEgg implements Authorization {
...
@@ -275,6 +275,7 @@ public class GoldenEgg implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
chooseAwardParam
,
BasicConfig
.
MOBILE_goldenEgg_open
,
"砸金蛋失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
chooseAwardParam
,
BasicConfig
.
MOBILE_goldenEgg_open
,
"砸金蛋失败"
,
response
.
body
().
asString
()));
sleep
(
2000
);
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
param
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
param
.
put
(
"treasureConfId"
,
ConfId
);
param
.
put
(
"treasureConfId"
,
ConfId
);
...
...
src/test/java/com/kjj/cases/live/treasure/Treasure.java
View file @
48487484
...
@@ -533,6 +533,7 @@ public class Treasure implements Authorization {
...
@@ -533,6 +533,7 @@ public class Treasure implements Authorization {
@Test
(
description
=
"访客H第3轮开宝箱参与详情"
,
priority
=
45
)
@Test
(
description
=
"访客H第3轮开宝箱参与详情"
,
priority
=
45
)
public
void
访客
H
第
3
轮开宝箱参与详情
()
{
public
void
访客
H
第
3
轮开宝箱参与详情
()
{
//直播有整体限制单个客户仅能中奖实物一次
visitorAuth9
();
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
2000
);
ThreadSleepUtils
.
sleep
(
2000
);
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
...
@@ -541,7 +542,7 @@ public class Treasure implements Authorization {
...
@@ -541,7 +542,7 @@ public class Treasure implements Authorization {
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
int
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
int
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
System
.
out
.
println
(
treasureType
);
System
.
out
.
println
(
treasureType
);
Assert
.
assertTrue
(
treasureType
==
3
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非实物
"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非抽奖码
"
,
response
.
body
().
asString
()));
int
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
int
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
System
.
out
.
println
(
receiveStatus
);
System
.
out
.
println
(
receiveStatus
);
...
@@ -593,8 +594,6 @@ public class Treasure implements Authorization {
...
@@ -593,8 +594,6 @@ public class Treasure implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
infoParam
,
BasicConfig
.
MOBILE_assist
,
"访客R给访客M助力失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
infoParam
,
BasicConfig
.
MOBILE_assist
,
"访客R给访客M助力失败"
,
response
.
body
().
asString
()));
}
}
//验证实物奖品数量是否会超发
@Test
(
description
=
"访客H第4次参与详情的进度显示"
,
priority
=
53
)
@Test
(
description
=
"访客H第4次参与详情的进度显示"
,
priority
=
53
)
public
void
访客
H
第
4
次参与详情的进度显示
()
{
public
void
访客
H
第
4
次参与详情的进度显示
()
{
visitorAuth9
();
visitorAuth9
();
...
@@ -657,7 +656,7 @@ public class Treasure implements Authorization {
...
@@ -657,7 +656,7 @@ public class Treasure implements Authorization {
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
int
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
int
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
System
.
out
.
println
(
treasureType
);
System
.
out
.
println
(
treasureType
);
Assert
.
assertTrue
(
treasureType
==
3
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非实物
"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
treasureType
==
1
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非抽奖码
"
,
response
.
body
().
asString
()));
int
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
int
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
System
.
out
.
println
(
receiveStatus
);
System
.
out
.
println
(
receiveStatus
);
...
@@ -669,7 +668,7 @@ public class Treasure implements Authorization {
...
@@ -669,7 +668,7 @@ public class Treasure implements Authorization {
Response
responseB
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
Response
responseB
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
);
int
treasureType1
=
responseB
.
jsonPath
().
getInt
(
"data.treasureType"
);
int
treasureType1
=
responseB
.
jsonPath
().
getInt
(
"data.treasureType"
);
System
.
out
.
println
(
treasureType1
);
System
.
out
.
println
(
treasureType1
);
Assert
.
assertTrue
(
treasureType1
==
1
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非抽奖码
"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
treasureType1
==
3
,
network
.
message
(
infoParam
,
BasicConfig
.
MANAGER_participateInfo
,
"类型非实物
"
,
response
.
body
().
asString
()));
int
receiveStatus1
=
responseB
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
int
receiveStatus1
=
responseB
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
System
.
out
.
println
(
receiveStatus1
);
System
.
out
.
println
(
receiveStatus1
);
...
...
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
View file @
48487484
...
@@ -17,11 +17,19 @@ import java.util.HashMap;
...
@@ -17,11 +17,19 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
kjj
.
utils
.
BaseUtils
.
connectSuccess
;
public
class
TreasureTime
implements
Authorization
{
public
class
TreasureTime
implements
Authorization
{
@BeforeClass
@BeforeClass
public
void
setUp
()
{
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
BaseUtils
.
ssoLogin
();
visitorAuth21
();
connectSuccess
();
visitorAuth22
();
connectSuccess
();
}
}
public
List
<
CondDetail
>
treasureConfId
;
public
List
<
CondDetail
>
treasureConfId
;
...
@@ -29,7 +37,7 @@ public class TreasureTime implements Authorization {
...
@@ -29,7 +37,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"获取宝箱配置详情"
,
priority
=
1
)
@Test
(
description
=
"获取宝箱配置详情"
,
priority
=
1
)
public
void
获取宝箱配置详情
()
{
public
void
获取宝箱配置详情
()
{
visitorAuth
9
();
visitorAuth
21
();
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
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_timeDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_timeDetail
);
...
@@ -41,7 +49,7 @@ public class TreasureTime implements Authorization {
...
@@ -41,7 +49,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"获取宝箱参与情况"
,
priority
=
2
)
@Test
(
description
=
"获取宝箱参与情况"
,
priority
=
2
)
public
void
获取宝箱参与情况
()
{
public
void
获取宝箱参与情况
()
{
visitorAuth
9
();
visitorAuth
21
();
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
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail
);
...
@@ -55,7 +63,7 @@ public class TreasureTime implements Authorization {
...
@@ -55,7 +63,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"完成第1个观看任务"
,
priority
=
3
)
@Test
(
description
=
"完成第1个观看任务"
,
priority
=
3
)
public
void
完成第
1
个观看任务
()
{
public
void
完成第
1
个观看任务
()
{
visitorAuth
9
();
visitorAuth
21
();
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
()));
params
.
put
(
"treasureConfId"
,
this
.
treasureConfId
.
get
(
0
).
getTreasureConfId
());
params
.
put
(
"treasureConfId"
,
this
.
treasureConfId
.
get
(
0
).
getTreasureConfId
());
...
@@ -68,7 +76,7 @@ public class TreasureTime implements Authorization {
...
@@ -68,7 +76,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"获取第1个宝箱参与情况"
,
priority
=
4
)
@Test
(
description
=
"获取第1个宝箱参与情况"
,
priority
=
4
)
public
void
获取第
1
个宝箱参与情况
()
{
public
void
获取第
1
个宝箱参与情况
()
{
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -83,7 +91,7 @@ public class TreasureTime implements Authorization {
...
@@ -83,7 +91,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"访客H开启第1个宝箱"
,
priority
=
5
)
@Test
(
description
=
"访客H开启第1个宝箱"
,
priority
=
5
)
public
void
开启第
1
个宝箱
()
{
public
void
开启第
1
个宝箱
()
{
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -97,7 +105,7 @@ public class TreasureTime implements Authorization {
...
@@ -97,7 +105,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"查询第1个宝箱中奖结果"
,
priority
=
6
)
@Test
(
description
=
"查询第1个宝箱中奖结果"
,
priority
=
6
)
public
void
查询第
1
个宝箱中奖结果
()
{
public
void
查询第
1
个宝箱中奖结果
()
{
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -127,14 +135,14 @@ public class TreasureTime implements Authorization {
...
@@ -127,14 +135,14 @@ public class TreasureTime implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
boolean
data1
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data1
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
Assert
.
assertTrue
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
boolean
data2
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data2
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -156,7 +164,7 @@ public class TreasureTime implements Authorization {
...
@@ -156,7 +164,7 @@ public class TreasureTime implements Authorization {
boolean
finishFlag
=
treasureList
.
get
(
1
).
isFinishFlag
();
boolean
finishFlag
=
treasureList
.
get
(
1
).
isFinishFlag
();
Assert
.
assertTrue
(
finishFlag
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
finishFlag
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList1
=
JsonUtil
.
parseResponseToListBean
(
response1
,
CondDetail
.
class
,
"condDetail"
);
List
<
CondDetail
>
treasureList1
=
JsonUtil
.
parseResponseToListBean
(
response1
,
CondDetail
.
class
,
"condDetail"
);
...
@@ -164,7 +172,7 @@ public class TreasureTime implements Authorization {
...
@@ -164,7 +172,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertTrue
(
finishFlag1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
finishFlag1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第2个宝箱参与情况失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList2
=
JsonUtil
.
parseResponseToListBean
(
response2
,
CondDetail
.
class
,
"condDetail"
);
List
<
CondDetail
>
treasureList2
=
JsonUtil
.
parseResponseToListBean
(
response2
,
CondDetail
.
class
,
"condDetail"
);
...
@@ -188,7 +196,7 @@ public class TreasureTime implements Authorization {
...
@@ -188,7 +196,7 @@ public class TreasureTime implements Authorization {
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
boolean
data1
=
response1
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data1
=
response1
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -196,7 +204,7 @@ public class TreasureTime implements Authorization {
...
@@ -196,7 +204,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertTrue
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
Assert
.
assertTrue
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
boolean
data2
=
response2
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data2
=
response2
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -221,16 +229,16 @@ public class TreasureTime implements Authorization {
...
@@ -221,16 +229,16 @@ public class TreasureTime implements Authorization {
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
Assert
.
assertTrue
(
treasureType
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非
抽奖码
类型"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
treasureType
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"中奖结果非
实物
类型"
,
response
.
body
().
asString
()));
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
...
@@ -257,7 +265,7 @@ public class TreasureTime implements Authorization {
...
@@ -257,7 +265,7 @@ public class TreasureTime implements Authorization {
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
...
@@ -265,7 +273,7 @@ public class TreasureTime implements Authorization {
...
@@ -265,7 +273,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
//实物发完降级抽奖码
//实物发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
...
@@ -291,7 +299,7 @@ public class TreasureTime implements Authorization {
...
@@ -291,7 +299,7 @@ public class TreasureTime implements Authorization {
System
.
out
.
println
(
finishFlag
);
System
.
out
.
println
(
finishFlag
);
Assert
.
assertTrue
(
finishFlag
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第3个宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
finishFlag
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第3个宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
Response
response1
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList1
=
JsonUtil
.
parseResponseToListBean
(
response1
,
CondDetail
.
class
,
"condDetail"
);
List
<
CondDetail
>
treasureList1
=
JsonUtil
.
parseResponseToListBean
(
response1
,
CondDetail
.
class
,
"condDetail"
);
...
@@ -300,7 +308,7 @@ public class TreasureTime implements Authorization {
...
@@ -300,7 +308,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertTrue
(
finishFlag1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第3个宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
finishFlag1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinDetail1
,
"访客H获取第3个宝箱参与情况失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
Response
response2
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
List
<
CondDetail
>
treasureList2
=
JsonUtil
.
parseResponseToListBean
(
response2
,
CondDetail
.
class
,
"condDetail"
);
List
<
CondDetail
>
treasureList2
=
JsonUtil
.
parseResponseToListBean
(
response2
,
CondDetail
.
class
,
"condDetail"
);
...
@@ -324,7 +332,7 @@ public class TreasureTime implements Authorization {
...
@@ -324,7 +332,7 @@ public class TreasureTime implements Authorization {
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Response
response1
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data1
=
response1
.
jsonPath
().
getJsonObject
(
"data"
);
...
@@ -332,7 +340,7 @@ public class TreasureTime implements Authorization {
...
@@ -332,7 +340,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
Assert
.
assertNotNull
(
data1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H获取宝箱参与情况失败"
,
response1
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Response
response2
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data2
=
response2
.
jsonPath
().
getJsonObject
(
"data"
);
...
@@ -357,7 +365,7 @@ public class TreasureTime implements Authorization {
...
@@ -357,7 +365,7 @@ public class TreasureTime implements Authorization {
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Integer
receiveStatus
=
response
.
jsonPath
().
getInt
(
"data.receiveStatus"
);
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
visitorAuth
9
();
visitorAuth
21
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
...
@@ -366,7 +374,7 @@ public class TreasureTime implements Authorization {
...
@@ -366,7 +374,7 @@ public class TreasureTime implements Authorization {
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
receiveStatus
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_joinResult
,
"领取失败"
,
response
.
body
().
asString
()));
//红包发完降级抽奖码
//红包发完降级抽奖码
visitorAuth
13
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinResult
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
treasureType
=
response
.
jsonPath
().
getInt
(
"data.treasureType"
);
...
@@ -382,7 +390,7 @@ public class TreasureTime implements Authorization {
...
@@ -382,7 +390,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"完成第4个观看任务"
,
priority
=
15
)
@Test
(
description
=
"完成第4个观看任务"
,
priority
=
15
)
public
void
完成第
4
个观看任务
()
{
public
void
完成第
4
个观看任务
()
{
visitorAuth
9
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -397,7 +405,7 @@ public class TreasureTime implements Authorization {
...
@@ -397,7 +405,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"获取第4个宝箱参与情况"
,
priority
=
16
)
@Test
(
description
=
"获取第4个宝箱参与情况"
,
priority
=
16
)
public
void
获取第
4
个宝箱参与情况
()
{
public
void
获取第
4
个宝箱参与情况
()
{
visitorAuth
9
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -411,7 +419,7 @@ public class TreasureTime implements Authorization {
...
@@ -411,7 +419,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"开启第4个宝箱"
,
priority
=
17
)
@Test
(
description
=
"开启第4个宝箱"
,
priority
=
17
)
public
void
开启第
4
个宝箱
()
{
public
void
开启第
4
个宝箱
()
{
visitorAuth
9
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
@@ -425,7 +433,7 @@ public class TreasureTime implements Authorization {
...
@@ -425,7 +433,7 @@ public class TreasureTime implements Authorization {
@Test
(
description
=
"查询第4个宝箱中奖结果"
,
priority
=
18
)
@Test
(
description
=
"查询第4个宝箱中奖结果"
,
priority
=
18
)
public
void
查询第
4
个宝箱中奖结果
()
{
public
void
查询第
4
个宝箱中奖结果
()
{
visitorAuth
9
();
visitorAuth
22
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
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
()));
...
...
src/test/java/com/kjj/utils/JmeterAccountFile.java
View file @
48487484
...
@@ -32,9 +32,9 @@ public class JmeterAccountFile {
...
@@ -32,9 +32,9 @@ public class JmeterAccountFile {
public
static
void
otoCookieMaker
()
{
public
static
void
otoCookieMaker
()
{
OtoTokenCookie
otoTokenCookie
=
new
OtoTokenCookie
();
OtoTokenCookie
otoTokenCookie
=
new
OtoTokenCookie
();
otoTokenCookie
.
setExpiredTime
(
System
.
currentTimeMillis
()
+
86400
*
1000
*
150L
);
otoTokenCookie
.
setExpiredTime
(
System
.
currentTimeMillis
()
+
86400
*
1000
*
150L
);
otoTokenCookie
.
setPhoneNumber
(
"1
586919513
0"
);
otoTokenCookie
.
setPhoneNumber
(
"1
783085559
0"
);
otoTokenCookie
.
setLoginId
(
IdMakeUtil
.
encodingId
(
46
L
,
IdConvertBase64Enum
.
DEF
));
otoTokenCookie
.
setLoginId
(
IdMakeUtil
.
encodingId
(
2
L
,
IdConvertBase64Enum
.
DEF
));
String
json
=
JSON
.
toJSONString
(
otoTokenCookie
);
String
json
=
JSON
.
toJSONString
(
otoTokenCookie
);
String
otoToken
=
BlowfishUtils
.
encryptBlowfish
(
json
,
"02a16fs1b6a3"
);
String
otoToken
=
BlowfishUtils
.
encryptBlowfish
(
json
,
"02a16fs1b6a3"
);
...
...
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