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
bd96bb49
Commit
bd96bb49
authored
Apr 16, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20210416_zz' into 'master'
Feature/20210416 zz See merge request test-group/kejiji!53
parents
6d2695ad
0f39d089
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
186 additions
and
1 deletion
+186
-1
AgentVideo.java
src/test/java/com/kjj/bean/agent/AgentVideo.java
+28
-0
LiveAgent.java
src/test/java/com/kjj/cases/live/agent/LiveAgent.java
+148
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+10
-0
No files found.
src/test/java/com/kjj/bean/agent/AgentVideo.java
0 → 100644
View file @
bd96bb49
package
com
.
kjj
.
bean
.
agent
;
import
com.sun.org.apache.xpath.internal.objects.XString
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
@Data
public
class
AgentVideo
{
private
int
pageIndex
;
private
int
pageSize
;
private
String
totalCount
;
private
List
<
videolist
>
list
;
private
boolean
hasNext
;
private
String
totalPage
;
@Data
public
static
class
videolist
{
private
String
id
;
private
String
videoTitle
;
private
String
videoTag
;
private
String
videoTop
;
private
String
videoFirstImg
;
private
String
watchNum
;
private
String
gmtCreate
;
}
}
src/test/java/com/kjj/cases/live/agent/LiveAgent.java
View file @
bd96bb49
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.kjj.bean.agent.AgentBean
;
import
com.kjj.bean.agent.AgentCard
;
import
com.kjj.bean.agent.AgentEndList
;
import
com.kjj.bean.agent.AgentVideo
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
...
...
@@ -37,6 +38,12 @@ public class LiveAgent implements AdminAuthorization {
public
String
phoneNumber
;
public
String
jobNumber
;
public
String
teamName
;
public
String
id
;
public
String
videoTitle
;
public
String
watchNum
;
public
String
shareNum
;
public
String
likeNum
;
public
String
videoTime
;
...
...
@@ -430,8 +437,148 @@ public class LiveAgent implements AdminAuthorization {
// }
//视频列表
//获取代理人首页视频列表
@Test
(
description
=
"获取代理人首页视频列表"
,
priority
=
27
)
public
void
获取代理人首页视频列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"companyId"
,
"Kj20ODE1"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_VideoList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoList
,
"获取代理人首页视频列表失败"
,
response
.
body
().
asString
()));
}
//获取代理人首页视频列表id、标题、观看人数
@Test
(
description
=
"获取代理人首页视频列表字段"
,
priority
=
28
)
public
void
获取代理人首页视频列表字段
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"companyId"
,
"Kj20ODE1"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_VideoList
);
AgentVideo
list
=
JsonUtil
.
parseResponseToBean
(
response
,
AgentVideo
.
class
);
id
=
list
.
getList
().
get
(
0
).
getId
();
videoTitle
=
list
.
getList
().
get
(
0
).
getVideoTitle
();
watchNum
=
list
.
getList
().
get
(
0
).
getWatchNum
();
System
.
out
.
println
(
id
);
System
.
out
.
println
(
videoTitle
);
System
.
out
.
println
(
watchNum
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ChoiceGetList
,
"获取代理人首页视频列表字段失败"
,
response
.
body
().
asString
()));
}
//获取视频详情
@Test
(
description
=
"获取视频详情"
,
priority
=
29
)
public
void
获取视频详情
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_VideoGetDetail
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
shareNum
=
response
.
jsonPath
().
getString
(
"data.vo.shareNum"
);
likeNum
=
response
.
jsonPath
().
getString
(
"data.vo.likeNum"
);
System
.
out
.
println
(
success
);
System
.
out
.
println
(
shareNum
);
System
.
out
.
println
(
likeNum
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoGetDetail
,
"获取视频详情失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
shareNum
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoGetDetail
,
"获取视频详情分享数失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
likeNum
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoGetDetail
,
"获取视频详情点赞数失败"
,
response
.
body
().
asString
()));
}
//获取视频分享信息
@Test
(
description
=
"获取视频分享信息"
,
priority
=
30
)
public
void
获取视频分享信息
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
params
.
put
(
"companyId"
,
"Kj20ODE1"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_VideoShareInfo
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoShareInfo
,
"获取视频分享信息失败"
,
response
.
body
().
asString
()));
}
//获取视频转发是否成功
@Test
(
description
=
"获取视频转发是否成功"
,
priority
=
31
)
public
void
获取视频转发是否成功
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_VideoForward
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoForward
,
"视频转发失败"
,
response
.
body
().
asString
()));
}
//获取视频能否正常观看
@Test
(
description
=
"获取视频能否正常观看"
,
priority
=
32
)
public
void
获取视频能否正常观看
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_VideoWatch
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoWatch
,
"视频播放失败"
,
response
.
body
().
asString
()));
}
//视频点赞
@Test
(
description
=
"获取视频能否正常点赞"
,
priority
=
33
)
public
void
获取视频能否正常点赞
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
params
.
put
(
"type"
,
"1"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_VideoLike
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoLike
,
"点赞失败"
,
response
.
body
().
asString
()));
}
//视频取消点赞
@Test
(
description
=
"获取视频能否取消点赞"
,
priority
=
34
)
public
void
获取视频能否取消点赞
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
params
.
put
(
"type"
,
"0"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_VideoLike
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_VideoLike
,
"取消点赞失败"
,
response
.
body
().
asString
()));
}
//获取代理人教程列表
@Test
(
description
=
"获取代理人教程列表"
,
priority
=
36
)
public
void
获取代理人教程列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_LiveGuideList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_LiveGuideList
,
"获取代理人教程列表失败"
,
response
.
body
().
asString
()));
}
//获取教程列表单条数据
@Test
(
description
=
"获取教程列表单条数据"
,
priority
=
37
)
public
void
获取教程列表单条数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"id"
,
"Kj20NTgz"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_LiveGuideList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_LiveGuideList
,
"获取教程列表单条数据失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -441,4 +588,4 @@ public class LiveAgent implements AdminAuthorization {
}
\ No newline at end of file
}
\ No newline at end of file
src/test/java/com/kjj/config/BasicConfig.java
View file @
bd96bb49
...
...
@@ -140,6 +140,16 @@ public class BasicConfig {
public
static
final
String
MOBILE_ClueList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/list"
;
public
static
final
String
MOBILE_MyCustomerList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/myCustomerList"
;
public
static
final
String
MOBILE_RewardAgentList
=
MOBILE_HOST
+
"/kjy/live/reward/agent/list"
;
public
static
final
String
MOBILE_VideoList
=
MOBILE_HOST
+
"/kjy/live/company/video/list"
;
public
static
final
String
MOBILE_VideoGetDetail
=
MOBILE_HOST
+
"/kjy/live/company/video/getDetail"
;
public
static
final
String
MOBILE_VideoShareInfo
=
MOBILE_HOST
+
"/kjy/live/company/video/shareInfo"
;
public
static
final
String
MOBILE_VideoForward
=
MOBILE_HOST
+
"/kjy/live/company/video/forward"
;
public
static
final
String
MOBILE_VideoWatch
=
MOBILE_HOST
+
"/kjy/live/company/video/watch"
;
public
static
final
String
MOBILE_VideoLike
=
MOBILE_HOST
+
"/kjy/live/company/video/like"
;
public
static
final
String
MOBILE_LiveGuideList
=
MOBILE_HOST
+
"/kjy/live/guide/list"
;
//查询资料列表//
public
static
final
String
MOBILE_Resource
=
MOBILE_HOST
+
"/clue/resource/list"
;
...
...
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