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
4e8b61d2
Commit
4e8b61d2
authored
Jun 09, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邀约优化的测试用例
parent
70192929
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
28 deletions
+28
-28
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+2
-2
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+12
-12
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+6
-6
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+8
-8
No files found.
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
4e8b61d2
...
...
@@ -349,7 +349,7 @@ public class CheckTask implements Authorization {
params
.
put
(
"introducerId"
,
cust_id
);
params
.
put
(
"introducerName"
,
"自动化测试用户7"
);
params
.
put
(
"custPhoneNum"
,
"15136361307"
);
params
.
put
(
"custName"
,
"自动化测试
客
户7"
);
params
.
put
(
"custName"
,
"自动化测试
用
户7"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_introduce_save
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_introduce_save
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
...
...
@@ -359,7 +359,7 @@ public class CheckTask implements Authorization {
otoExpertAuth
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
50
);
params
.
put
(
"custName"
,
"自动化测试
客
户7"
);
params
.
put
(
"custName"
,
"自动化测试
用
户7"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_SellerCustList
);
int
customerId
=
response
.
jsonPath
().
getInt
(
"data.list[0].custId"
);
...
...
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
4e8b61d2
...
...
@@ -128,7 +128,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"查看约面日历为已确认"
,
priority
=
9
)
public
void
查看约面日历为已确认
(){
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
}
...
...
@@ -138,7 +138,7 @@ public class Invite implements Authorization {
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
}
@Test
(
description
=
"修改客户具体日期覆盖邀约记录"
,
priority
=
11
)
...
...
@@ -147,8 +147,8 @@ public class Invite implements Authorization {
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCalendarlist
(
today
+
86400000
,
0
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
*
2
,
1
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
,
0
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
*
2
,
1
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
headerDeatil
(
1
,
"inviteStatus"
,
"1"
);
}
...
...
@@ -158,7 +158,7 @@ public class Invite implements Authorization {
getHasFirstInvite
(
0
,
true
);
getCallCustInfo
(
0
);;
getCalendarlist
(
today
+
86400000
*
2
,
0
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
*
2
,
0
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
}
@Test
(
description
=
"修改客户已约到客户状态时间明天后变为已确认"
,
priority
=
13
)
...
...
@@ -167,7 +167,7 @@ public class Invite implements Authorization {
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCalendarlist
(
today
,
2
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
}
@Test
(
description
=
"查询客户的面访上传记录<1"
,
priority
=
14
)
...
...
@@ -239,7 +239,7 @@ public class Invite implements Authorization {
//查看回显
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCalendarlist
(
today
,
2
,
"自动化测试
用
户"
,
"勿动-自动化备用邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试
客
户"
,
"勿动-自动化备用邀约"
);
//还原
assignSeller
(
cust_id
,
INVITE_ID
,
true
,
1
,
"crm"
);
...
...
@@ -287,7 +287,7 @@ public class Invite implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_preAssign
,
"预分配失败"
,
response
.
body
().
asString
()));
//验证约面日历状态/专家/带看人变更
getCalendarlist
(
today
,
4
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
4
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertEquals
(
recordItem
.
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"专家名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
recordItem
.
takeLookName
,
"勿动-自动化测试带看"
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"带看人名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
recordItem
.
hasAssignFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"是否分配状态非【已分配】"
,
response
.
body
().
asString
()));
...
...
@@ -314,7 +314,7 @@ public class Invite implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_assignRollback
,
"退回邀约组失败"
,
response
.
body
().
asString
()));
//验证约面日历状态/专家/带看人清空
getCalendarlist
(
today
,
3
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
3
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertNull
(
recordItem
.
expertName
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"专家名称不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
recordItem
.
takeLookName
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"带看人名称不为空"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
recordItem
.
hasAssignFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"是否分配状态非【待分配未确认】"
,
response
.
body
().
asString
()));
...
...
@@ -329,7 +329,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"立即分配邀约客户"
,
priority
=
25
)
public
void
立即分配邀约客户
(){
updateInvite
(
1
,
now
+
3600000
,
cust_id
);
getCalendarlist
(
today
,
2
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
2
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
otoManagerAuth
();
...
...
@@ -343,7 +343,7 @@ public class Invite implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_nowAssign
,
"立即分配失败"
,
response
.
body
().
asString
()));
//验证约面日历状态/专家/带看人变更
getCalendarlist
(
today
,
4
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
4
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertEquals
(
recordItem
.
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"专家名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
recordItem
.
takeLookName
,
"勿动-自动化测试带看"
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"带看人名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
recordItem
.
hasAssignFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"是否分配状态非【已分配】"
,
response
.
body
().
asString
()));
...
...
@@ -371,7 +371,7 @@ public class Invite implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_team
,
"客户分配团队失败"
,
response
.
body
().
asString
()));
getCalendarlist
(
today
,
4
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
4
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertEquals
(
recordItem
.
deptId
,
47
,
network
.
message
(
BasicConfig
.
WORK_getAllSceneConfs
,
"未回显部门id"
,
""
));
}
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
4e8b61d2
...
...
@@ -75,7 +75,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"姓名搜索客户"
,
priority
=
4
)
public
void
姓名搜索客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
...
...
@@ -134,7 +134,7 @@ public class Phone implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户列表为空"
,
response
.
body
().
asString
()));
boolean
interviewStatus
=
response
.
jsonPath
().
getBoolean
(
"data.myCustomerVos.find{it.custName == '自动化测试
用
户'}.interviewStatus"
);
boolean
interviewStatus
=
response
.
jsonPath
().
getBoolean
(
"data.myCustomerVos.find{it.custName == '自动化测试
客
户'}.interviewStatus"
);
Assert
.
assertTrue
(
interviewStatus
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户面访状态错误:非面访中"
,
response
.
body
().
asString
()));
}
...
...
@@ -286,7 +286,7 @@ public class Phone implements Authorization {
public
void
查看我的面访状态更新为审批中
(){
sleep
(
1000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
...
...
@@ -307,7 +307,7 @@ public class Phone implements Authorization {
//查看约面日历
otoManagerAuth
();
getCalendarlist
(
today
,
5
,
"自动化测试
用
户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
5
,
"自动化测试
客
户"
,
"勿动-自动化测试邀约"
);
//查看客户的跟进人
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -359,7 +359,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
26
)
public
void
查看我的面访状态更新为已失效
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
0
)
+
"'}.interviewStatus"
);
...
...
@@ -468,7 +468,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看我的面访状态更新为已完成"
,
priority
=
33
)
public
void
查看我的面访状态更新为已完成
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
interviewStatus
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.find{it.id == '"
+
interviewIds
.
get
(
1
)
+
"'}.interviewStatus"
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
4e8b61d2
...
...
@@ -490,18 +490,18 @@ public class Work implements Authorization {
public
void
编辑客户姓名
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_updateCustName
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateCustName
,
"修改客户姓名失败"
,
response
.
body
().
asString
()));
headerDeatil
(
1
,
"custName"
,
"自动化测试
用
户"
);
headerDeatil
(
1
,
"custName"
,
"自动化测试
客
户"
);
}
@Test
(
description
=
"创建转介绍客户"
,
priority
=
38
)
public
void
创建转介绍客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
createCustomerFromDetail
(
1
,
cust_id
,
"自动化测试
用
户"
,
"15136361306"
,
"自动化测试客户6"
,
true
);
createCustomerFromDetail
(
1
,
cust_id
,
"自动化测试
客
户"
,
"15136361306"
,
"自动化测试客户6"
,
true
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
50
);
...
...
@@ -517,7 +517,7 @@ public class Work implements Authorization {
String
inviteName
=
response
.
jsonPath
().
getString
(
"data.inviteName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.sellerName"
);
Assert
.
assertEquals
(
introducer
,
"自动化测试
用
户"
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateAddWxStatus
,
"转介绍客户的介绍人错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
introducer
,
"自动化测试
客
户"
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateAddWxStatus
,
"转介绍客户的介绍人错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
inviteName
,
"勿动-自动化测试邀约"
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateAddWxStatus
,
"转介绍客户的当前邀约与介绍人不一致"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
expertName
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateAddWxStatus
,
"转介绍客户的当前销售不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
sellerName
,
network
.
message
(
params
,
BasicConfig
.
WORK_updateAddWxStatus
,
"转介绍客户的当前专家不为空"
,
response
.
body
().
asString
()));
...
...
@@ -646,7 +646,7 @@ public class Work implements Authorization {
params
.
put
(
"custAge"
,
62
);
params
.
put
(
"custDescription"
,
"客户通话的备注"
);
params
.
put
(
"custGender"
,
1
);
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"recordId"
,
callRecordId
);
params
.
put
(
"viewRetireCommunity"
,
"社区参观情况"
);
...
...
@@ -789,7 +789,7 @@ public class Work implements Authorization {
public
void
跟进中可重新激活更新来源
(){
//重新填写表单
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
createCustomerFromDetail
(
1
,
cust_id
-
0
,
"自动化测试
用户0
"
,
"15136361301"
,
"自动化未激活用户"
,
false
);
createCustomerFromDetail
(
1
,
cust_id
-
0
,
"自动化测试
客户
"
,
"15136361301"
,
"自动化未激活用户"
,
false
);
//查看客户未被重新激活,客户来源更新,姓名和产品组不变
params
.
clear
();
...
...
@@ -802,7 +802,7 @@ public class Work implements Authorization {
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
String
custFromSourceDesc
=
response
.
jsonPath
().
getString
(
"data.list[0].custFromSourceDesc"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化测试
用
户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custName
,
"自动化测试
客
户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFromSourceDesc
,
"销售自建-转介绍客户-转介绍客户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户来源未更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的资源池错误"
,
response
.
body
().
asString
()));
}
...
...
@@ -883,7 +883,7 @@ public class Work implements Authorization {
String
custName
=
response
.
jsonPath
().
getString
(
"data.list[0].custName"
);
String
custFromSourceDesc
=
response
.
jsonPath
().
getString
(
"data.list[0].custFromSourceDesc"
);
int
custStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].custStatus"
);
Assert
.
assertEquals
(
custName
,
"自动化测试
用
户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custName
,
"自动化测试
客
户"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户姓名更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFromSourceDesc
,
"投放客户-自建落地页-表单"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户来源未更新"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的资源池错误"
,
response
.
body
().
asString
()));
...
...
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