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
ce51c1eb
Commit
ce51c1eb
authored
Sep 17, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加评论区回复的接口用例
parent
caf6e3c8
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
287 additions
and
124 deletions
+287
-124
VoList.java
src/test/java/com/kjj/bean/issue/VoList.java
+2
-1
Comment.java
src/test/java/com/kjj/cases/live/liveConfig/Comment.java
+271
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+1
-1
spec.java
src/test/java/com/kjj/cases/live/liveConfig/spec.java
+0
-4
Question.java
src/test/java/com/kjj/cases/live/question/Question.java
+0
-113
TimeRed.java
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
+1
-0
TreasureTime.java
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
+3
-2
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-2
liveTestNG.xml
src/test/liveTestNG.xml
+7
-1
No files found.
src/test/java/com/kjj/bean/issue/VoList.java
View file @
ce51c1eb
...
...
@@ -6,5 +6,6 @@ import lombok.Data;
public
class
VoList
{
private
String
name
;
private
String
msg
;
private
String
replyUserId
;
private
String
replyName
;
}
src/test/java/com/kjj/cases/live/liveConfig/Comment.java
0 → 100644
View file @
ce51c1eb
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
ce51c1eb
...
...
@@ -50,7 +50,7 @@ public class SaveLive implements Authorization {
Params
.
put
(
"mpShareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg"
);
Params
.
put
(
"title"
,
"直播测试"
+
RandomUtils
.
nextInt
(
1
,
100
));
Params
.
put
(
"mpShareTitle"
,
"自动化直播"
);
Params
.
put
(
"companyId"
,
101
);
Params
.
put
(
"companyId"
,
101
);
//公司
Params
.
put
(
"agentInviteAuthType"
,
1
);
Params
.
put
(
"agentInviteAuthLimitNum"
,
1
);
long
noticeTime
=
DateUtils
.
addHours
(
new
Date
(),
2
).
getTime
();
...
...
src/test/java/com/kjj/cases/live/liveConfig/spec.java
View file @
ce51c1eb
...
...
@@ -55,8 +55,4 @@ public class spec implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveSpecifyAwardConf
,
"新增指定中奖付款码失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/question/Question.java
View file @
ce51c1eb
...
...
@@ -180,117 +180,4 @@ public class Question implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNotice
,
"代理人端公告查询失败"
,
response
.
body
().
asString
()));
}
public
long
time
;
//***************评论***************//
//助播端历史评论200条
@Test
(
description
=
"助播端历史评论200条"
,
priority
=
12
)
public
void
助播端查询历史评论
()
{
ThreadSleepUtils
.
sleep
(
5000
);
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeAdmin
);
System
.
out
.
println
(
response
.
body
().
asString
());
SpokeList
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
SpokeList
.
class
);
time
=
list
.
getNow
();
System
.
out
.
println
(
time
);
System
.
out
.
println
(
System
.
currentTimeMillis
()
+
","
+
JSON
.
toJSONString
(
list
));
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeAdmin
,
"助播端评论查询失败"
,
response
.
body
().
asString
()));
}
//助播端评论区实时评论查询
@Test
(
description
=
"助播端评论区实时评论查询"
,
priority
=
13
)
public
void
助播端评论区实时评论查询
()
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"time"
,
time
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeList
);
Spolist
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
Spolist
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeList
,
"助播端评论区实时评论查询失败"
,
response
.
body
().
asString
()));
}
//访客端评论区历史评论
@Test
(
description
=
"访客端评论区历史评论"
,
priority
=
14
)
public
void
访客端评论区历史评论
()
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeHistoryList
);
SpokeList
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
SpokeList
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeHistoryList
,
"访客端评论区历史评论失败"
,
response
.
body
().
asString
()));
}
//直播间访客发送给评论
@Test
(
description
=
"直播间访客发送给评论"
,
priority
=
15
)
public
void
直播间访客发送给评论
()
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"msg"
,
"主播真有气质"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_SpokeSend
);
System
.
out
.
println
(
response
);
Assert
.
assertNotNull
(
response
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeSend
,
"直播间访客发送给评论失败"
,
response
.
body
().
asString
()));
}
//直播间访客查询实时评论
@Test
(
description
=
"直播间访客查询实时评论"
,
priority
=
16
)
public
void
直播间访客查询实时评论
()
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"time"
,
time
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeList
);
Spolist
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
Spolist
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeList
,
"直播间访客查询实时评论失败"
,
response
.
body
().
asString
()));
}
//代理端评论区历史评论
@Test
(
description
=
"代理端评论区历史评论"
,
priority
=
17
)
public
void
代理端评论区历史评论
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeHistoryList
);
SpokeList
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
SpokeList
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeHistoryList
,
"代理端评论区历史评论失败"
,
response
.
body
().
asString
()));
}
//代理端访客发送给评论
@Test
(
description
=
"直播间代理端发送给评论"
,
priority
=
18
)
public
void
直播间代理端发送给评论
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"msg"
,
"主播真有气质"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_SpokeSend
);
System
.
out
.
println
(
response
);
Assert
.
assertNotNull
(
response
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeSend
,
"直播间访客发送给评论失败"
,
response
.
body
().
asString
()));
}
//直播间代理端查询实时评论
@Test
(
description
=
"直播间代理端查询实时评论"
,
priority
=
19
)
public
void
直播间代理端查询实时评论
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"time"
,
time
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_SpokeList
);
Spolist
list
=
JsonUtil
.
parseResponseToBeanTT
(
response
,
Spolist
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_SpokeList
,
"直播间访客查询实时评论失败"
,
response
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
View file @
ce51c1eb
...
...
@@ -457,6 +457,7 @@ public class TimeRed implements Authorization {
Params
.
clear
();
Params
.
put
(
"redRoundId"
,
list
.
get
(
4
).
getId
());
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_deleteTask
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_deleteTask
,
"删除第5轮时长红包任务失败"
,
response
.
body
().
asString
()));
...
...
src/test/java/com/kjj/cases/live/treasure/TreasureTime.java
View file @
ce51c1eb
...
...
@@ -60,8 +60,8 @@ public class TreasureTime implements Authorization {
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"treasureConfId"
,
this
.
treasureConfId
.
get
(
0
).
getTreasureConfId
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_finish
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_finish
,
"访客H获取宝箱参与情况失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -73,6 +73,7 @@ public class TreasureTime implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_joinDetail1
);
System
.
out
.
println
(
response
.
body
().
asString
());
List
<
CondDetail
>
treasureList
=
JsonUtil
.
parseResponseToListBean
(
response
,
CondDetail
.
class
,
"condDetail"
);
boolean
finishFlag
=
treasureList
.
get
(
0
).
isFinishFlag
();
System
.
out
.
println
(
finishFlag
);
...
...
@@ -88,8 +89,8 @@ public class TreasureTime implements Authorization {
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"treasureConfId"
,
this
.
treasureConfId
.
get
(
0
).
getTreasureConfId
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_treasureOpen
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_treasureOpen
,
"访客H开启第1个宝箱失败"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
ce51c1eb
...
...
@@ -520,8 +520,6 @@ public class BasicConfig {
public
static
final
String
MANAGER_CompanyVideoDown
=
MANAGER_HOST
+
"/kjy/manager/live/company/video/down"
;
public
static
final
String
MANAGER_CompanyVideoDelete
=
MANAGER_HOST
+
"/kjy/manager/live/company/video/delete"
;
//查询资料列表//
public
static
final
String
MOBILE_Resource
=
MOBILE_HOST
+
"/clue/resource/list"
;
public
static
final
String
MOBILE_ResourceOn
=
MOBILE_HOST
+
"/conf/live/push/on"
;
...
...
@@ -576,6 +574,8 @@ public class BasicConfig {
public
static
final
String
MOBILE_SpokeList
=
MOBILE_SPOKEHOST
+
"/spoke/list"
;
public
static
final
String
MOBILE_SpokeHistoryList
=
MOBILE_SPOKEHOST
+
"/spoke/historyList"
;
public
static
final
String
MOBILE_SpokeSend
=
MOBILE_SPOKEHOST
+
"/spoke/send"
;
public
static
final
String
MANAGER_send
=
MANAGER_HOST
+
"/kjy/manager/live/spoke/send"
;
public
static
final
String
MOBILE_bannedSpoke
=
MOBILE_HOST
+
"/kjy/admin/bannedSpoke"
;
//红包//
public
static
final
String
MOBILE_AnchorRedList
=
MOBILE_HOST
+
"/conf/live/red/findRedList"
;
...
...
src/test/liveTestNG.xml
View file @
ce51c1eb
...
...
@@ -29,6 +29,7 @@
<class
name=
"com.kjj.cases.live.liveConfig.SaveLive"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"配置秒杀轮次及秒杀预告"
>
<classes>
<class
name=
"com.kjj.cases.live.secondKill.ConfSecondKill"
/>
...
...
@@ -47,7 +48,6 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"代理人首页"
>
<classes>
<class
name=
"com.kjj.cases.live.agent.Agent"
/>
...
...
@@ -110,6 +110,12 @@
<class
name=
"com.kjj.cases.live.anchor.OpenLive"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"评论及回复"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.Comment"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"直播中编辑资料"
>
<classes>
<class
name=
"com.kjj.cases.live.liveConfig.EvaluationConf"
/>
...
...
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