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
403267d1
Commit
403267d1
authored
Aug 26, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改亲友券和客户承诺话术
parent
77bcddef
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
66 additions
and
73 deletions
+66
-73
Customer.java
src/test/java/com/kjj/cases/live/agent/Customer.java
+1
-2
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+2
-2
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+3
-3
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+1
-0
RelativeLottery.java
...test/java/com/kjj/cases/live/lottery/RelativeLottery.java
+26
-35
TimeRed.java
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
+8
-8
Treasure.java
src/test/java/com/kjj/cases/live/treasure/Treasure.java
+1
-0
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+3
-1
NetworkUtils.java
src/test/java/com/kjj/utils/NetworkUtils.java
+0
-1
liveTestNG.xml
src/test/liveTestNG.xml
+21
-21
No files found.
src/test/java/com/kjj/cases/live/agent/Customer.java
View file @
403267d1
...
@@ -254,8 +254,7 @@ public class Customer implements Authorization {
...
@@ -254,8 +254,7 @@ public class Customer implements Authorization {
int
chanceType
=
response
.
jsonPath
().
getInt
(
"data.chanceType"
);
int
chanceType
=
response
.
jsonPath
().
getInt
(
"data.chanceType"
);
Assert
.
assertTrue
(
chanceType
==
1
,
network
.
message
(
BasicConfig
.
MOBILE_followChanceDetail
,
"跟进类型非咨询"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
chanceType
==
1
,
network
.
message
(
BasicConfig
.
MOBILE_followChanceDetail
,
"跟进类型非咨询"
,
response
.
body
().
asString
()));
String
question
=
response
.
jsonPath
().
getString
(
"data.question"
);
String
question
=
response
.
jsonPath
().
getString
(
"data.question"
);
Assert
.
assertEquals
(
question
,
"一度问题1"
,
network
.
message
(
BasicConfig
.
MOBILE_followChanceDetail
,
"咨询问题为null"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
question
.
equals
(
"一度问题1"
)||
question
.
equals
(
"一度问题2"
)||
question
.
equals
(
"一度问题3"
),
network
.
message
(
BasicConfig
.
MOBILE_followChanceDetail
,
"咨询问题为null"
,
response
.
body
().
asString
()));
}
}
...
...
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
403267d1
...
@@ -358,9 +358,9 @@ public class LiveLater implements Authorization {
...
@@ -358,9 +358,9 @@ public class LiveLater implements Authorization {
public
void
直播后准客户数量统计
(){
public
void
直播后准客户数量统计
(){
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_
clueChanceList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_
potentialNum
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
int
potentialNum
=
response
.
jsonPath
().
getInt
(
"data.potentialNum"
);
int
potentialNum
=
response
.
jsonPath
().
getInt
(
"data.potentialNum"
);
Assert
.
assert
Equals
(
potentialNum
,
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueChanceList
,
"准客户数量错误"
,
response
.
body
().
asString
()));
Assert
.
assert
True
(
potentialNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_potentialNum
,
"准客户数量错误"
,
response
.
body
().
asString
()));
}
}
}
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
403267d1
...
@@ -2485,7 +2485,7 @@ public class SaveLive implements Authorization {
...
@@ -2485,7 +2485,7 @@ public class SaveLive implements Authorization {
public
void
保存客户承诺话术配置
(){
public
void
保存客户承诺话术配置
(){
ssoLogin
();
ssoLogin
();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
5628
);
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
())
);
ArrayList
<
Dialogue
>
dialogues
=
new
ArrayList
<>();
ArrayList
<
Dialogue
>
dialogues
=
new
ArrayList
<>();
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"一度问题1"
,
"一度问题2"
,
"一度问题3"
)),
"一度代理人结束语"
,
"一度代理人欢迎语"
,
"一度承诺标题"
,
"一度承诺描述"
,
"一度承诺按钮文案"
,
"一度行动承诺"
,
1
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"一度问题1"
,
"一度问题2"
,
"一度问题3"
)),
"一度代理人结束语"
,
"一度代理人欢迎语"
,
"一度承诺标题"
,
"一度承诺描述"
,
"一度承诺按钮文案"
,
"一度行动承诺"
,
1
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
0
));
dialogues
.
add
(
new
Dialogue
(
new
ArrayList
<>(
Arrays
.
asList
(
"二度问题1"
,
"二度问题2"
,
"二度问题3"
)),
"二度代理人结束语"
,
"二度代理人欢迎语"
,
"二度承诺标题"
,
"二度承诺描述"
,
"二度承诺按钮文案"
,
"二度行动承诺"
,
0
));
...
@@ -2508,8 +2508,8 @@ public class SaveLive implements Authorization {
...
@@ -2508,8 +2508,8 @@ public class SaveLive implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"客户承诺话术错误"
,
response
.
body
().
asString
()));
String
promiseTitle1
=
response
.
jsonPath
().
getString
(
"data.
get[0]
.promiseTitle"
);
String
promiseTitle1
=
response
.
jsonPath
().
getString
(
"data.
find{it.inviteType == 1}
.promiseTitle"
);
String
promiseTitle2
=
response
.
jsonPath
().
getString
(
"data.
get[1]
.promiseTitle"
);
String
promiseTitle2
=
response
.
jsonPath
().
getString
(
"data.
find{it.inviteType == 0}
.promiseTitle"
);
Assert
.
assertEquals
(
promiseTitle1
,
"一度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"一度客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promiseTitle1
,
"一度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"一度客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promiseTitle2
,
"二度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"二度客户承诺话术错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
promiseTitle2
,
"二度承诺标题"
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_findDialogue
,
"二度客户承诺话术错误"
,
response
.
body
().
asString
()));
}
}
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
403267d1
...
@@ -373,6 +373,7 @@ public class Lottery implements Authorization {
...
@@ -373,6 +373,7 @@ public class Lottery implements Authorization {
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
(
"shareType"
,
11
);
Params
.
put
(
"shareType"
,
11
);
Params
.
put
(
"userType"
,
"A"
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_helpInfo
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MOBILE_helpInfo
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
...
...
src/test/java/com/kjj/cases/live/lottery/RelativeLottery.java
View file @
403267d1
...
@@ -16,31 +16,20 @@ import java.util.HashMap;
...
@@ -16,31 +16,20 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
public
class
RelativeLottery
implements
Authorization
{
public
class
RelativeLottery
implements
Authorization
{
public
List
<
ConfIdList
>
List_C
onfId
;
public
String
c
onfId
;
public
String
shareSign
;
public
String
shareSign
;
@BeforeClass
@BeforeClass
public
void
setUp
(){
public
void
setUp
(){
agentAuth
();
visitorAuth9
();
}
@Test
(
description
=
"代理人查询抽奖奖品列表"
,
priority
=
1
)
public
void
查询抽奖奖品列表
()
{
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
getLiveAwardListRes
=
network
.
getResponse
(
getLiveAwardListParam
,
USER_getLiveAwardList
);
List
<
ConfIdList
>
list
=
JsonUtil
.
parseResponseToListBean
(
getLiveAwardListRes
,
ConfIdList
.
class
);
System
.
out
.
println
(
list
);
this
.
List_ConfId
=
list
;
Assert
.
assertNotNull
(
list
,
network
.
message
(
getLiveAwardListParam
,
USER_getLiveAwardList
,
"抽奖标记为false"
,
getLiveAwardListRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询亲友配置开启状态"
,
priority
=
2
)
@Test
(
description
=
"查询亲友配置开启状态"
,
priority
=
1
)
public
void
查询亲友配置开启状态
()
{
public
void
查询亲友配置开启状态
()
{
visitorAuth9
();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_allLottery
);
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_allLottery
);
...
@@ -49,7 +38,7 @@ public class RelativeLottery implements Authorization {
...
@@ -49,7 +38,7 @@ public class RelativeLottery implements Authorization {
Assert
.
assertEquals
(
fissionLotteryConfStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_allLottery
,
"亲友配置券未开启"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
fissionLotteryConfStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_allLottery
,
"亲友配置券未开启"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"仅一度用户可以领取抽奖券"
,
priority
=
3
)
@Test
(
description
=
"仅一度用户可以领取抽奖券"
,
priority
=
2
)
public
void
仅一度用户可以领取抽奖券
()
{
public
void
仅一度用户可以领取抽奖券
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
getLiveAwardListParam
=
new
HashMap
<>();
...
@@ -64,8 +53,9 @@ public class RelativeLottery implements Authorization {
...
@@ -64,8 +53,9 @@ public class RelativeLottery implements Authorization {
Assert
.
assertEquals
(
userAcceptStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户已领取亲友券"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
userAcceptStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户已领取亲友券"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverInfoList
,
0
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券已接受人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverInfoList
,
0
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券已接受人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
lotteryNum
,
3
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
lotteryNum
,
3
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券数量错误"
,
response
.
body
().
asString
()));
confId
=
response
.
jsonPath
().
getString
(
"data.confDetail.id"
);
visitorAuth
5
();
visitorAuth
22
();
getLiveAwardListParam
.
clear
();
getLiveAwardListParam
.
clear
();
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
...
@@ -75,7 +65,7 @@ public class RelativeLottery implements Authorization {
...
@@ -75,7 +65,7 @@ public class RelativeLottery implements Authorization {
}
}
@Test
(
description
=
"访客H收下抽奖券"
,
priority
=
4
)
@Test
(
description
=
"访客H收下抽奖券"
,
priority
=
3
)
public
void
访客
H
收下抽奖券
()
{
public
void
访客
H
收下抽奖券
()
{
visitorAuth9
();
visitorAuth9
();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
bindingParam
=
new
HashMap
<>();
...
@@ -87,8 +77,7 @@ public class RelativeLottery implements Authorization {
...
@@ -87,8 +77,7 @@ public class RelativeLottery implements Authorization {
@Test
(
description
=
"访客H_分享直播间"
,
priority
=
5
)
@Test
(
description
=
"访客H_分享直播间"
,
priority
=
5
)
public
void
访客
H_
分享直播间
()
{
public
void
访客
H_
分享直播间
()
{
visitorAuth9
();
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
signParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
signParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
signParam
.
put
(
"shareType"
,
10
);
signParam
.
put
(
"shareType"
,
10
);
...
@@ -102,10 +91,9 @@ public class RelativeLottery implements Authorization {
...
@@ -102,10 +91,9 @@ public class RelativeLottery implements Authorization {
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
6
)
@Test
(
description
=
"根据分享类型获取分享内容"
,
priority
=
6
)
public
void
根据分享类型获取分享内容
()
{
public
void
根据分享类型获取分享内容
()
{
visitorAuth9
();
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
(
"shareType"
,
1
0
);
params
.
put
(
"shareType"
,
1
4
);
params
.
put
(
"userType"
,
"A"
);
params
.
put
(
"userType"
,
"A"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_helpInfo
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_helpInfo
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
...
@@ -115,14 +103,19 @@ public class RelativeLottery implements Authorization {
...
@@ -115,14 +103,19 @@ public class RelativeLottery implements Authorization {
@Test
(
description
=
"访客H_获取小程序分享码"
,
priority
=
7
)
@Test
(
description
=
"访客H_获取小程序分享码"
,
priority
=
7
)
public
void
访客
H_
获取小程序分享码
()
{
public
void
访客
H_
获取小程序分享码
()
{
visitorAuth9
();
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
signParam
=
new
HashMap
<>();
signParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
signParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
signRes
=
network
.
getResponse
(
signParam
,
MOBILE_codeLottery
);
Response
response
=
network
.
postResponse
(
signParam
,
MOBILE_codeLottery
);
System
.
out
.
println
(
signRes
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
String
qrCodeUrl
=
signRes
.
jsonPath
().
getString
(
"data.qrCodeUrl"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertNotNull
(
qrCodeUrl
,
network
.
message
(
signParam
,
MOBILE_codeLottery
,
"分享失败"
,
signRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
signParam
,
MOBILE_codeLottery
,
"分享失败"
,
response
.
body
().
asString
()));
sleep
(
3000
);
response
=
network
.
getResponse
(
signParam
,
MOBILE_codeDetailLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
qrCodeUrl
=
response
.
jsonPath
().
getBoolean
(
"data.qrCodeUrl"
);
Assert
.
assertNotNull
(
qrCodeUrl
,
network
.
message
(
signParam
,
MOBILE_codeDetailLottery
,
"分享失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"访客H获取直播所有的订阅消息模板"
,
priority
=
8
)
@Test
(
description
=
"访客H获取直播所有的订阅消息模板"
,
priority
=
8
)
...
@@ -151,7 +144,7 @@ public class RelativeLottery implements Authorization {
...
@@ -151,7 +144,7 @@ public class RelativeLottery implements Authorization {
@Test
(
description
=
"查询访客Xmz绑定结果和绑定凭证"
,
priority
=
10
)
@Test
(
description
=
"查询访客Xmz绑定结果和绑定凭证"
,
priority
=
10
)
public
void
查询访客
Xmz
绑定结果和绑定凭证
()
{
public
void
查询访客
Xmz
绑定结果和绑定凭证
()
{
visitorAuth26
();
visitorAuth26
();
ThreadSleepUtils
.
sleep
(
2000
);
sleep
(
2000
);
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
tokenParam
=
new
HashMap
<>();
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
tokenParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
Response
tokenRes
=
network
.
getResponse
(
tokenParam
,
BasicConfig
.
MOBILE_Token
);
...
@@ -180,7 +173,7 @@ public class RelativeLottery implements Authorization {
...
@@ -180,7 +173,7 @@ public class RelativeLottery implements Authorization {
@Test
(
description
=
"访客Xmz给访客H助力"
,
priority
=
12
)
@Test
(
description
=
"访客Xmz给访客H助力"
,
priority
=
12
)
public
void
访客
Xmz
给访客
H
助力
()
{
public
void
访客
Xmz
给访客
H
助力
()
{
visitorAuth26
();
visitorAuth26
();
ThreadSleepUtils
.
sleep
(
2000
);
sleep
(
2000
);
//获取授权配置助力弹窗
//获取授权配置助力弹窗
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
()));
...
@@ -194,7 +187,7 @@ public class RelativeLottery implements Authorization {
...
@@ -194,7 +187,7 @@ public class RelativeLottery implements Authorization {
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"shareSign"
,
shareSign
);
Params
.
put
(
"shareSign"
,
shareSign
);
Params
.
put
(
"shareType"
,
14
);
Params
.
put
(
"shareType"
,
14
);
Params
.
put
(
"confId"
,
this
.
List_ConfId
.
get
(
0
).
getWelfareConfId
()
);
Params
.
put
(
"confId"
,
confId
);
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MOBILE_assist
);
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MOBILE_assist
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -208,11 +201,9 @@ public class RelativeLottery implements Authorization {
...
@@ -208,11 +201,9 @@ public class RelativeLottery implements Authorization {
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
getLiveAwardListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
Response
response
=
network
.
getResponse
(
getLiveAwardListParam
,
MOBILE_confLottery
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
int
userStatus
=
response
.
jsonPath
().
getInt
(
"data.userDetail.userStatus"
);
int
receiverInfoList
=
response
.
jsonPath
().
getInt
(
"data.userDetail.receiverInfoList.size()"
);
int
receiverInfoList
=
response
.
jsonPath
().
getInt
(
"data.userDetail.receiverInfoList.size()"
);
String
receiverName
=
response
.
jsonPath
().
getString
(
"data.userDetail.receiverInfoList.get(0).receiverName"
);
String
nickname
=
response
.
jsonPath
().
getString
(
"data.userDetail.receiverInfoList.get(0).nickname"
);
Assert
.
assertEquals
(
userStatus
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"一度用户没有亲友券领取资格"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverInfoList
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券已接受人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverInfoList
,
1
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券已接受人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
receiverN
ame
,
"小米粥"
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券领取人错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
nickn
ame
,
"小米粥"
,
network
.
message
(
getLiveAwardListParam
,
MOBILE_confLottery
,
"亲友配置券领取人错误"
,
response
.
body
().
asString
()));
}
}
}
}
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
View file @
403267d1
...
@@ -521,7 +521,7 @@ public class TimeRed implements Authorization {
...
@@ -521,7 +521,7 @@ public class TimeRed implements Authorization {
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state
);
System
.
out
.
println
(
state
);
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第
4
轮红包"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第
5
轮红包"
,
response
.
body
().
asString
()));
visitorAuth8
();
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
...
@@ -530,7 +530,7 @@ public class TimeRed implements Authorization {
...
@@ -530,7 +530,7 @@ public class TimeRed implements Authorization {
System
.
out
.
println
(
data1
);
System
.
out
.
println
(
data1
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state1
);
System
.
out
.
println
(
state1
);
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第
4
轮红包"
,
stateRes
.
body
().
asString
()));
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第
5
轮红包"
,
stateRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"下架第6轮红包任务对应的权益"
,
priority
=
23
)
@Test
(
description
=
"下架第6轮红包任务对应的权益"
,
priority
=
23
)
...
@@ -561,14 +561,14 @@ public class TimeRed implements Authorization {
...
@@ -561,14 +561,14 @@ public class TimeRed implements Authorization {
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
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
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成
表单
任务"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成任务"
,
response
.
body
().
asString
()));
visitorAuth8
();
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客
H未完成表单
任务"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客
I未完成
任务"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"开启第6轮红包"
,
priority
=
25
)
@Test
(
description
=
"开启第6轮红包"
,
priority
=
25
)
...
@@ -581,14 +581,14 @@ public class TimeRed implements Authorization {
...
@@ -581,14 +581,14 @@ public class TimeRed implements Authorization {
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
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
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客H开启第
4
轮红包失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客H开启第
6
轮红包失败"
,
response
.
body
().
asString
()));
visitorAuth8
();
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
Response
redRes
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
Response
redRes
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
boolean
data1
=
redRes
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data1
=
redRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客I开启第
4
轮红包失败"
,
redRes
.
body
().
asString
()));
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客I开启第
6
轮红包失败"
,
redRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询开启第6轮红包结果"
,
priority
=
26
)
@Test
(
description
=
"查询开启第6轮红包结果"
,
priority
=
26
)
...
@@ -604,7 +604,7 @@ public class TimeRed implements Authorization {
...
@@ -604,7 +604,7 @@ public class TimeRed implements Authorization {
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
response
.
body
().
asString
());
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第
4
轮红包"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第
6
轮红包"
,
response
.
body
().
asString
()));
visitorAuth8
();
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
ThreadSleepUtils
.
sleep
(
3000
);
...
@@ -613,7 +613,7 @@ public class TimeRed implements Authorization {
...
@@ -613,7 +613,7 @@ public class TimeRed implements Authorization {
System
.
out
.
println
(
data1
);
System
.
out
.
println
(
data1
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state1
);
System
.
out
.
println
(
state1
);
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第
4
轮红包"
,
stateRes
.
body
().
asString
()));
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第
6f d s s d f
轮红包"
,
stateRes
.
body
().
asString
()));
}
}
//提现
//提现
...
...
src/test/java/com/kjj/cases/live/treasure/Treasure.java
View file @
403267d1
...
@@ -99,6 +99,7 @@ public class Treasure implements Authorization {
...
@@ -99,6 +99,7 @@ public class Treasure implements Authorization {
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
infoParam
=
new
HashMap
<>();
infoParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
infoParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
infoParam
.
put
(
"shareType"
,
7
);
infoParam
.
put
(
"shareType"
,
7
);
infoParam
.
put
(
"userType"
,
"A"
);
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MOBILE_helpInfo
);
Response
response
=
network
.
getResponse
(
infoParam
,
BasicConfig
.
MOBILE_helpInfo
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
403267d1
...
@@ -104,7 +104,6 @@ public class BasicConfig {
...
@@ -104,7 +104,6 @@ public class BasicConfig {
// *************** 准客户 ***************
// *************** 准客户 ***************
public
static
final
String
ANCHOR_card
=
MOBILE_HOST
+
"/clue/agent/card"
;
public
static
final
String
ANCHOR_card
=
MOBILE_HOST
+
"/clue/agent/card"
;
public
static
final
String
ANCHOR_questions
=
MOBILE_HOST
+
"/kjy/live/agent/potential/questions"
;
public
static
final
String
ANCHOR_submit
=
MOBILE_HOST
+
"/kjy/live/agent/potential/submit"
;
public
static
final
String
ANCHOR_submit
=
MOBILE_HOST
+
"/kjy/live/agent/potential/submit"
;
public
static
final
String
ANCHOR_agree
=
MOBILE_HOST
+
"/kjy/live/agent/potential/agree"
;
public
static
final
String
ANCHOR_agree
=
MOBILE_HOST
+
"/kjy/live/agent/potential/agree"
;
public
static
final
String
ANCHOR_questionSubmitted
=
MOBILE_HOST
+
"/kjy/live/agent/potential/questionSubmitted"
;
public
static
final
String
ANCHOR_questionSubmitted
=
MOBILE_HOST
+
"/kjy/live/agent/potential/questionSubmitted"
;
...
@@ -302,6 +301,9 @@ public class BasicConfig {
...
@@ -302,6 +301,9 @@ public class BasicConfig {
public
static
final
String
MOBILE_allLottery
=
MOBILE_HOST
+
"/kjy/live/info/pre/data"
;
public
static
final
String
MOBILE_allLottery
=
MOBILE_HOST
+
"/kjy/live/info/pre/data"
;
public
static
final
String
MOBILE_confLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/conf/all"
;
public
static
final
String
MOBILE_confLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/conf/all"
;
public
static
final
String
MOBILE_codeLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/code"
;
public
static
final
String
MOBILE_codeLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/code"
;
public
static
final
String
MOBILE_drawCode
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/drawCode"
;
public
static
final
String
MOBILE_codeDetailLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/code/detail"
;
public
static
final
String
MOBILE_drawDetailLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/drawCode/detail"
;
public
static
final
String
MOBILE_acceptLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/accept"
;
public
static
final
String
MOBILE_acceptLottery
=
MOBILE_HOST
+
"/kjy/live/fission/lottery/user/accept"
;
// *************** 时长宝箱 ***************
// *************** 时长宝箱 ***************
...
...
src/test/java/com/kjj/utils/NetworkUtils.java
View file @
403267d1
...
@@ -91,7 +91,6 @@ public class NetworkUtils {
...
@@ -91,7 +91,6 @@ public class NetworkUtils {
// post 带参请求
// post 带参请求
public
Response
postResponse
(
Map
<
String
,
Object
>
params
,
String
path
)
{
public
Response
postResponse
(
Map
<
String
,
Object
>
params
,
String
path
)
{
String
jsonStr
=
JSONObject
.
toJSONString
(
params
);
String
jsonStr
=
JSONObject
.
toJSONString
(
params
);
System
.
out
.
println
(
jsonStr
);
Response
response
=
given
()
Response
response
=
given
()
.
cookies
(
agentCookies
)
.
cookies
(
agentCookies
)
.
headers
(
agentHeaders
)
.
headers
(
agentHeaders
)
...
...
src/test/liveTestNG.xml
View file @
403267d1
...
@@ -2,33 +2,33 @@
...
@@ -2,33 +2,33 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<!-- <test preserve-order="true" name="直播素材">--
>
<test
preserve-order=
"true"
name=
"直播素材"
>
<!-- <classes>--
>
<classes
>
<!-- <class name="com.kjj.cases.live.liveConfig.LiveMaterial"/>--
>
<class
name=
"com.kjj.cases.live.liveConfig.LiveMaterial"
/
>
<!-- </classes>--
>
</classes
>
<!-- </test>--
>
</test
>
<!-- <test preserve-order="true" name="团队管理">--
>
<test
preserve-order=
"true"
name=
"团队管理"
>
<!-- <classes>--
>
<classes
>
<!-- <class name="com.kjj.cases.live.liveConfig.Team"/>--
>
<class
name=
"com.kjj.cases.live.liveConfig.Team"
/
>
<!-- </classes>--
>
</classes
>
<!-- </test>--
>
</test
>
<!-- <test preserve-order="true" name="精彩视频">--
>
<test
preserve-order=
"true"
name=
"精彩视频"
>
<!-- <classes>--
>
<classes
>
<!-- <class name="com.kjj.cases.live.liveConfig.Video"/>--
>
<class
name=
"com.kjj.cases.live.liveConfig.Video"
/
>
<!-- </classes>--
>
</classes
>
<!-- </test>--
>
</test
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/>
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/>
</classes>
</classes>
</test>
</test>
<!-- <test preserve-order="true" name="成功案例">--
>
<test
preserve-order=
"true"
name=
"成功案例"
>
<!-- <classes>--
>
<classes
>
<!-- <class name="com.kjj.cases.live.liveConfig.LiveCase"/>--
>
<class
name=
"com.kjj.cases.live.liveConfig.LiveCase"
/
>
<!-- </classes>--
>
</classes
>
<!-- </test>--
>
</test
>
<test
preserve-order=
"true"
name=
"资料贴片"
>
<test
preserve-order=
"true"
name=
"资料贴片"
>
<classes>
<classes>
...
...
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