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
167dc9a0
Commit
167dc9a0
authored
Jul 11, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1e1a4e4d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
273 additions
and
48 deletions
+273
-48
LiveUserList.java
src/test/java/com/kjj/bean/agent/LiveUserList.java
+8
-0
RecommendMaterial.java
src/test/java/com/kjj/cases/assistant/RecommendMaterial.java
+1
-1
LiveBefore.java
src/test/java/com/kjj/cases/live/agent/LiveBefore.java
+1
-1
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+222
-29
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+1
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+28
-9
liveTestNG.xml
src/test/liveTestNG.xml
+12
-7
No files found.
src/test/java/com/kjj/bean/agent/LiveUserList.java
0 → 100644
View file @
167dc9a0
package
com
.
kjj
.
bean
.
agent
;
import
lombok.Data
;
@Data
public
class
LiveUserList
{
private
String
liveUserId
;
}
src/test/java/com/kjj/cases/assistant/RecommendMaterial.java
View file @
167dc9a0
...
...
@@ -2,7 +2,7 @@ package com.kjj.cases.assistant;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
com.kjj.bean.welfare.Welfare
;
//
import com.kjj.bean.welfare.Welfare;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.JsonUtil
;
...
...
src/test/java/com/kjj/cases/live/agent/LiveBefore.java
View file @
167dc9a0
...
...
@@ -22,7 +22,7 @@ public class LiveBefore implements Authorization {
//直播前我的客户页面
// 获取直播前我的客户页面全部tab;
@Test
(
description
=
"获取直播前我的客户页面全部tab数据"
,
priority
=
1
)
public
void
获取直播前我的客户页面全部
tab
数据
()
throws
IOException
{
public
void
获取直播前我的客户页面全部
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"pageIndex"
,
1
);
...
...
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
167dc9a0
package
com
.
kjj
.
cases
.
live
.
agent
;
import
com.kjj.bean.agent.LiveUserList
;
import
com.kjj.cases.admin.Authorization
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.JsonUtil
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
LiveLater
implements
Authorization
{
@BeforeClass
public
void
setUp
()
{
agentAuth
();
}
public
void
setUp
()
{
agentAuth
();
}
public
String
pageSize
;
public
List
<
LiveUserList
>
liveUserId
;
//获取回收成功案例
@Test
(
description
=
"获取回收成功案例"
,
priority
=
1
)
public
void
获取回收成功案例
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_recycleSuccessCase
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_recycleSuccessCase
,
"接口请求失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_recycleSuccessCase
,
"未获取到成功案例"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取直播案例"
,
priority
=
2
)
public
void
获取直播案例
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_successCase
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_successCase
,
"接口请求失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_successCase
,
"未获取到直播案例"
,
response
.
body
().
asString
()));
}
//直播结束我的客户页面
// 获取直播结束我的客户页面全部tab;
@Test
(
description
=
"获取直播结束我的客户页面全部tab数据"
,
priority
=
1
)
public
void
获取直播结束我的客户页面全部
tab
数据
()
{
@Test
(
description
=
"获取代理人各线索等级的线索数"
,
priority
=
3
)
public
void
获取代理人各线索等级的线索数
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueNum
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
success
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"接口请求失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
long
allNum
=
response
.
jsonPath
().
getLong
(
"data.allNum"
);
Assert
.
assertTrue
(
allNum
==
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"总的线索数不对"
,
response
.
body
().
asString
()));
long
newCustomNum
=
response
.
jsonPath
().
getLong
(
"data.newCustomNum"
);
Assert
.
assertTrue
(
newCustomNum
==
15
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"转介绍线索数不对"
,
response
.
body
().
asString
()));
long
oldCustomNum
=
response
.
jsonPath
().
getLong
(
"data.oldCustomNum"
);
Assert
.
assertTrue
(
oldCustomNum
==
3
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"直接邀请线索数不对"
,
response
.
body
().
asString
()));
long
awardNum
=
response
.
jsonPath
().
getLong
(
"data.awardNum"
);
Assert
.
assertTrue
(
awardNum
==
7
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"中奖数量不对"
,
response
.
body
().
asString
()));
boolean
showAward
=
response
.
jsonPath
().
getBoolean
(
"data.showAward"
);
Assert
.
assertTrue
(
showAward
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"未展示中奖tab"
,
response
.
body
().
asString
()));
long
submitFormNum
=
response
.
jsonPath
().
getLong
(
"data.submitFormNum"
);
Assert
.
assertTrue
(
submitFormNum
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"报名数量不对"
,
response
.
body
().
asString
()));
boolean
showSubmitForm
=
response
.
jsonPath
().
getBoolean
(
"data.showSubmitForm"
);
Assert
.
assertTrue
(
showSubmitForm
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueNum
,
"未展示报名tab"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取发奖人信息"
,
priority
=
4
)
public
void
获取发奖人信息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_providerInfo
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
String
nickname
=
response
.
jsonPath
().
getString
(
"data.nickname"
);
Assert
.
assertEquals
(
nickname
,
"张三"
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_providerInfo
,
"未获取到发奖人姓名"
,
response
.
body
().
asString
()));
String
phoneNumber
=
response
.
jsonPath
().
getString
(
"data.phoneNumber"
);
Assert
.
assertEquals
(
phoneNumber
,
"15558005636"
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_providerInfo
,
"未获取到发奖人手机号"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"直播结束线索列表页"
,
priority
=
5
)
public
void
直播结束线索列表页
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束后全部tab下数据失败"
,
response
.
body
().
asString
()));
List
<
LiveUserList
>
lists
=
JsonUtil
.
parseResponseToPageBean
(
response
,
LiveUserList
.
class
);
this
.
liveUserId
=
lists
;
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"线索数量不对"
,
response
.
body
().
asString
()));
}
// 获取直播结束我的客户页面直接邀请tab;
@Test
(
description
=
"
获取直播结束我的客户页面直接邀请tab数据"
,
priority
=
2
)
public
void
获取直播结束我的客户页面
直接邀请
tab
数据
()
{
@Test
(
description
=
"
直接邀请tab数据"
,
priority
=
6
)
public
void
直接邀请
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
26
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束我的客户页面直接邀请tab数据失败"
,
response
.
body
().
asString
()));
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
3
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"直接邀请线索数量不对"
,
response
.
body
().
asString
()));
}
// 获取直播结束我的客户页面转介绍tab;
@Test
(
description
=
"
获取直播结束我的客户页面转介绍tab数据"
,
priority
=
3
)
public
void
获取直播结束我的客户页面
转介绍
tab
数据
()
{
@Test
(
description
=
"
转介绍tab数据"
,
priority
=
7
)
public
void
转介绍
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
22
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束我的客户页面转介绍tab数据失败"
,
response
.
body
().
asString
()));
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
15
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"转介绍线索数量不对"
,
response
.
body
().
asString
()));
}
// 获取直播结束我的客户页面中奖tab;
@Test
(
description
=
"
获取直播结束我的客户页面中奖tab数据"
,
priority
=
4
)
public
void
获取直播结束我的客户页面
中奖
tab
数据
()
{
@Test
(
description
=
"
中奖tab数据"
,
priority
=
8
)
public
void
中奖
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
17
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束我的客户页面中奖tab数据失败"
,
response
.
body
().
asString
()));
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
7
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"中奖线索数量不对"
,
response
.
body
().
asString
()));
}
// 获取直播结束我的客户页面报名tab;
@Test
(
description
=
"
获取直播结束我的客户页面报名tab数据"
,
priority
=
5
)
public
void
获取直播结束我的客户页面
报名
tab
数据
()
{
@Test
(
description
=
"
报名tab数据"
,
priority
=
9
)
public
void
报名
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束我的客户页面报名tab数据失败"
,
response
.
body
().
asString
()));
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
2
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"报名线索数量不对"
,
response
.
body
().
asString
()));
}
// 获取直播结束我的客户页面观看20分钟+tab;
@Test
(
description
=
"
获取直播结束我的客户页面观看20分钟+tab数据"
,
priority
=
6
)
public
void
获取直播结束我的客户页面
观看
20
分钟以上
tab
数据
()
{
@Test
(
description
=
"
观看20分钟+tab数据"
,
priority
=
10
)
public
void
观看
20
分钟以上
tab
数据
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"actionTypeList"
,
4
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ClueList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"获取直播结束我的客户页面观看20分钟以上tab数据失败"
,
response
.
body
().
asString
()));
long
totalCount
=
response
.
jsonPath
().
getLong
(
"data.totalCount"
);
Assert
.
assertTrue
(
totalCount
==
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ClueList
,
"观看20分钟线索数量不对"
,
response
.
body
().
asString
()));
}
//直播结束后中奖名单查询
//
获取直播结束中奖名单;
@Test
(
description
=
"
获取直播结束中奖名单"
,
priority
=
7
)
public
void
获取直播结束中奖名单
()
{
//
查看客户线索详情
@Test
(
description
=
"
客户A线索已读"
,
priority
=
11
)
public
void
客户
A
线索已读
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_readClue
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_readClue
,
"客户A线索未读"
,
response
.
body
().
asString
()));
}
//需要校验返回结果
@Test
(
description
=
"查看客户A线索详情"
,
priority
=
12
)
public
void
查看客户
A
线索详情
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_getClueDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"查看客户A线索详情失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"获取回复建议"
,
priority
=
13
)
public
void
获取回复建议
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_getReplyAdvice
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getReplyAdvice
,
"获取回复建议失败"
,
response
.
body
().
asString
()));
}
//需要校验返回结果
@Test
(
description
=
"访客邀请列表"
,
priority
=
14
)
public
void
访客邀请列表
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_RewardAgentList
);
params
.
put
(
"pageSize"
,
10
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_userInviteList
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Object
list
=
response
.
jsonPath
().
getJsonObject
(
"data.list"
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_userInviteList
,
"访客邀请列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"备注客户姓名"
,
priority
=
15
)
public
void
备注客户姓名
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"remarkName"
,
"访客A"
);
params
.
put
(
"liveUserId"
,
this
.
liveUserId
.
get
(
0
).
getLiveUserId
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_updateRemarkName
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_updateRemarkName
,
"客户姓名备注失败"
,
response
.
body
().
asString
()));
}
//代理人首页已结束直播,查询待跟进线索数
@Test
(
description
=
"查询待跟进线索数"
,
priority
=
15
)
public
void
查询待跟进线索数
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_clueNum
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_RewardAgentList
,
"获取直播结束中奖名单失败"
,
response
.
body
().
asString
()));
Integer
clueCount
=
response
.
jsonPath
().
getInt
(
"data.clueCount"
);
Assert
.
assertTrue
(
clueCount
==
18
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueNum
,
"线索总数不对"
,
response
.
body
().
asString
()));
Integer
notFollowedClueCount
=
response
.
jsonPath
().
getInt
(
"data.notFollowedClueCount"
);
Assert
.
assertTrue
(
notFollowedClueCount
>
0
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueNum
,
"未跟进线索数不对"
,
response
.
body
().
asString
()));
}
//不确定业务场景
@Test
(
description
=
"代理人直播线索页分页查询咨询消息"
,
priority
=
16
)
public
void
代理人直播线索页分页查询咨询消息
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
// params.put("liveId","Kj21MzYyNjM");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_clueTextList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_clueTextList
,
"接口调用失败"
,
response
.
body
().
asString
()));
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
// Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_clueTextList, "咨询消息为null", response.body().asString()));
}
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
167dc9a0
...
...
@@ -377,7 +377,7 @@ public class SaveLive implements Authorization {
public
void
上传发奖团队名单
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
425/45c95c5bf7d8fb8aeb40c2ab307e0681
.xlsx"
);
Params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20210
707/fb54c08f13bae40e294e538c613478fa
.xlsx"
);
Params
.
put
(
"fileName"
,
"团队发奖人模板"
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_importGroupProvider
);
taskId
=
response
.
jsonPath
().
getInt
(
"data"
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
167dc9a0
...
...
@@ -82,10 +82,8 @@ public class BasicConfig {
public
static
final
String
SSO_HOST
=
"https://sso.duibatest.com.cn"
;
public
static
final
String
MANAGER_HOST
=
"https://kjj-mng.duibatest.com.cn"
;
//手机端地址
public
static
final
String
MOBILE_HOST
=
"https://live.duibatest.com.cn"
;
public
static
final
String
MOBILE_HOST1
=
"https://kjj.m.duibatest.com.cn"
;
//
public static final String MOBILE_HOST1 = "https://kjj.m.duibatest.com.cn";
public
static
final
String
MOBILE_SPOKEHOST
=
"https://tt.duibatest.com.cn"
;
// *************** 开启&结束直播 ***************
...
...
@@ -287,7 +285,7 @@ public class BasicConfig {
public
static
final
String
USER_SYCAPPOINTMENT
=
MOBILE_HOST
+
"/kjy/live/user/sycAppointment"
;
public
static
final
String
USER_savePoster
=
MOBILE_HOST
+
"/kjy/live/user/share/savePoster"
;
public
static
final
String
USER_myCount
=
MOBILE_HOST
+
"/kjy/live/user/lottery/myCount"
;
public
static
final
String
USER_wxIdAllList
=
MOBILE_HOST1
+
"/kjy/mp/msg/config/live/user/wxIdAllList"
;
public
static
final
String
USER_wxIdAllList
=
HOST
+
"/kjy/mp/msg/config/live/user/wxIdAllList"
;
// *************** 直播管理端 ***************
public
static
final
String
MANAGER_saveAndUpdate_0
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/saveAndUpdate"
;
...
...
@@ -322,7 +320,25 @@ public class BasicConfig {
// public static final String MANAGER_ = MANAGER_HOST + "";
// *************** 代理人 ***************
//代理人列表//
//回收成功案例//
public
static
final
String
MOBILE_recycleSuccessCase
=
MOBILE_HOST
+
"/kjy/live/agent/clue/recycleSuccessCase"
;
public
static
final
String
MOBILE_providerInfo
=
MOBILE_HOST
+
"/kjy/live/agent/clue/providerInfo"
;
public
static
final
String
MOBILE_successCase
=
HOST
+
"/kjy/mp/liveClue/successCase"
;
public
static
final
String
MOBILE_ClueNum
=
MOBILE_HOST
+
"/kjy/live/agent/clue/clueNum"
;
public
static
final
String
MOBILE_ClueList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/list"
;
public
static
final
String
MOBILE_readClue
=
MOBILE_HOST
+
"/kjy/live/agent/clue/readClue"
;
public
static
final
String
MOBILE_getClueDetail
=
MOBILE_HOST
+
"/kjy/live/agent/clue/getClueDetail"
;
public
static
final
String
MOBILE_userInviteList
=
MOBILE_HOST
+
"/kjy/live/agent/clue/userInviteList"
;
public
static
final
String
MOBILE_getReplyAdvice
=
MOBILE_HOST
+
"/kjy/live/agent/clue/getReplyAdvice"
;
public
static
final
String
MOBILE_updateRemarkName
=
MOBILE_HOST
+
"/kjy/live/agent/customer/updateRemarkName"
;
public
static
final
String
MOBILE_clueNum
=
MOBILE_HOST
+
"/kjy/live/agent/clueNum"
;
public
static
final
String
MOBILE_head
=
MOBILE_HOST
+
"/kjy/live/reward/agent/head"
;
public
static
final
String
MOBILE_RewardAgentList
=
MOBILE_HOST
+
"/kjy/live/reward/agent/list"
;
public
static
final
String
MOBILE_signInfo
=
MOBILE_HOST
+
"/kjy/live/reward/agent/signInfo"
;
public
static
final
String
MOBILE_getDeliveryWay
=
MOBILE_HOST
+
"/kjy/live/getDeliveryWay"
;
public
static
final
String
MOBILE_clueTextList
=
HOST
+
"/kjy/mp/liveClue/advice/clueTextList"
;
public
static
final
String
MOBILE_Procurator
=
MOBILE_HOST
+
"/kjy/live/agent/liveList"
;
public
static
final
String
MOBILE_AgentEndList
=
MOBILE_HOST
+
"/kjy/live/agent/liveEndList"
;
public
static
final
String
MOBILE_AgentCardInfo
=
MOBILE_HOST
+
"/kjy/live/agent/card/info"
;
...
...
@@ -331,10 +347,8 @@ public class BasicConfig {
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_AgentOwnCharts
=
MOBILE_HOST
+
"/kjy/live/agent/ownCharts"
;
public
static
final
String
MOBILE_ClueNum
=
MOBILE_HOST
+
"/kjy/live/agent/clue/clueNum"
;
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"
;
...
...
@@ -344,7 +358,7 @@ public class BasicConfig {
public
static
final
String
MOBILE_LiveGuideList
=
MOBILE_HOST
+
"/kjy/live/guide/list"
;
public
static
final
String
MOBILE_userInfo1
=
MOBILE_HOST
+
"/kjy/live/userInfo"
;
public
static
final
String
MOBILE_isForbidden
=
MOBILE_HOST
+
"/kjy/live/share/isForbidden"
;
public
static
final
String
MOBILE_wxIdAllList
=
MOBILE_HOST1
+
"/kjy/mp/msg/config/live/user/wxIdAllList"
;
public
static
final
String
MOBILE_wxIdAllList
=
HOST
+
"/kjy/mp/msg/config/live/user/wxIdAllList"
;
public
static
final
String
MOBILE_listDetail
=
MOBILE_HOST
+
"/kjy/live/guide/list/detail"
;
public
static
final
String
MOBILE_feedbackSave
=
MOBILE_HOST
+
"/kjy/live/user/feedback/save"
;
public
static
final
String
MOBILE_agentInfo
=
MOBILE_HOST
+
"/kjy/live/share/help/agent/info"
;
...
...
@@ -511,6 +525,11 @@ public class BasicConfig {
public
static
final
String
MANAGER_rewardSignQrCode
=
MANAGER_HOST
+
"/kjy/manager/live/awardGrant/rewardSignQrCode"
;
public
static
final
String
MANAGER_saveRewardConfig
=
MANAGER_HOST
+
"/kjy/manager/live/awardGrant/saveRewardConfig"
;
public
static
final
String
MOBILE_small
=
MOBILE_HOST
+
"/kjy/live/card/user/small"
;
public
static
final
String
MOBILE_visitorSignInfo
=
MOBILE_HOST
+
"/kjy/live/reward/visitor/signInfo"
;
public
static
final
String
MOBILE_doSign
=
MOBILE_HOST
+
"/kjy/live/reward/visitor/doSign"
;
//***************有奖答题*****************
...
...
src/test/liveTestNG.xml
View file @
167dc9a0
...
...
@@ -114,13 +114,6 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"闯关答题"
>
<classes>
<class
name=
"com.kjj.cases.live.answer.passQues"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"看直播攒现金"
>
<classes>
<class
name=
"com.kjj.cases.live.treasure.TimeRed"
/>
...
...
@@ -169,6 +162,12 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"闯关答题"
>
<classes>
<class
name=
"com.kjj.cases.live.answer.passQues"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"直播中获取线索统计"
>
<classes>
<class
name=
"com.kjj.cases.live.agent.LiveAgent"
/>
...
...
@@ -187,6 +186,12 @@
</classes>
</test>
<!-- <test preserve-order="true" name="奖品发放配置-不开启核奖">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.agent.Reward"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"奖品发放配置-不开启核奖"
>
<classes>
<class
name=
"com.kjj.cases.live.signing.NuclearAward"
/>
...
...
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