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
8c4361ea
Commit
8c4361ea
authored
Nov 08, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加总监盘点的接口用例
parent
ade84012
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
131 additions
and
98 deletions
+131
-98
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+2
-2
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+3
-3
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+123
-90
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+2
-2
NetworkUtils.java
src/test/java/com/oto/utils/NetworkUtils.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
8c4361ea
...
@@ -145,12 +145,12 @@ public class Manager implements Authorization {
...
@@ -145,12 +145,12 @@ public class Manager implements Authorization {
PubForm
(
"1513636130"
+
i
,
"自动化测试用户"
+
i
);
PubForm
(
"1513636130"
+
i
,
"自动化测试用户"
+
i
);
}
}
// for(int i =
10;i<2
0;i++){
// for(int i =
20;i<8
0;i++){
// HashMap<String,Object> params = new HashMap<>();
// HashMap<String,Object> params = new HashMap<>();
// params.put("formId", "Kj22MTU5MQ");
// params.put("formId", "Kj22MTU5MQ");
// params.put("phoneNum", "130112100"+i);
// params.put("phoneNum", "130112100"+i);
// params.put("urlLink", "https://kjj-static.duibatest.com.cn/tk/202204111900-1?formId=Kj22MTU5MQ&channel=jrtt&agent=td");
// params.put("urlLink", "https://kjj-static.duibatest.com.cn/tk/202204111900-1?formId=Kj22MTU5MQ&channel=jrtt&agent=td");
// params.put("username", "小红用户"+i);
// params.put("username", "小红
11月
用户"+i);
// params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
// params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
// Response response = network.postResponse(params,BasicConfig.FORM_submit);
// Response response = network.postResponse(params,BasicConfig.FORM_submit);
// String recordId = response.jsonPath().getString("data.recordId");
// String recordId = response.jsonPath().getString("data.recordId");
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
8c4361ea
...
@@ -627,8 +627,6 @@ public class Phone implements Authorization {
...
@@ -627,8 +627,6 @@ public class Phone implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_paper_getCustomers
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_paper_getCustomers
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
PHONE_paper_getCustomers
,
"日报列表客户为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
PHONE_paper_getCustomers
,
"日报列表客户为空"
,
response
.
body
().
asString
()));
String
label
=
response
.
jsonPath
().
getString
(
"data.list[0].label"
);
Assert
.
assertEquals
(
label
,
""
,
network
.
message
(
BasicConfig
.
PHONE_paper_getCustomers
,
"客户非今日见面标签"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"提交日报"
,
priority
=
50
)
@Test
(
description
=
"提交日报"
,
priority
=
50
)
...
@@ -701,7 +699,7 @@ public class Phone implements Authorization {
...
@@ -701,7 +699,7 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除客户失败"
,
response
.
body
().
asString
()));
}
}
// for(int i = 6
380;i<6385
;i++){
// for(int i = 6
549;i<6560
;i++){
// HashMap<String,Object> params = new HashMap<>();
// HashMap<String,Object> params = new HashMap<>();
// params.put("custId", i);
// params.put("custId", i);
// Response response = network.postResponse(params,BasicConfig.WORK_delCust);
// Response response = network.postResponse(params,BasicConfig.WORK_delCust);
...
@@ -738,6 +736,8 @@ public class Phone implements Authorization {
...
@@ -738,6 +736,8 @@ public class Phone implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"interviewConfId"
,
IdMakeUtil
.
encodingId
(
Work
.
sceneId
));
params
.
put
(
"custPhase"
,
custPhase
);
params
.
put
(
"custPhase"
,
custPhase
);
params
.
put
(
"custPhase"
,
custPhase
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
8c4361ea
...
@@ -146,7 +146,7 @@ public class Work implements Authorization {
...
@@ -146,7 +146,7 @@ public class Work implements Authorization {
public
void
工作台
_
菜单权限列表
(){
public
void
工作台
_
菜单权限列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_menu_list
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_menu_list
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.menuList.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.menuList.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"菜单列表数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
BasicConfig
.
WORK_notifyList
,
"菜单列表数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"客户状态分类_数量总览"
,
priority
=
9
)
@Test
(
description
=
"客户状态分类_数量总览"
,
priority
=
9
)
...
@@ -733,10 +733,22 @@ public class Work implements Authorization {
...
@@ -733,10 +733,22 @@ public class Work implements Authorization {
@Test
(
description
=
"查看客户面访状态为尚未约到"
,
priority
=
48
)
@Test
(
description
=
"查看客户面访状态为尚未约到"
,
priority
=
48
)
public
void
查看客户面访状态为尚未约到
(){
public
void
查看客户面访状态为尚未约到
(){
getHasFirstInvite
(-
1
,
true
);
}
@Test
(
description
=
"修改客户面访状态为明确拒绝"
,
priority
=
49
)
public
void
修改客户面访状态为明确拒绝
(){
updateInvite
(
0
,
now
+
86400000
);
getHasFirstInvite
(
0
,
true
);
}
@Test
(
description
=
"修改客户面访状态为已约到时间未定"
,
priority
=
50
)
public
void
修改客户面访状态为已约到时间未定
(){
updateInvite
(
2
,
now
+
86400000
);
getHasFirstInvite
(
2
,
true
);
getHasFirstInvite
(
2
,
true
);
}
}
@Test
(
description
=
"获取客户适用场景"
,
priority
=
49
)
@Test
(
description
=
"获取客户适用场景"
,
priority
=
51
)
public
void
获取客户适用场景
(){
public
void
获取客户适用场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
...
@@ -745,7 +757,7 @@ public class Work implements Authorization {
...
@@ -745,7 +757,7 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改客户面访承诺时间为1天后"
,
priority
=
5
0
)
@Test
(
description
=
"修改客户面访承诺时间为1天后"
,
priority
=
5
2
)
public
void
修改客户面访承诺时间为
1
天后
(){
public
void
修改客户面访承诺时间为
1
天后
(){
updateInvite
(
1
,
now
+
86400000
);
updateInvite
(
1
,
now
+
86400000
);
...
@@ -753,41 +765,41 @@ public class Work implements Authorization {
...
@@ -753,41 +765,41 @@ public class Work implements Authorization {
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
}
}
@Test
(
description
=
"查看准客户面访任务和约面日历为未确认"
,
priority
=
5
1
)
@Test
(
description
=
"查看准客户面访任务和约面日历为未确认"
,
priority
=
5
3
)
public
void
查看准客户面访任务和约面日历为未确认
(){
public
void
查看准客户面访任务和约面日历为未确认
(){
taskList
(
0
,
1
);
taskList
(
0
,
1
);
getCalendarlist
(
today
+
86400000
,
1
,
"自动化测试用户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
,
1
,
"自动化测试用户"
,
"勿动-自动化测试邀约"
);
}
}
@Test
(
description
=
"修改客户行程状态为已确认"
,
priority
=
52
)
//
@Test(description = "修改客户行程状态为已确认",priority = 52)
public
void
修改客户行程状态为已确认
(){
//
public void 修改客户行程状态为已确认(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
//
HashMap<String,Object> params = new HashMap<>();
params
.
put
(
"id"
,
taskId
);
//
params.put("id",taskId);
params
.
put
(
"inviteStatus"
,
2
);
//
params.put("inviteStatus",2);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_invite_confirm
);
//
Response response =network.postResponse(params,BasicConfig.WORK_invite_confirm);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
//
boolean data = response.jsonPath().getBoolean("data");
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invite_confirm
,
"修改客户行程状态为【已确认】失败"
,
response
.
body
().
asString
()));
//
Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invite_confirm,"修改客户行程状态为【已确认】失败",response.body().asString()));
//
taskList
(
1
,
2
);
//
taskList(1,2);
getHasFirstInvite
(
1
,
true
);
//
getHasFirstInvite(1,true);
getCallCustInfo
(
1
);
//
getCallCustInfo(1);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试用户"
,
"勿动-自动化测试邀约"
);
//
getCalendarlist(today+86400000,2,"自动化测试用户","勿动-自动化测试邀约");
}
//
}
//
@Test
(
description
=
"修改客户行程状态为未确认"
,
priority
=
53
)
//
@Test(description = "修改客户行程状态为未确认",priority = 53)
public
void
修改客户行程状态为未确认
(){
//
public void 修改客户行程状态为未确认(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
//
HashMap<String,Object> params = new HashMap<>();
params
.
put
(
"id"
,
taskId
);
//
params.put("id",taskId);
params
.
put
(
"inviteStatus"
,
1
);
//
params.put("inviteStatus",1);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_invite_confirm
);
//
Response response =network.postResponse(params,BasicConfig.WORK_invite_confirm);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
//
boolean data = response.jsonPath().getBoolean("data");
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invite_confirm
,
"修改客户行程状态为【已确认】失败"
,
response
.
body
().
asString
()));
//
Assert.assertTrue(data ,network.message(params,BasicConfig.WORK_invite_confirm,"修改客户行程状态为【已确认】失败",response.body().asString()));
//
taskList
(
0
,
1
);
//
taskList(0,1);
getHasFirstInvite
(
1
,
true
);
//
getHasFirstInvite(1,true);
getCallCustInfo
(
1
);
//
getCallCustInfo(1);
getCalendarlist
(
today
+
86400000
,
1
,
"自动化测试用户"
,
"勿动-自动化测试邀约"
);
//
getCalendarlist(today+86400000,1,"自动化测试用户","勿动-自动化测试邀约");
}
//
}
@Test
(
description
=
"修改客户具体时间客户状态不变"
,
priority
=
54
)
@Test
(
description
=
"修改客户具体时间客户状态不变"
,
priority
=
54
)
public
void
修改客户具体时间客户状态不变
(){
public
void
修改客户具体时间客户状态不变
(){
...
@@ -1153,40 +1165,37 @@ public class Work implements Authorization {
...
@@ -1153,40 +1165,37 @@ public class Work implements Authorization {
otoManagerAuth
();
otoManagerAuth
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
==
4
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"获取任务配置数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
==
7
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"获取任务配置数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改任务配置"
,
priority
=
87
)
@Test
(
description
=
"修改任务配置"
,
priority
=
87
)
public
void
修改任务配置
(){
public
void
修改任务配置
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
String
list
[]
=
{
"01"
,
"02"
,
"03"
,
"04"
};
params
.
put
(
"notCustSource"
,
new
String
[]{
"01"
});
//不支持的客户来源
params
.
put
(
"custSourceList"
,
list
);
//客户来源
params
.
put
(
"sellerRole"
,
new
int
[]{
6
,
7
});
//支持的角色
params
.
put
(
"custType"
,
2
);
//1:全部客户;2:新客户;3:老客户
params
.
put
(
"effectDays"
,
new
int
[]{
1
,
2
});
//生效日期
params
.
put
(
"id"
,
4
);
params
.
put
(
"id"
,
1
);
params
.
put
(
"limitGoalFlag"
,
0
);
params
.
put
(
"taskUsable"
,
0
);
//0:任务状态关闭;1:任务状态开启
params
.
put
(
"taskUsable"
,
0
);
//0:任务状态关闭;1:任务状态开启
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_
modifyTaskConf
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_
taskEdit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_
modifyTaskConf
,
"修改任务失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_
taskEdit
,
"修改任务失败"
,
response
.
body
().
asString
()));
//获取任务列表验证修改是否成功
//获取任务列表验证修改是否成功
Response
listRes
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
Response
listRes
=
network
.
getResponse
(
BasicConfig
.
WORK_taskConfList
);
int
custType
=
listRes
.
jsonPath
().
getInt
(
"data[0].custType"
);
int
custType
=
listRes
.
jsonPath
().
getInt
(
"data[0].custType"
);
int
custSourceList
=
listRes
.
jsonPath
().
getInt
(
"data[0].
custSourceList
.size()"
);
int
custSourceList
=
listRes
.
jsonPath
().
getInt
(
"data[0].
notCustSource
.size()"
);
Assert
.
assertEquals
(
custType
,
2
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"修改任务配置失败"
,
listRes
.
body
().
asString
()));
Assert
.
assertEquals
(
custType
,
2
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"修改任务配置失败"
,
listRes
.
body
().
asString
()));
Assert
.
assertEquals
(
custSourceList
,
4
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"修改任务配置失败"
,
listRes
.
body
().
asString
()));
Assert
.
assertEquals
(
custSourceList
,
4
,
network
.
message
(
BasicConfig
.
WORK_taskConfList
,
"修改任务配置失败"
,
listRes
.
body
().
asString
()));
//恢复默认配置
//恢复默认配置
params
.
clear
();
params
.
put
(
"notCustSource"
,
new
String
[]{});
//不支持的客户来源
String
acqList
[]
=
{
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
};
params
.
put
(
"sellerRole"
,
new
int
[]{
5
});
//支持的角色
params
.
put
(
"custSourceList"
,
acqList
);
//客户来源:
params
.
put
(
"effectDays"
,
new
int
[]{
0
});
//生效日期
params
.
put
(
"custType"
,
1
);
//1:全部客户;2:新客户;3:老客户
params
.
put
(
"id"
,
1
);
params
.
put
(
"id"
,
4
);
params
.
put
(
"limitGoalFlag"
,
0
);
params
.
put
(
"taskUsable"
,
1
);
//0:任务状态关闭;1:任务状态开启
params
.
put
(
"taskUsable"
,
1
);
//0:任务状态关闭;1:任务状态开启
Response
acqRes
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_
modifyTaskConf
);
Response
acqRes
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_
taskEdit
);
boolean
acqData
=
acqRes
.
jsonPath
().
getBoolean
(
"data"
);
boolean
acqData
=
acqRes
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
acqData
,
network
.
message
(
params
,
BasicConfig
.
WORK_
modifyTaskConf
,
"修改任务失败"
,
acqRes
.
body
().
asString
()));
Assert
.
assertTrue
(
acqData
,
network
.
message
(
params
,
BasicConfig
.
WORK_
taskEdit
,
"修改任务失败"
,
acqRes
.
body
().
asString
()));
}
}
@Test
(
description
=
"客户总览_销售查看任务"
,
priority
=
88
)
@Test
(
description
=
"客户总览_销售查看任务"
,
priority
=
88
)
...
@@ -1257,7 +1266,7 @@ public class Work implements Authorization {
...
@@ -1257,7 +1266,7 @@ public class Work implements Authorization {
params
.
put
(
"pageSize"
,
20
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getReservationList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getReservationList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assert
Equals
(
size
,
2
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assert
True
(
size
>
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
int
bookingStatus
=
response
.
jsonPath
().
getInt
(
"data[0].bookingStatus"
);
int
bookingStatus
=
response
.
jsonPath
().
getInt
(
"data[0].bookingStatus"
);
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
...
@@ -1299,6 +1308,7 @@ public class Work implements Authorization {
...
@@ -1299,6 +1308,7 @@ public class Work implements Authorization {
@Test
(
description
=
"查看盘点客户列表"
,
priority
=
96
)
@Test
(
description
=
"查看盘点客户列表"
,
priority
=
96
)
public
void
查看盘点客户列表
(){
public
void
查看盘点客户列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化"
);
params
.
put
(
"todayCheck"
,
1
);
params
.
put
(
"todayCheck"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
50
);
params
.
put
(
"pageSize"
,
50
);
...
@@ -1422,7 +1432,7 @@ public class Work implements Authorization {
...
@@ -1422,7 +1432,7 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_assignRollback
,
"退回邀约组失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_assignRollback
,
"退回邀约组失败"
,
response
.
body
().
asString
()));
//验证约面日历状态/专家/带看人清空
//验证约面日历状态/专家/带看人清空
getCalendarlist
(
today
,
1
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
,
3
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertNull
(
recordItem
.
expertName
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"专家名称不为空"
,
response
.
body
().
asString
()));
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
.
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
()));
Assert
.
assertFalse
(
recordItem
.
hasAssignFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_calendar_list
,
"是否分配状态非【待分配未确认】"
,
response
.
body
().
asString
()));
...
@@ -1435,7 +1445,12 @@ public class Work implements Authorization {
...
@@ -1435,7 +1445,12 @@ public class Work implements Authorization {
@Test
(
description
=
"立即分配邀约客户"
,
priority
=
104
)
@Test
(
description
=
"立即分配邀约客户"
,
priority
=
104
)
public
void
立即分配邀约客户
(){
public
void
立即分配邀约客户
(){
updateInvite
(
0
,
now
+
3600000
);
updateInvite
(
1
,
now
+
3600000
);
getCalendarlist
(
today
,
2
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
otoManagerAuth
();
otoManagerAuth
();
//立即分配
//立即分配
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
params
.
put
(
"recordId"
,
recordItem
.
recordId
);
...
@@ -1478,29 +1493,45 @@ public class Work implements Authorization {
...
@@ -1478,29 +1493,45 @@ public class Work implements Authorization {
params
.
put
(
"custNum"
,
10
);
params
.
put
(
"custNum"
,
10
);
params
.
put
(
"pickTakeAddress"
,
"杭州数字娱乐大厦"
);
params
.
put
(
"pickTakeAddress"
,
"杭州数字娱乐大厦"
);
params
.
put
(
"receiveAndSendOffTime"
,
time
-
3600000
);
params
.
put
(
"receiveAndSendOffTime"
,
time
-
3600000
);
}
else
{
//0表示未约到
}
else
if
(
interviewFlag
==
2
)
{
//1为已约到需要填写时间地点
params
.
put
(
"nextContactTime"
,
time
);
params
.
put
(
"nextContactTime"
,
time
);
}
else
{
//0表示未约到
params
.
put
(
"custManner"
,
1
);
params
.
put
(
"rejectReason"
,
2
);
}
}
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_invite_submit
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_invite_submit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invite_submit
,
"修改客户面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_invite_submit
,
"修改客户面访失败"
,
response
.
body
().
asString
()));
// for(int i = 6850;i<6860;i++){
// HashMap<String,Object> params = new HashMap<>();
// params.put("custId",i);
// params.put("eventType",2);
// params.put("firstInterviewFlag",interviewFlag);
// params.put("interviewConfId",230);
// params.put("interviewTime",time);
// params.put("haveMealFlag",0);
// params.put("pickTakeFlag",0);
// params.put("custNum",10);
// Response response =network.postResponse(params,BasicConfig.WORK_invite_submit);
// }
}
}
//确认准客户面访任务列表
//确认准客户面访任务列表
public
void
taskList
(
int
finish
,
int
status
){
public
void
taskList
(
int
finish
,
int
status
){
sleep
(
2000
);
//
sleep(2000);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
//
HashMap<String,Object> params = new HashMap<>();
params
.
put
(
"taskConfId"
,
7
);
//
params.put("taskConfId",7);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_invitation_list
);
//
Response response =network.getResponse(params,BasicConfig.WORK_invitation_list);
int
goalCount
=
response
.
jsonPath
().
getInt
(
"data.goalCount"
);
//
int goalCount = response.jsonPath().getInt("data.goalCount");
int
finishCustNum
=
response
.
jsonPath
().
getInt
(
"data.finishCustNum"
);
//
int finishCustNum = response.jsonPath().getInt("data.finishCustNum");
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
//
int size = response.jsonPath().getInt("data.list.size()");
int
inviteStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].inviteStatus"
);
//
int inviteStatus = response.jsonPath().getInt("data.list[0].inviteStatus");
Assert
.
assertEquals
(
goalCount
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_invitation_list
,
"面访列表的目标数量不为1"
,
response
.
body
().
asString
()));
//
Assert.assertEquals(goalCount,1 ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的目标数量不为1",response.body().asString()));
Assert
.
assertEquals
(
finishCustNum
,
finish
,
network
.
message
(
params
,
BasicConfig
.
WORK_invitation_list
,
"面访列表的完成数量不为"
+
finish
,
response
.
body
().
asString
()));
//
Assert.assertEquals(finishCustNum,finish ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的完成数量不为"+finish,response.body().asString()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_invitation_list
,
"面访列表的客户数量不为1"
,
response
.
body
().
asString
()));
//
Assert.assertEquals(size,1 ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的客户数量不为1",response.body().asString()));
Assert
.
assertEquals
(
inviteStatus
,
status
,
network
.
message
(
params
,
BasicConfig
.
WORK_invitation_list
,
"面访列表的客户状态不为"
+
status
,
response
.
body
().
asString
()));
//
Assert.assertEquals(inviteStatus,status ,network.message(params,BasicConfig.WORK_invitation_list,"面访列表的客户状态不为"+status,response.body().asString()));
taskId
=
response
.
jsonPath
().
getInt
(
"data.list[0].id"
);
//
taskId = response.jsonPath().getInt("data.list[0].id");
}
}
//获取电话回填客户约面信息
//获取电话回填客户约面信息
...
@@ -1527,34 +1558,36 @@ public class Work implements Authorization {
...
@@ -1527,34 +1558,36 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
);
if
(
interviewFlag
==
1
){
int
firstInterviewFlag
=
response
.
jsonPath
().
getInt
(
"data.firstInterviewFlag"
);
String
interviewTime
=
response
.
jsonPath
().
getString
(
"data.interviewTime"
);
inviteUrl
=
response
.
jsonPath
().
getString
(
"data.invLetterUrl"
);
Assert
.
assertEquals
(
firstInterviewFlag
,
interviewFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"约面状态回显非"
+
interviewFlag
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间为空"
,
response
.
body
().
asString
()));
if
(
isinviter
)
Assert
.
assertNotNull
(
inviteUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接为空"
,
response
.
body
().
asString
()));
}
else
if
(
interviewFlag
==
0
){
int
firstInterviewFlag
=
response
.
jsonPath
().
getInt
(
"data.firstInterviewFlag"
);
String
interviewTime
=
response
.
jsonPath
().
getString
(
"data.interviewTime"
);
String
nextContactTime
=
response
.
jsonPath
().
getString
(
"data.nextContactTime"
);
String
invLetterUrl
=
response
.
jsonPath
().
getString
(
"data.invLetterUrl"
);
Assert
.
assertEquals
(
firstInterviewFlag
,
interviewFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"约面状态回显非"
+
interviewFlag
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
nextContactTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"下次联系时间为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
invLetterUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接不为空"
,
response
.
body
().
asString
()));
}
else
{
String
firstInterviewFlag
=
response
.
jsonPath
().
getString
(
"data.firstInterviewFlag"
);
String
firstInterviewFlag
=
response
.
jsonPath
().
getString
(
"data.firstInterviewFlag"
);
String
interviewTime
=
response
.
jsonPath
().
getString
(
"data.interviewTime"
);
String
interviewTime
=
response
.
jsonPath
().
getString
(
"data.interviewTime"
);
String
nextContactTime
=
response
.
jsonPath
().
getString
(
"data.nextContactTime"
);
String
nextContactTime
=
response
.
jsonPath
().
getString
(
"data.nextContactTime"
);
String
invLetterUrl
=
response
.
jsonPath
().
getString
(
"data.invLetterUrl"
);
String
invLetterUrl
=
response
.
jsonPath
().
getString
(
"data.invLetterUrl"
);
if
(
interviewFlag
==
-
1
){
Assert
.
assertNull
(
firstInterviewFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"约面状态回显不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
firstInterviewFlag
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"约面状态回显不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
nextContactTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"下次联系时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
nextContactTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"下次联系时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
invLetterUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
invLetterUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接不为空"
,
response
.
body
().
asString
()));
}
else
{
Assert
.
assertEquals
(
firstInterviewFlag
,
String
.
valueOf
(
interviewFlag
),
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"约面状态回显非"
+
interviewFlag
,
response
.
body
().
asString
()));
if
(
interviewFlag
==
1
)
{
Assert
.
assertNotNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间为空"
,
response
.
body
().
asString
()));
inviteUrl
=
response
.
jsonPath
().
getString
(
"data.invLetterUrl"
);
if
(
isinviter
)
Assert
.
assertNotNull
(
inviteUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接为空"
,
response
.
body
().
asString
()));
else
Assert
.
assertNull
(
inviteUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接为空"
,
response
.
body
().
asString
()));
}
else
{
Assert
.
assertNull
(
interviewTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"面访承诺时间不为空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
invLetterUrl
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"邀请函链接不为空"
,
response
.
body
().
asString
()));
if
(
interviewFlag
==
2
)
{
Assert
.
assertNotNull
(
nextContactTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"下次联系时间不为空"
,
response
.
body
().
asString
()));
}
else
{
int
custManner
=
response
.
jsonPath
().
getInt
(
"data.custManner"
);
int
rejectReason
=
response
.
jsonPath
().
getInt
(
"data.rejectReason"
);
Assert
.
assertEquals
(
custManner
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"客户态度非明确拒绝"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
rejectReason
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getHasFirstInvite
,
"拒绝原因非2"
+
interviewFlag
,
response
.
body
().
asString
()));
}
}
}
}
}
}
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
8c4361ea
...
@@ -172,8 +172,8 @@ public class BasicConfig {
...
@@ -172,8 +172,8 @@ public class BasicConfig {
public
static
final
String
WORK_interviewAuditList
=
WORK_HOST
+
"/kjy/oto/manager/audit/getInterviewAuditList"
;
public
static
final
String
WORK_interviewAuditList
=
WORK_HOST
+
"/kjy/oto/manager/audit/getInterviewAuditList"
;
public
static
final
String
WORK_interviewAuditReject
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditReject"
;
public
static
final
String
WORK_interviewAuditReject
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditReject"
;
public
static
final
String
WORK_interviewAuditPass
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditPass"
;
public
static
final
String
WORK_interviewAuditPass
=
WORK_HOST
+
"/kjy/oto/manager/audit/interviewAuditPass"
;
public
static
final
String
WORK_taskConfList
=
WORK_HOST
+
"/kjy/oto/manager/
sellerTask/taskConfL
ist"
;
public
static
final
String
WORK_taskConfList
=
WORK_HOST
+
"/kjy/oto/manager/
task/config/l
ist"
;
public
static
final
String
WORK_
modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf
"
;
public
static
final
String
WORK_
taskEdit
=
WORK_HOST
+
"/kjy/oto/manager/task/config/edit
"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_coefficient_detail
=
WORK_HOST
+
"/kjy/oto/manager/customer/coefficient/detail"
;
public
static
final
String
WORK_coefficient_detail
=
WORK_HOST
+
"/kjy/oto/manager/customer/coefficient/detail"
;
...
...
src/test/java/com/oto/utils/NetworkUtils.java
View file @
8c4361ea
...
@@ -27,7 +27,7 @@ public class NetworkUtils {
...
@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku
//cookies中的tku
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
//多场景测试标志
//多场景测试标志
agentCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-3
321
"
);
agentCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-3
433
"
);
//json类型的headers
//json类型的headers
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
//二进制文件的headers
//二进制文件的headers
...
...
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