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
d01380e9
Commit
d01380e9
authored
Apr 01, 2021
by
张慧锋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c0a8259e
e015929d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
26 deletions
+75
-26
LiveAgent.java
src/test/java/com/kjj/cases/live/LiveAgent.java
+71
-25
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-1
No files found.
src/test/java/com/kjj/cases/live/LiveAgent.java
View file @
d01380e9
package
com
.
kjj
.
cases
.
live
;
package
com
.
kjj
.
cases
.
live
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.constants.LiveConstants
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
...
@@ -9,7 +11,9 @@ import org.testng.annotations.Test;
...
@@ -9,7 +11,9 @@ import org.testng.annotations.Test;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
...
@@ -20,6 +24,10 @@ public class LiveAgent implements AdminAuthorization {
...
@@ -20,6 +24,10 @@ public class LiveAgent implements AdminAuthorization {
public
void
setUp
()
{
public
void
setUp
()
{
agentAuth
();
}
agentAuth
();
}
public
String
pageSize
;
public
String
pageSize
;
public
String
invitationNum
;
public
String
allNum
;
public
String
moreThan20MinNum
;
//代理人直播排行榜;
//代理人直播排行榜;
...
@@ -32,11 +40,26 @@ public class LiveAgent implements AdminAuthorization {
...
@@ -32,11 +40,26 @@ public class LiveAgent implements AdminAuthorization {
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_AgentPersonalCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalCharts
,
"获取个人榜单失败"
,
response
.
body
().
asString
()));
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
invitationNum
=
response
.
jsonPath
().
getString
(
"data.invitationNum"
);
System
.
out
.
println
(
"success="
+
success
+
",invitationNum="
+
invitationNum
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentOwnCharts
,
"获取代理人自己的榜单信息"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
invitationNum
,
network
.
message
(
MOBILE_AgentOwnCharts
,
"获取代理人自己榜单内的邀请人数失败"
,
response
.
body
().
asString
()));
}
// 获取团队榜;
// 获取团队榜;
@Test
(
description
=
"获取排行榜页面团队榜单"
,
priority
=
2
)
@Test
(
description
=
"获取排行榜页面团队榜单"
,
priority
=
3
)
public
void
获取排行榜页面团队榜单
()
throws
IOException
{
public
void
获取排行榜页面团队榜单
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -44,143 +67,166 @@ public class LiveAgent implements AdminAuthorization {
...
@@ -44,143 +67,166 @@ public class LiveAgent implements AdminAuthorization {
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_TeamTeamCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
,
"获取团队榜单失败"
,
response
.
body
().
asString
()));
List
<
String
>
list
=
response
.
jsonPath
().
getList
(
"data.list.teamName"
);
System
.
out
.
println
(
"-------"
+
list
.
size
());
for
(
String
name:
list
){
System
.
out
.
println
(
"success="
+
success
+
",teamName="
+
name
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_TeamTeamCharts
,
"获取团队榜单失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
name
,
network
.
message
(
MOBILE_TeamTeamCharts
,
"榜单内团队名称获取失败"
,
response
.
body
().
asString
()));
}
}
}
// 获取队内榜;
// 获取队内榜;
@Test
(
description
=
"获取排行榜页面队内榜单"
,
priority
=
3
)
@Test
(
description
=
"获取排行榜页面队内榜单"
,
priority
=
4
)
public
void
获取排行榜页面队内榜单
()
throws
IOException
{
public
void
获取排行榜页面队内榜单
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"pageSize"
,
20
);
// params.put("liveId",liveID);
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_AgentPersonalTeamCharts
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_AgentPersonalTeamCharts
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalTeamCharts
,
"获取队内榜单失败"
,
response
.
body
().
asString
()));
List
<
String
>
list
=
response
.
jsonPath
().
getList
(
"data.list.agentName"
);
for
(
String
agentName:
list
){
System
.
out
.
println
(
"success="
+
success
+
",agentName="
+
agentName
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_AgentPersonalTeamCharts
,
"获取队内榜单失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
agentName
,
network
.
message
(
MOBILE_AgentPersonalTeamCharts
,
"队内榜代理人名称获取失败"
,
response
.
body
().
asString
()));
}
}
}
// 获取代理人直播海报信息;
// 获取代理人直播海报信息;
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
4
)
@Test
(
description
=
"获取代理人直播海报信息"
,
priority
=
5
)
public
void
获取代理人直播海报信息
()
throws
IOException
{
public
void
获取代理人直播海报信息
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
MOBILE_GetAgentPosterInfo
);
Response
response
=
network
.
getResponse
(
params
,
MOBILE_GetAgentPosterInfo
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_GetAgentPosterInfo
,
"获取队内榜单失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_GetAgentPosterInfo
,
"获取代理人直播海报信息失败"
,
response
.
body
().
asString
()));
}
}
//代理人我的客户列表;
//代理人我的客户列表;
// 获取代理人各线索等级的线索数;
// 获取代理人各线索等级的线索数;
@Test
(
description
=
"获取线索等级的线索数"
,
priority
=
5
)
@Test
(
description
=
"获取线索等级的线索数"
,
priority
=
6
)
public
void
获取线索等级的线索数
()
throws
IOException
{
public
void
获取线索等级的线索数
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueNum
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueNum
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
allNum
=
response
.
jsonPath
().
getString
(
"data.allNum"
);
moreThan20MinNum
=
response
.
jsonPath
().
getString
(
"data.moreThan20MinNum"
);
System
.
out
.
println
(
"success="
+
success
+
",allNum="
+
allNum
+
",moreThan20MinNum="
+
moreThan20MinNum
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"获取线索数失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"获取线索数失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
allNum
,
network
.
message
(
MOBILE_TeamTeamCharts
,
"获取所有线索数量失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
moreThan20MinNum
,
network
.
message
(
MOBILE_TeamTeamCharts
,
"获取观看超过20分钟的人数失败"
,
response
.
body
().
asString
()));
}
}
// 获取直播中直播结束线索列表;
// 获取直播中直播结束线索列表;
@Test
(
description
=
"获取线索列表"
,
priority
=
6
)
@Test
(
description
=
"获取线索列表"
,
priority
=
7
)
public
void
获取线索列表
()
throws
IOException
{
public
void
获取线索列表
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
2
);
params
.
put
(
"pageIndex"
,
2
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
20
);
params
.
put
(
"actionTypeList"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取线索列表失败"
,
response
.
body
().
asString
()));
List
<
String
>
list
=
response
.
jsonPath
().
getList
(
"data.list.name"
);
System
.
out
.
println
(
"-------"
+
list
.
size
());
for
(
String
name:
list
){
System
.
out
.
println
(
"-------"
+
list
.
size
());
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取线索列表失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
name
,
network
.
message
(
MOBILE_ClueList
,
"线索列表微信昵称获取失败"
,
response
.
body
().
asString
()));
}
}
}
// 获取线索列表全部tab;
// 获取线索列表全部tab;
@Test
(
description
=
"获取线索列表全部tab数据"
,
priority
=
7
)
@Test
(
description
=
"获取线索列表全部tab数据"
,
priority
=
8
)
public
void
获取线索列表全部
tab
数据
()
throws
IOException
{
public
void
获取线索列表全部
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取全部tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取全部tab下数据失败"
,
response
.
body
().
asString
()));
}
}
// 获取线索列表新客户tab;
// 获取线索列表新客户tab;
@Test
(
description
=
"获取线索列表新客户tab数据"
,
priority
=
8
)
@Test
(
description
=
"获取线索列表新客户tab数据"
,
priority
=
9
)
public
void
获取线索列表新客户
tab
数据
()
throws
IOException
{
public
void
获取线索列表新客户
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
22
);
params
.
put
(
"actionTypeList"
,
22
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取新客户tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取新客户tab下数据失败"
,
response
.
body
().
asString
()));
}
}
// 获取线索列表老客户tab;
// 获取线索列表老客户tab;
@Test
(
description
=
"获取线索列表老客户tab数据"
,
priority
=
9
)
@Test
(
description
=
"获取线索列表老客户tab数据"
,
priority
=
10
)
public
void
获取线索列表老客户
tab
数据
()
throws
IOException
{
public
void
获取线索列表老客户
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
26
);
params
.
put
(
"actionTypeList"
,
26
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取老客户tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取老客户tab下数据失败"
,
response
.
body
().
asString
()));
}
}
// 获取线索列表未观看tab;
// 获取线索列表未观看tab;
@Test
(
description
=
"获取线索列表未观看tab数据"
,
priority
=
1
0
)
@Test
(
description
=
"获取线索列表未观看tab数据"
,
priority
=
1
1
)
public
void
获取线索列表未观看
tab
数据
()
throws
IOException
{
public
void
获取线索列表未观看
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
24
);
params
.
put
(
"actionTypeList"
,
24
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取未观看tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取未观看tab下数据失败"
,
response
.
body
().
asString
()));
}
}
// 获取线索列表中奖tab;
// 获取线索列表中奖tab;
@Test
(
description
=
"获取线索列表中奖tab数据"
,
priority
=
1
1
)
@Test
(
description
=
"获取线索列表中奖tab数据"
,
priority
=
1
2
)
public
void
获取线索列表中奖
tab
数据
()
throws
IOException
{
public
void
获取线索列表中奖
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
17
);
params
.
put
(
"actionTypeList"
,
17
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取中奖tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取中奖tab下数据失败"
,
response
.
body
().
asString
()));
}
}
// 获取线索列表报名tab;
// 获取线索列表报名tab;
@Test
(
description
=
"获取线索列表报名tab数据"
,
priority
=
1
2
)
@Test
(
description
=
"获取线索列表报名tab数据"
,
priority
=
1
3
)
public
void
获取线索列表报名
tab
数据
()
throws
IOException
{
public
void
获取线索列表报名
tab
数据
()
throws
IOException
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
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
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
20
);
params
.
put
(
"actionTypeList"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取报名tab下数据失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取报名tab下数据失败"
,
response
.
body
().
asString
()));
}
}
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
d01380e9
...
@@ -11,7 +11,7 @@ public class BasicConfig {
...
@@ -11,7 +11,7 @@ public class BasicConfig {
public
static
final
String
OPEN_ID
=
"osi5w5ggFiEXk0tPJH9b0KO_XU08"
;
public
static
final
String
OPEN_ID
=
"osi5w5ggFiEXk0tPJH9b0KO_XU08"
;
//直播管理员(嘿 保险)
//直播管理员(嘿 保险)
public
static
String
ADMIN_KEY
=
"LEH7epeHVDJWzhZ6DiexTHn
fZY1XcX7aBeCVXnN9q7y4raLKHyfe7RFy96seJBQ9NSPqtdNg8JjgUTDUcMu8pjJVo6Js6
"
;
public
static
String
ADMIN_KEY
=
"LEH7epeHVDJWzhZ6DiexTHn
sxr9dj8m9E3cwnnww5M4EuupwiJ3fYP8A6Ahrc22htzmVfYnNSfxHirjfK4BMwzQgtvhqh
"
;
// 直播代理人 (艳玲)
// 直播代理人 (艳玲)
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"
;
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"
;
...
@@ -121,6 +121,9 @@ public class BasicConfig {
...
@@ -121,6 +121,9 @@ public class BasicConfig {
public
static
final
String
MOBILE_TeamTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/teamCharts"
;
public
static
final
String
MOBILE_TeamTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/teamCharts"
;
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
public
static
final
String
MOBILE_AgentOwnCharts
=
MOBILE_HOST
+
"/kjy/live/agent/ownCharts"
;
//代理人列表//
//代理人列表//
...
...
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