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
dd82d44a
Commit
dd82d44a
authored
Mar 25, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20210325_zz' into 'master'
新增代理人排行榜及我的客户列表 See merge request test-group/kejiji!36
parents
8cd685e7
04bde0f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
212 additions
and
1 deletion
+212
-1
LiveAgent.java
src/test/java/com/kjj/cases/live/LiveAgent.java
+207
-0
liveTestNG.xml
src/test/liveTestNG.xml
+5
-1
No files found.
src/test/java/com/kjj/cases/live/LiveAgent.java
0 → 100644
View file @
dd82d44a
package
com
.
kjj
.
cases
.
live
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
public
class
LiveAgent
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
String
liveid
;
public
String
pageIndex
;
public
String
pageSize
;
public
String
agentId
;
//代理人直播排行榜;
// 获取个人榜;
@Test
(
description
=
"获取排行榜页面个人榜单"
,
priority
=
1
)
public
void
获取排行榜页面个人榜单
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
,
"获取个人榜单失败"
,
response
.
body
().
asString
()));
}
// 获取团队榜;
@Test
(
description
=
"获取排行榜页面团队榜单"
,
priority
=
2
)
public
void
获取排行榜页面团队榜单
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
,
"获取团队榜单失败"
,
response
.
body
().
asString
()));
}
// 获取队内榜;
@Test
(
description
=
"获取排行榜页面队内榜单"
,
priority
=
3
)
public
void
获取排行榜页面队内榜单
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalTeamCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalTeamCharts
,
"获取队内榜单失败"
,
response
.
body
().
asString
()));
}
// 获取代理人直播海报信息;
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
4
)
public
void
获取代理人直播海报信息
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
MOBILE_GetAgentPosterInfo
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_GetAgentPosterInfo
,
"获取队内榜单失败"
,
response
.
body
().
asString
()));
}
//代理人我的客户列表;
// 获取代理人各线索等级的线索数;
@Test
(
description
=
"获取线索等级的线索数"
,
priority
=
5
)
public
void
获取线索等级的线索数
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueNum
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"获取线索数失败"
,
response
.
body
().
asString
()));
}
// 获取直播中直播结束线索列表;
@Test
(
description
=
"获取线索列表"
,
priority
=
6
)
public
void
获取线索列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
2
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取线索列表失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表全部tab;
@Test
(
description
=
"获取线索列表全部tab数据"
,
priority
=
7
)
public
void
获取线索列表全部
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取全部tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表新客户tab;
@Test
(
description
=
"获取线索列表新客户tab数据"
,
priority
=
8
)
public
void
获取线索列表新客户
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
22
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取新客户tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表老客户tab;
@Test
(
description
=
"获取线索列表老客户tab数据"
,
priority
=
9
)
public
void
获取线索列表老客户
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
26
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取老客户tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表未观看tab;
@Test
(
description
=
"获取线索列表未观看tab数据"
,
priority
=
10
)
public
void
获取线索列表未观看
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
24
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取未观看tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表中奖tab;
@Test
(
description
=
"获取线索列表中奖tab数据"
,
priority
=
11
)
public
void
获取线索列表中奖
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
17
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取中奖tab下数据失败"
,
response
.
body
().
asString
()));
}
// 获取线索列表报名tab;
@Test
(
description
=
"获取线索列表报名tab数据"
,
priority
=
12
)
public
void
获取线索列表报名
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
// params.put("liveId",liveID);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取报名tab下数据失败"
,
response
.
body
().
asString
()));
}
}
\ No newline at end of file
src/test/liveTestNG.xml
View file @
dd82d44a
...
@@ -31,7 +31,11 @@
...
@@ -31,7 +31,11 @@
<class
name=
"com.kjj.cases.live.OpenLive"
/>
<class
name=
"com.kjj.cases.live.OpenLive"
/>
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"获取代理人排行榜及客户信息"
>
<classes>
<class
name=
"com.kjj.cases.live.LiveAgent"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.CloseLive"
/>
<class
name=
"com.kjj.cases.live.CloseLive"
/>
...
...
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