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
40b5d52a
Commit
40b5d52a
authored
Jun 06, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加移动端1.2的自动化测试接口
parent
80034ba3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
4265 additions
and
4576 deletions
+4265
-4576
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+4
-17
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+212
-149
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+84
-13
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+8
-1
IdConvertBase64Enum.java
src/test/java/com/oto/utils/IdConvertBase64Enum.java
+0
-46
IdMakeUtil.java
src/test/java/com/oto/utils/IdMakeUtil.java
+0
-10
JmeterAccountFile.java
src/test/java/com/oto/utils/JmeterAccountFile.java
+0
-8
testNG.xml
src/test/testNG.xml
+1
-1
report.html
test-output/report.html
+3956
-4331
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
40b5d52a
...
@@ -118,23 +118,6 @@ public class Manager {
...
@@ -118,23 +118,6 @@ public class Manager {
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
}
}
//接口对此场景做校验,仅前端做了限制
// @Test(description = "不可修改总监为普通",priority = 6)
// public void 不可修改总监为普通(){
// HashMap<String,Object> params = new HashMap<>();
// params.put("id", LEADER_ID);
// params.put("sellerName", "勿动-自动化测试总监");
// params.put("phoneNumber", "18248405155");
// params.put("roleType", 1);
// params.put("callPermission", 1);
// params.put("sellerStatus", 1);
// params.put("companyId", 3);
// params.put("sellerLevel", 1);
// Response response = network.postResponse(params, BasicConfig.MANAGER_oto_updateSeller);
// boolean success = response.jsonPath().getBoolean("success");
// Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_updateSeller,"修改总监为普通销售成功",response.body().asString()));
// }
@Test
(
description
=
"不可新增同名公司"
,
priority
=
7
)
@Test
(
description
=
"不可新增同名公司"
,
priority
=
7
)
public
void
不可新增同名公司
(){
public
void
不可新增同名公司
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -219,6 +202,8 @@ public class Manager {
...
@@ -219,6 +202,8 @@ public class Manager {
moneyOptions
.
add
(
2
);
moneyOptions
.
add
(
2
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
19
);
params
.
put
(
"id"
,
19
);
params
.
put
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
11
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
...
@@ -261,6 +246,8 @@ public class Manager {
...
@@ -261,6 +246,8 @@ public class Manager {
moneyOptions
.
add
(
3
);
moneyOptions
.
add
(
3
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
19
);
params
.
put
(
"id"
,
19
);
params
.
put
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
40b5d52a
...
@@ -12,9 +12,7 @@ import org.testng.annotations.BeforeTest;
...
@@ -12,9 +12,7 @@ import org.testng.annotations.BeforeTest;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
phone
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
phone
;
import
static
com
.
oto
.
utils
.
BaseUtils
.*;
import
static
com
.
oto
.
utils
.
BaseUtils
.*;
...
@@ -40,16 +38,7 @@ public class Phone implements Authorization {
...
@@ -40,16 +38,7 @@ public class Phone implements Authorization {
interviewIds
=
new
ArrayList
<>();
interviewIds
=
new
ArrayList
<>();
}
}
@Test
(
description
=
"查看我的客户"
,
priority
=
1
)
@Test
(
description
=
"不可创建重复手机号的客户"
,
priority
=
1
)
public
void
查看我的客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
"20"
);
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
()));
}
@Test
(
description
=
"不可创建重复手机号的客户"
,
priority
=
2
)
public
void
不可创建重复手机号的客户
(){
public
void
不可创建重复手机号的客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"重复客户"
);
params
.
put
(
"custName"
,
"重复客户"
);
...
@@ -60,7 +49,7 @@ public class Phone implements Authorization {
...
@@ -60,7 +49,7 @@ public class Phone implements Authorization {
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"手机号重复创建客户成功"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"手机号重复创建客户成功"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"创建缘故客户"
,
priority
=
3
)
@Test
(
description
=
"创建缘故客户"
,
priority
=
2
)
public
void
创建缘故客户
(){
public
void
创建缘故客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化缘故客户"
);
params
.
put
(
"custName"
,
"自动化缘故客户"
);
...
@@ -71,7 +60,7 @@ public class Phone implements Authorization {
...
@@ -71,7 +60,7 @@ public class Phone implements Authorization {
Assert
.
assertNotNull
(
myselfCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
myselfCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"创建转介绍客户"
,
priority
=
4
)
@Test
(
description
=
"创建转介绍客户"
,
priority
=
3
)
public
void
创建转介绍客户
(){
public
void
创建转介绍客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化转介绍客户"
);
params
.
put
(
"custName"
,
"自动化转介绍客户"
);
...
@@ -83,7 +72,7 @@ public class Phone implements Authorization {
...
@@ -83,7 +72,7 @@ public class Phone implements Authorization {
Assert
.
assertNotNull
(
introduceCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
introduceCustomer_id
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"姓名搜索客户"
,
priority
=
5
)
@Test
(
description
=
"姓名搜索客户"
,
priority
=
4
)
public
void
姓名搜索客户
(){
public
void
姓名搜索客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试用户"
);
params
.
put
(
"custName"
,
"自动化测试用户"
);
...
@@ -96,7 +85,7 @@ public class Phone implements Authorization {
...
@@ -96,7 +85,7 @@ public class Phone implements Authorization {
custName
=
response
.
jsonPath
().
getString
(
"data.myCustomerVos[0].custName"
);
custName
=
response
.
jsonPath
().
getString
(
"data.myCustomerVos[0].custName"
);
}
}
@Test
(
description
=
"姓名模糊关联客户"
,
priority
=
6
)
@Test
(
description
=
"姓名模糊关联客户"
,
priority
=
5
)
public
void
姓名模糊查找客户
(){
public
void
姓名模糊查找客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化"
);
params
.
put
(
"custName"
,
"自动化"
);
...
@@ -104,26 +93,56 @@ public class Phone implements Authorization {
...
@@ -104,26 +93,56 @@ public class Phone implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_fuzzyList
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_fuzzyList
,
"创建缘故客户失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"关闭见面场景后不可查看场景"
,
priority
=
6
)
public
void
关闭见面场景后不可查看场景
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()));
@Test
(
description
=
"创建社区面访并关联转介绍和缘故客户"
,
priority
=
7
)
}
public
void
创建社区面访并关联转介绍和缘故客户
(){
@Test
(
description
=
"打开场景后查看客户1阶段对应的见面场景"
,
priority
=
7
)
public
void
打开场景后查看客户
1
阶段对应的见面场景
(){
otoManagerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ids
=
new
ArrayList
(
);
params
.
put
(
"id"
,
Work
.
sceneId
);
ids
.
add
(
cust_id
);
params
.
put
(
"confUsable"
,
1
);
ids
.
add
(
myselfCustomer_id
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_updateStatus
);
ids
.
add
(
introduceCustomer_id
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
params
.
put
(
"custIds"
,
ids
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateStatus
,
"关闭见面场景失败"
,
response
.
body
().
asString
())
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
params
.
clear
(
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
params
.
put
(
"custId"
,
cust_id
);
int
size
=
response
.
jsonPath
().
getJsonObject
(
"data.size()"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_listCustInterConf
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewSave
,
"创建普通面访失败"
,
response
.
body
().
asString
())
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
interviewIds
.
add
(
response
.
jsonPath
().
getString
(
"data[0]"
));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表数量错误"
,
response
.
body
().
asString
()
));
interviewIds
.
add
(
response
.
jsonPath
().
getString
(
"data[1]"
)
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].sceneName"
);
interviewIds
.
add
(
response
.
jsonPath
().
getString
(
"data[2]"
));
Assert
.
assertEquals
(
sceneName
,
"勿动-自动化面访场景"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_listCustInterConf
,
"见面场景列表详情错误"
,
response
.
body
().
asString
()
));
}
}
@Test
(
description
=
"查询面访二维码"
,
priority
=
8
)
@Test
(
description
=
"创建1进2的面访"
,
priority
=
8
)
public
void
创建
1
进
2
的面访
(){
interviewIds
.
add
(
saveInterview
(
cust_id
,
1
));
interviewIds
.
add
(
saveInterview
(
myselfCustomer_id
,
1
));
interviewIds
.
add
(
saveInterview
(
introduceCustomer_id
,
1
));
}
@Test
(
description
=
"查看我的客户列表已面访客户状态显示"
,
priority
=
9
)
public
void
查看我的客户列表已面访客户状态显示
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
"20"
);
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
()));
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos[3].custFlow"
);
boolean
interviewStatus
=
response
.
jsonPath
().
getBoolean
(
"data.myCustomerVos[3].interviewStatus"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户阶段错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
interviewStatus
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"客户面访状态错误:非面访中"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询面访二维码"
,
priority
=
10
)
public
void
查询面访二维码
(){
public
void
查询面访二维码
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ids"
,
interviewIds
.
get
(
0
)+
","
+
interviewIds
.
get
(
1
)+
","
+
interviewIds
.
get
(
2
));
params
.
put
(
"ids"
,
interviewIds
.
get
(
0
)+
","
+
interviewIds
.
get
(
1
)+
","
+
interviewIds
.
get
(
2
));
...
@@ -134,7 +153,7 @@ public class Phone implements Authorization {
...
@@ -134,7 +153,7 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
statusCount
,
3
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewCode
,
"面访码数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
statusCount
,
3
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewCode
,
"面访码数量错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传地理位置"
,
priority
=
9
)
@Test
(
description
=
"上传地理位置"
,
priority
=
11
)
public
void
上传地理位置
(){
public
void
上传地理位置
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"latitude"
,
30.287816
);
params
.
put
(
"latitude"
,
30.287816
);
...
@@ -145,7 +164,7 @@ public class Phone implements Authorization {
...
@@ -145,7 +164,7 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"上传地理位置失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerSave
,
"上传地理位置失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"销售查询面访状态"
,
priority
=
1
0
)
@Test
(
description
=
"销售查询面访状态"
,
priority
=
1
2
)
public
void
销售查询面访状态
()
{
public
void
销售查询面访状态
()
{
sleep
(
1000
);
sleep
(
1000
);
...
@@ -156,29 +175,6 @@ public class Phone implements Authorization {
...
@@ -156,29 +175,6 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
interviewStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewStatus
,
"面访状态错误:非未授权"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
interviewStatus
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewStatus
,
"面访状态错误:非未授权"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"已存在未结束的普通面访后创建普通面访失败"
,
priority
=
11
)
public
void
已存在未结束的社区面访后创建社区面访失败
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custIds"
,
ids
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewSave
,
"存在未结束普通面访时创建普通面访成功"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"发起面访时查询面访详情"
,
priority
=
12
)
public
void
发起面访时查询面访详情
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"interviewType"
,
2
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_appointmentDetail
);
String
customerName
=
response
.
jsonPath
().
getString
(
"data.custName"
);
String
id
=
response
.
jsonPath
().
getString
(
"data.id"
);
Assert
.
assertEquals
(
customerName
,
custName
,
network
.
message
(
params
,
BasicConfig
.
PHONE_appointmentDetail
,
"查询面访详情的客户姓名错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
id
,
interviewIds
.
get
(
0
),
network
.
message
(
params
,
BasicConfig
.
PHONE_appointmentDetail
,
"查询面访详情的id错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改面访时查询面访详情"
,
priority
=
13
)
@Test
(
description
=
"修改面访时查询面访详情"
,
priority
=
13
)
public
void
修改面访时查询面访详情
(){
public
void
修改面访时查询面访详情
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -192,6 +188,8 @@ public class Phone implements Authorization {
...
@@ -192,6 +188,8 @@ public class Phone implements Authorization {
public
void
修改面访时间
(){
public
void
修改面访时间
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"custPhase"
,
1
);
params
.
put
(
"interviewConfId"
,
IdMakeUtil
.
encodingId
(
Work
.
sceneId
));
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
7200000
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
7200000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewUpdate
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewUpdate
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -258,49 +256,67 @@ public class Phone implements Authorization {
...
@@ -258,49 +256,67 @@ public class Phone implements Authorization {
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custExtDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custExtDetail
);
String
interviewAddress
=
response
.
jsonPath
().
getString
(
"data.interviewAddress"
);
String
interviewAddress
=
response
.
jsonPath
().
getString
(
"data.interviewAddress"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInterviewExtDto.commitPlanFlag"
);
Assert
.
assertNotNull
(
interviewAddress
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"面访列表为空"
,
response
.
body
().
asString
()));
int
custPhase
=
response
.
jsonPath
().
getInt
(
"data.custInterviewExtDto.custPhase"
);
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"面访列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
interviewAddress
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"面访地址为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否提交计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custPhase
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"见面目的不为1进2"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"上传
社区面访详情
"
,
priority
=
21
)
@Test
(
description
=
"上传
1进2面访详情并提示不流转2阶段
"
,
priority
=
21
)
public
void
上传
社区面访详情
(){
public
void
上传
1
进
2
面访详情并提示不流转
2
阶段
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
unusualTypes
=
new
ArrayList
();
int
[]
unusualTypes
=
{
1
,
2
};
unusualTypes
.
add
(
1
);
int
[]
pensionOthers
={
1
,
2
};
unusualTypes
.
add
(
2
);
ArrayList
unusualProofs
=
new
ArrayList
();
ArrayList
unusualProofs
=
new
ArrayList
();
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg"
);
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg"
);
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220505/62cc0df86ed7430ea67d5015ee3fcc2b.jpg"
);
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220505/62cc0df86ed7430ea67d5015ee3fcc2b.jpg"
);
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"interviewRemark"
,
"第一次社区参观"
);
params
.
put
(
"interviewRemark"
,
"第一次社区参观"
);
params
.
put
(
"custPhase"
,
1
);
params
.
put
(
"pensionSalary"
,
null
);
params
.
put
(
"pensionCost"
,
null
);
params
.
put
(
"pensionOther"
,
null
);
params
.
put
(
"pensionOthers"
,
null
);
params
.
put
(
"coreMaker"
,
2
);
params
.
put
(
"coreMaker"
,
2
);
params
.
put
(
"followWeight"
,
1
);
params
.
put
(
"followWeight"
,
1
);
params
.
put
(
"commitPlanFlag"
,
0
);
params
.
put
(
"custFlow"
,
1
);
params
.
put
(
"commitInsure"
,
0
);
params
.
put
(
"commitCustStatus"
,
2
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"insureReason"
,
"未确认投保要素说明"
);
params
.
put
(
"insureReason"
,
"未确认投保要素说明"
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualExplain"
,
"手机号不一致且非面对面扫码的情况说明"
);
params
.
put
(
"unusualExplain"
,
"手机号不一致且非面对面扫码的情况说明"
);
params
.
put
(
"unusualProofs"
,
unusualProofs
);
params
.
put
(
"unusualProofs"
,
unusualProofs
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
//校验2阶段不流转
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_checkCustPhase
);
boolean
satisfyFlag
=
response
.
jsonPath
().
getBoolean
(
"data.satisfyFlag"
);
String
message
=
response
.
jsonPath
().
getString
(
"data.message"
);
Assert
.
assertFalse
(
satisfyFlag
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
message
,
"不满足阶段二客户条件,请点击“我再想想”完善客户面访信息,点击“确认”面访完成,客户阶段仍为阶段一"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
//上传面访-修改为满足2阶段流转
params
.
put
(
"pensionSalary"
,
1
);
params
.
put
(
"pensionCost"
,
1
);
params
.
put
(
"pensionOthers"
,
pensionOthers
);
params
.
put
(
"pensionOther"
,
"1,2"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewFeedback
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewFeedback
,
"上传面访失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看面访详情"
,
priority
=
22
)
@Test
(
description
=
"查看面访详情"
,
priority
=
22
)
public
void
查看面访详情
(){
public
void
查看面访详情
(){
otoSellerTku
();
sleep
(
1000
);
sleep
(
1000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_feedbackDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_feedbackDetail
);
int
followWeight
=
response
.
jsonPath
().
getInt
(
"data.followWeight"
);
int
followWeight
=
response
.
jsonPath
().
getInt
(
"data.followWeight"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag
"
);
int
pensionSalary
=
response
.
jsonPath
().
getInt
(
"data.custInterviewExtDto.pensionSalary
"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.unusualTypes.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.unusualTypes.size()"
);
String
unusualExplain
=
response
.
jsonPath
().
getString
(
"data.unusualExplain"
);
String
unusualExplain
=
response
.
jsonPath
().
getString
(
"data.unusualExplain"
);
Assert
.
assertEquals
(
followWeight
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"关注度显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
followWeight
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"关注度显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"是否提交计划书显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
pensionSalary
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"是否提交计划书显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"面访异常类型显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"面访异常类型显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
unusualExplain
,
"手机号不一致且非面对面扫码的情况说明"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"异常情况说明显示错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
unusualExplain
,
"手机号不一致且非面对面扫码的情况说明"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_feedbackDetail
,
"异常情况说明显示错误"
,
response
.
body
().
asString
()));
}
}
...
@@ -346,16 +362,16 @@ public class Phone implements Authorization {
...
@@ -346,16 +362,16 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_interviewAuditReject
,
"驳回审批失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_interviewAuditReject
,
"驳回审批失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户信息未更新"
,
priority
=
26
)
@Test
(
description
=
"查询客户
阶段
信息未更新"
,
priority
=
26
)
public
void
查询客户信息未更新
(){
public
void
查询客户
阶段
信息未更新
(){
otosellerAuth
();
otosellerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
)
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.cust
Info.cust
Flow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitPlanFlag
"
);
Object
pensionSalary
=
response
.
jsonPath
().
getJsonObject
(
"data.pensionSalary
"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_
detail
,
"新客户流程组状态错误非1
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_
callLog
,
"新客户的客户阶段不为1:具备机构养老理念
"
,
response
.
body
().
asString
()));
Assert
.
assert
Equals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0
"
,
response
.
body
().
asString
()));
Assert
.
assert
Null
(
pensionSalary
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"理想退休工资不为空
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
27
)
@Test
(
description
=
"查看我的面访状态更新为已失效"
,
priority
=
27
)
...
@@ -377,15 +393,8 @@ public class Phone implements Authorization {
...
@@ -377,15 +393,8 @@ public class Phone implements Authorization {
@Test
(
description
=
"客户再次创建面访并扫码评价"
,
priority
=
29
)
@Test
(
description
=
"客户再次创建面访并扫码评价"
,
priority
=
29
)
public
void
客户再次创建面访并扫码评价
()
throws
SQLException
{
public
void
客户再次创建面访并扫码评价
()
throws
SQLException
{
otoSellerTku
();
otoSellerTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ids
=
new
ArrayList
();
ids
.
add
(
cust_id
);
params
.
put
(
"custIds"
,
ids
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
interviewIds
.
clear
();
interviewIds
.
clear
();
interviewIds
.
add
(
response
.
jsonPath
().
getString
(
"data[0]"
));
interviewIds
.
add
(
saveInterview
(
cust_id
,
1
));
agentTku
();
agentTku
();
Map
<
String
,
Object
>
result
=
KjyLiveNormalDB
.
getInstance
().
findSimpleResult
(
UserSqlFactory
.
selectCodeIdByCustomerId
,
IdMakeUtil
.
decodingId
(
cust_id
));
Map
<
String
,
Object
>
result
=
KjyLiveNormalDB
.
getInstance
().
findSimpleResult
(
UserSqlFactory
.
selectCodeIdByCustomerId
,
IdMakeUtil
.
decodingId
(
cust_id
));
...
@@ -394,24 +403,39 @@ public class Phone implements Authorization {
...
@@ -394,24 +403,39 @@ public class Phone implements Authorization {
scanCode
(
IdMakeUtil
.
encodingId
((
Long
)
scanCodeId
),
1047
);
scanCode
(
IdMakeUtil
.
encodingId
((
Long
)
scanCodeId
),
1047
);
}
}
@Test
(
description
=
"
销售上传社区面访
"
,
priority
=
30
)
@Test
(
description
=
"
上传1进2面访详情并提示2阶段满足流转2阶段
"
,
priority
=
30
)
public
void
销售上传社区面访
(){
public
void
上传
1
进
2
面访详情并提示流转
2
阶段
(){
otoSellerTku
();
otoSellerTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
unusualTypes
=
new
ArrayList
()
;
int
[]
unusualTypes
=
{
2
}
;
unusualTypes
.
add
(
2
)
;
int
[]
pensionOthers
=
{
2
}
;
ArrayList
unusualProofs
=
new
ArrayList
();
ArrayList
unusualProofs
=
new
ArrayList
();
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg"
);
unusualProofs
.
add
(
"https://yun.dui88.com/kjy/image/20220506/ecf1d585e2e040ad97ec7996ce5bf2a3.jpg"
);
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"interviewRemark"
,
"第一次社区参观"
);
params
.
put
(
"custPhase"
,
1
);
params
.
put
(
"interviewRemark"
,
"1进2的社区参观"
);
params
.
put
(
"coreMaker"
,
2
);
params
.
put
(
"coreMaker"
,
2
);
params
.
put
(
"followWeight"
,
1
);
params
.
put
(
"followWeight"
,
1
);
params
.
put
(
"commitPlanFlag"
,
0
);
params
.
put
(
"commitPlanFlag"
,
0
);
params
.
put
(
"pensionSalary"
,
1
);
params
.
put
(
"pensionCost"
,
1
);
params
.
put
(
"pensionOther"
,
"2"
);
params
.
put
(
"pensionOthers"
,
pensionOthers
);
params
.
put
(
"custFlow"
,
1
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"isNormal"
,
false
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualTypes"
,
unusualTypes
);
params
.
put
(
"unusualExplain"
,
"手机号不一致的情况说明"
);
params
.
put
(
"unusualExplain"
,
"手机号不一致的情况说明"
);
params
.
put
(
"unusualProofs"
,
unusualProofs
);
params
.
put
(
"unusualProofs"
,
unusualProofs
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
//校验2阶段满足流转
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_checkCustPhase
);
boolean
satisfyFlag
=
response
.
jsonPath
().
getBoolean
(
"data.satisfyFlag"
);
String
message
=
response
.
jsonPath
().
getString
(
"data.message"
);
Assert
.
assertTrue
(
satisfyFlag
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
message
,
"点击“确定”后该客户阶段变更为阶段二"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
//上传面访
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewFeedback
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewFeedback
,
"上传面访失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -436,16 +460,16 @@ public class Phone implements Authorization {
...
@@ -436,16 +460,16 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_interviewAuditPass
,
"通过审批失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_interviewAuditPass
,
"通过审批失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户信息已更新"
,
priority
=
32
)
@Test
(
description
=
"查询客户
阶段
信息已更新"
,
priority
=
32
)
public
void
查询客户信息已更新
(){
public
void
查询客户
阶段
信息已更新
(){
otosellerAuth
();
otosellerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
)
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.cust
Info.cust
Flow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitPlanFlag
"
);
int
pensionSalary
=
response
.
jsonPath
().
getInt
(
"data.pensionSalary
"
);
Assert
.
assertEquals
(
custFlow
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_
detail
,
"新客户流程组状态错误非1
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_
callLog
,
"新客户的客户阶段不为2:认同公司养老解决方案
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
pensionSalary
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"理想退休工资错误
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的面访状态更新为已完成"
,
priority
=
33
)
@Test
(
description
=
"查看我的面访状态更新为已完成"
,
priority
=
33
)
...
@@ -462,29 +486,20 @@ public class Phone implements Authorization {
...
@@ -462,29 +486,20 @@ public class Phone implements Authorization {
public
void
客户流程组
_
表格总览
(){
public
void
客户流程组
_
表格总览
(){
otosellerAuth
();
otosellerAuth
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
int
ondStep
=
response
.
jsonPath
().
getInt
(
"data[
0
].custNum"
);
int
ondStep
=
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
);
int
twoStep
=
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
);
int
twoStep
=
response
.
jsonPath
().
getInt
(
"data[
2
].custNum"
);
Assert
.
assertEquals
(
ondStep
,
Work
.
chart
.
get
(
"ondStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"创建的转介绍和缘故客户的流程组非1"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
ondStep
,
Work
.
chart
.
get
(
"ondStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"创建的转介绍和缘故客户的流程组非1"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
twoStep
,
Work
.
chart
.
get
(
"twoStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户社区参观后未提交计划书流程组状态未变为2"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
twoStep
,
Work
.
chart
.
get
(
"twoStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户社区参观后未提交计划书流程组状态未变为2"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"创建
普通
面访"
,
priority
=
35
)
@Test
(
description
=
"创建
2进3/2进4
面访"
,
priority
=
35
)
public
void
创建
普通
面访
(){
public
void
创建
2
进
4
的
面访
(){
otoSellerTku
();
otoSellerTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
interviewIds
.
add
(
saveInterview
(
cust_id
,
2
));
ids
=
new
ArrayList
();
ids
.
add
(
cust_id
);
params
.
put
(
"custIds"
,
ids
);
params
.
put
(
"interviewType"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
int
size
=
response
.
jsonPath
().
getJsonObject
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewSave
,
"创建普通面访失败"
,
response
.
body
().
asString
()));
interviewIds
.
clear
();
interviewIds
.
add
(
response
.
jsonPath
().
getString
(
"data[0]"
));
}
}
@Test
(
description
=
"客户完成
普通
面访并扫码"
,
priority
=
36
)
@Test
(
description
=
"客户完成
2进3/2进4
面访并扫码"
,
priority
=
36
)
public
void
客户完成
普通
面访并扫码
()
throws
SQLException
{
public
void
客户完成
2
阶段
面访并扫码
()
throws
SQLException
{
agentTku
();
agentTku
();
Map
<
String
,
Object
>
result
=
KjyLiveNormalDB
.
getInstance
().
findSimpleResult
(
UserSqlFactory
.
selectCodeIdByCustomerId
,
IdMakeUtil
.
decodingId
(
cust_id
));
Map
<
String
,
Object
>
result
=
KjyLiveNormalDB
.
getInstance
().
findSimpleResult
(
UserSqlFactory
.
selectCodeIdByCustomerId
,
IdMakeUtil
.
decodingId
(
cust_id
));
scanCodeId
=
result
.
get
(
"scan_code_id"
);
scanCodeId
=
result
.
get
(
"scan_code_id"
);
...
@@ -536,14 +551,16 @@ public class Phone implements Authorization {
...
@@ -536,14 +551,16 @@ public class Phone implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
}
}
@Test
(
description
=
"上传
普通面访详情
"
,
priority
=
41
)
@Test
(
description
=
"上传
2进4面访并提示满足流转4阶段
"
,
priority
=
41
)
public
void
上传
普通面访详情
(){
public
void
上传
2
进
4
面访并提示满足流转
4
阶段
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
params
.
put
(
"interviewRemark"
,
"第一次普通参观"
);
params
.
put
(
"interviewRemark"
,
"2进4的社区参观"
);
params
.
put
(
"custPhase"
,
2
);
params
.
put
(
"coreMaker"
,
1
);
params
.
put
(
"coreMaker"
,
1
);
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"commitPlanFlag"
,
1
);
params
.
put
(
"commitPlanFlag"
,
1
);
params
.
put
(
"planPicUrl"
,
"//yun.dui88.com/kjy/image/20220531/e2ba7ec684044d93864678ed80b20fb3.jpg"
);
params
.
put
(
"commitCustStatus"
,
1
);
params
.
put
(
"commitCustStatus"
,
1
);
params
.
put
(
"commitInsure"
,
1
);
params
.
put
(
"commitInsure"
,
1
);
params
.
put
(
"productId"
,
IdMakeUtil
.
encodingId
(
productId
));
params
.
put
(
"productId"
,
IdMakeUtil
.
encodingId
(
productId
));
...
@@ -552,9 +569,19 @@ public class Phone implements Authorization {
...
@@ -552,9 +569,19 @@ public class Phone implements Authorization {
params
.
put
(
"insPeriod"
,
3
);
params
.
put
(
"insPeriod"
,
3
);
params
.
put
(
"insMoney"
,
3
);
params
.
put
(
"insMoney"
,
3
);
params
.
put
(
"isNormal"
,
true
);
params
.
put
(
"isNormal"
,
true
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
params
.
put
(
"custFlow"
,
2
);
//校验4阶段满足流转
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_checkCustPhase
);
boolean
satisfyFlag
=
response
.
jsonPath
().
getBoolean
(
"data.satisfyFlag"
);
String
message
=
response
.
jsonPath
().
getString
(
"data.message"
);
Assert
.
assertTrue
(
satisfyFlag
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
message
,
"点击“确定”后该客户阶段变更为阶段四"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_checkCustPhase
,
"上传面访失败"
,
response
.
body
().
asString
()));
//上传面访
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewFeedback
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"上传面访失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewFeedback
,
"上传面访失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"客户流程组_表格总览更新为当下成交"
,
priority
=
42
)
@Test
(
description
=
"客户流程组_表格总览更新为当下成交"
,
priority
=
42
)
...
@@ -562,49 +589,62 @@ public class Phone implements Authorization {
...
@@ -562,49 +589,62 @@ public class Phone implements Authorization {
otosellerAuth
();
otosellerAuth
();
sleep
(
2000
);
sleep
(
2000
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
int
fourStep
=
response
.
jsonPath
().
getInt
(
"data[
3
].custNum"
);
int
fourStep
=
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
);
Assert
.
assertEquals
(
fourStep
,
Work
.
chart
.
get
(
"fourStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户社区参观后已确认投保要素流程组状态未变为4"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
fourStep
,
Work
.
chart
.
get
(
"fourStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"客户社区参观后已确认投保要素流程组状态未变为4"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
)
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitInsure
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitInsure"
);
int
commitInsure
=
response
.
jsonPath
().
getInt
(
"data.commitInsure"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitPlanFlag"
);
Assert
.
assertEquals
(
custFlow
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"新客户的客户阶段不为4:当下成交"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户流程组状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitInsure
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"理想退休工资错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitInsure
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改客户基础信息"
,
priority
=
43
)
@Test
(
description
=
"修改客户阶段信息"
,
priority
=
43
)
public
void
修改客户基础信息
(){
public
void
修改客户阶段信息
(){
otosellerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
<
Integer
>
array
=
new
ArrayList
<>(
);
List
<
Integer
>
pensionOthers
=
Arrays
.
asList
(
2
);
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custFlow"
,
4
);
params
.
put
(
"pensionSalary"
,
1
);
params
.
put
(
"pensionCost"
,
1
);
params
.
put
(
"pensionOthers"
,
pensionOthers
);
params
.
put
(
"commitPlanFlag"
,
1
);
params
.
put
(
"planPicUrl"
,
"//yun.dui88.com/kjy/image/20220531/e2ba7ec684044d93864678ed80b20fb3.jpg"
);
params
.
put
(
"commitCustStatus"
,
1
);
params
.
put
(
"commitInsure"
,
1
);
params
.
put
(
"productId"
,
productId
);
params
.
put
(
"insApplicant"
,
1
);
params
.
put
(
"insByApplicant"
,
1
);
params
.
put
(
"insPeriod"
,
3
);
params
.
put
(
"insMoney"
,
3
);
params
.
put
(
"dealFlag"
,
1
);
params
.
put
(
"dealFlag"
,
1
);
params
.
put
(
"dealNumber"
,
"ZDHCSBD000001"
);
params
.
put
(
"dealNumber"
,
"ZDHCSBD000001"
);
params
.
put
(
"custName"
,
"自动化测试用户"
);
params
.
put
(
"insureReason"
,
null
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_edit
);
params
.
put
(
"isExistInterview"
,
false
);
System
.
out
.
println
(
params
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_updateCustPhase
);
System
.
out
.
println
(
params
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_edit
,
"修改客户基础
信息失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateCustPhase
,
"修改客户阶段
信息失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"客户流程组_表格总览更新为已成单"
,
priority
=
44
)
@Test
(
description
=
"客户流程组_表格总览更新为已成单"
,
priority
=
44
)
public
void
客户流程组
_
表格总览更新为已成单
(){
public
void
客户流程组
_
表格总览更新为已成单
(){
sleep
(
2000
);
sleep
(
2000
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
int
fiveStep
=
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
);
int
fiveStep
=
response
.
jsonPath
().
getInt
(
"data[
5
].custNum"
);
Assert
.
assertEquals
(
fiveStep
,
Work
.
chart
.
get
(
"fiveStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"修改已成交后流程组状态未变为5"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
fiveStep
,
Work
.
chart
.
get
(
"fiveStep"
)+
1
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"修改已成交后流程组状态未变为5"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
)
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
dealFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.dealFlag"
);
int
dealFlag
=
response
.
jsonPath
().
getInt
(
"data.dealFlag"
);
String
dealNumber
=
response
.
jsonPath
().
getString
(
"data.custInfo.dealNumber"
);
Assert
.
assertEquals
(
custFlow
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"新客户的客户阶段不为5:已成单"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户流程组状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
dealFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"是否成交字段错误为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
dealFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
dealNumber
,
"ZDHCSBD000001"
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"销售任务_销售完成任务"
,
priority
=
45
)
@Test
(
description
=
"销售任务_销售完成任务"
,
priority
=
45
)
...
@@ -619,8 +659,8 @@ public class Phone implements Authorization {
...
@@ -619,8 +659,8 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
finishCustNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"已完成数量记录错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
finishCustNum
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"已完成数量记录错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的预约列表"
,
priority
=
46
)
@Test
(
description
=
"查看我的预约
订单
列表"
,
priority
=
46
)
public
void
查看我的预约列表
(){
public
void
查看我的预约
订单
列表
(){
agent2Tku
();
agent2Tku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -630,6 +670,16 @@ public class Phone implements Authorization {
...
@@ -630,6 +670,16 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
bookingStatus
,
1
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"订单状态未更新为已参观"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bookingStatus
,
1
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"订单状态未更新为已参观"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"删除见面场景"
,
priority
=
47
)
public
void
删除见面场景
(){
otoManagerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
Work
.
sceneId
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_delete
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除见面场景失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"删除客户"
,
priority
=
79
)
@Test
(
description
=
"删除客户"
,
priority
=
79
)
public
void
删除客户
(){
public
void
删除客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -665,6 +715,19 @@ public class Phone implements Authorization {
...
@@ -665,6 +715,19 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WORK_logout
,
"退出登录失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WORK_logout
,
"退出登录失败"
,
response
.
body
().
asString
()));
}
}
public
String
saveInterview
(
String
custId
,
int
custPhase
)
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"interviewType"
,
2
);
params
.
put
(
"custPhase"
,
custPhase
);
params
.
put
(
"interviewConfId"
,
IdMakeUtil
.
encodingId
(
Work
.
sceneId
));
params
.
put
(
"appointmentTime"
,
System
.
currentTimeMillis
()+
3600000
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_interviewSave
);
int
size
=
response
.
jsonPath
().
getJsonObject
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewSave
,
"创建1进2的面访失败"
,
response
.
body
().
asString
()));
return
response
.
jsonPath
().
getJsonObject
(
"data[0]"
);
}
public
void
scanCode
(
String
scanCodeId
,
int
scanCodeType
)
{
public
void
scanCode
(
String
scanCodeId
,
int
scanCodeType
)
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"scanCodeId"
,
scanCodeId
);
params
.
put
(
"scanCodeId"
,
scanCodeId
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
40b5d52a
...
@@ -22,6 +22,7 @@ public class Work implements Authorization {
...
@@ -22,6 +22,7 @@ public class Work implements Authorization {
public
int
followTimes
;
//跟进次数
public
int
followTimes
;
//跟进次数
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
chart
;
public
static
Map
<
String
,
Integer
>
chart
;
public
static
long
sceneId
;
@BeforeTest
@BeforeTest
public
void
setUp
(){
public
void
setUp
(){
...
@@ -98,7 +99,6 @@ public class Work implements Authorization {
...
@@ -98,7 +99,6 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"公域引流_查找客户"
,
priority
=
5
)
@Test
(
description
=
"公域引流_查找客户"
,
priority
=
5
)
public
void
公域引流
_
查找客户
(){
public
void
公域引流
_
查找客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
...
@@ -168,11 +168,11 @@ public class Work implements Authorization {
...
@@ -168,11 +168,11 @@ public class Work implements Authorization {
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_staticChart
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"流程组表格数量为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
BasicConfig
.
WORK_staticChart
,
"流程组表格数量为空"
,
response
.
body
().
asString
()));
chart
.
put
(
"ondStep"
,
response
.
jsonPath
().
getInt
(
"data[
0
].custNum"
));
chart
.
put
(
"ondStep"
,
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
));
chart
.
put
(
"twoStep"
,
response
.
jsonPath
().
getInt
(
"data[
1
].custNum"
));
chart
.
put
(
"twoStep"
,
response
.
jsonPath
().
getInt
(
"data[
2
].custNum"
));
chart
.
put
(
"threeStep"
,
response
.
jsonPath
().
getInt
(
"data[
2
].custNum"
));
chart
.
put
(
"threeStep"
,
response
.
jsonPath
().
getInt
(
"data[
3
].custNum"
));
chart
.
put
(
"fourStep"
,
response
.
jsonPath
().
getInt
(
"data[
3
].custNum"
));
chart
.
put
(
"fourStep"
,
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
));
chart
.
put
(
"fiveStep"
,
response
.
jsonPath
().
getInt
(
"data[
4
].custNum"
));
chart
.
put
(
"fiveStep"
,
response
.
jsonPath
().
getInt
(
"data[
5
].custNum"
));
}
}
@Test
(
description
=
"工作台_标签列表"
,
priority
=
11
)
@Test
(
description
=
"工作台_标签列表"
,
priority
=
11
)
...
@@ -238,12 +238,12 @@ public class Work implements Authorization {
...
@@ -238,12 +238,12 @@ 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_detail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Object
custInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.custInfo"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
int
commitInsure
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitInsure"
);
Object
formInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.formInfo"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.custInfo.commitPlanFlag"
);
Assert
.
assertNotNull
(
custInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户流程组状态错误非1"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
formInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitInsure
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
...
@@ -272,6 +272,17 @@ public class Work implements Authorization {
...
@@ -272,6 +272,17 @@ public class Work implements Authorization {
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"历史通话为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"历史通话为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户阶段信息"
,
priority
=
20
)
public
void
查询客户阶段信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"新客户的客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_callLog
,
"是否提交计划书不为否"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改客户跟进权重"
,
priority
=
24
)
@Test
(
description
=
"修改客户跟进权重"
,
priority
=
24
)
public
void
修改客户跟进权重
(){
public
void
修改客户跟进权重
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -785,8 +796,8 @@ public class Work implements Authorization {
...
@@ -785,8 +796,8 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
listSize
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskDetailsList
,
"待完成客户数统计错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的预约列表"
,
priority
=
70
)
@Test
(
description
=
"查看我的预约
订单
列表"
,
priority
=
70
)
public
void
查看我的预约列表
(){
public
void
查看我的预约
订单
列表
(){
agent2Tku
();
agent2Tku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
...
@@ -799,4 +810,64 @@ public class Work implements Authorization {
...
@@ -799,4 +810,64 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
bookingStatus
,
0
,
network
.
message
(
BasicConfig
.
PHONE_getReservationList
,
"预约状态错误:非待参观"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"新增见面场景"
,
priority
=
71
)
public
void
新增见面场景
(){
otoManagerAuth
();
int
companyIds
[]
=
{
1
,
5
};
int
custFlows
[]
=
{
1
,
2
};
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confUsable"
,
0
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"custFlows"
,
custFlows
);
params
.
put
(
"sceneName"
,
"勿动-自动化场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"新增见面场景失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看见面场景列表"
,
priority
=
72
)
public
void
查看见面场景列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custConfList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
confUsable
=
response
.
jsonPath
().
getInt
(
"data.list[0].confUsable"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data.list[0].sceneName"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsable
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sceneName
,
"勿动-自动化场景"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfList
,
"查看预约列表不为空"
,
response
.
body
().
asString
()));
sceneId
=
response
.
jsonPath
().
getLong
(
"data.list[0].id"
);
}
@Test
(
description
=
"修改见面场景"
,
priority
=
73
)
public
void
修改见面场景
(){
int
companyIds
[]
={
5
};
int
custFlows
[]
=
{
1
,
2
,
3
,
4
,
5
};
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sceneId
);
params
.
put
(
"confUsable"
,
1
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"custFlows"
,
custFlows
);
params
.
put
(
"sceneName"
,
"勿动-自动化面访场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custConfSave
,
"修改自动化场景失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"关闭见面场景状态"
,
priority
=
74
)
public
void
关闭见面场景状态
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sceneId
);
params
.
put
(
"confUsable"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_updateStatus
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_updateStatus
,
"关闭见面场景失败"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/oto/config/BasicConfig.java
View file @
40b5d52a
...
@@ -135,7 +135,12 @@ public class BasicConfig {
...
@@ -135,7 +135,12 @@ public class BasicConfig {
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
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
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
public
static
final
String
PHONE_custConfList
=
WORK_HOST
+
"/kjy/oto/manager/custconf/list"
;
public
static
final
String
PHONE_updateStatus
=
WORK_HOST
+
"/kjy/oto/manager/custconf/updateStatus"
;
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_delete
=
WORK_HOST
+
"/kjy/oto/manager/custconf/delete"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
...
@@ -161,6 +166,8 @@ public class BasicConfig {
...
@@ -161,6 +166,8 @@ public class BasicConfig {
public
static
final
String
PHONE_getUnusualTypes
=
PHONE_HOST
+
"/kjy/oto/h5/v1/getUnusualTypes"
;
public
static
final
String
PHONE_getUnusualTypes
=
PHONE_HOST
+
"/kjy/oto/h5/v1/getUnusualTypes"
;
public
static
final
String
PHONE_fail
=
HOST
+
"/kjy/oto/interview/authorize/fail"
;
public
static
final
String
PHONE_fail
=
HOST
+
"/kjy/oto/interview/authorize/fail"
;
public
static
final
String
PHONE_getReservationList
=
HOST
+
"/kjy/pub/form/getReservationList"
;
public
static
final
String
PHONE_getReservationList
=
HOST
+
"/kjy/pub/form/getReservationList"
;
public
static
final
String
PHONE_listCustInterConf
=
PHONE_HOST
+
"/kjy/oto/interview/listCustInterConf"
;
public
static
final
String
PHONE_checkCustPhase
=
PHONE_HOST
+
"/kjy/oto/interview/checkCustPhase"
;
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
...
...
src/test/java/com/oto/utils/IdConvertBase64Enum.java
deleted
100644 → 0
View file @
80034ba3
package
com
.
oto
.
utils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author lizhi
* @date 2020/4/9 11:36 AM
*/
public
enum
IdConvertBase64Enum
{
/**
* 注意,code只能是两位
*/
DEF
(
"j2"
,
"默认类型"
),
TRANS
(
"t3"
,
"短链接服务"
),
;
private
String
code
;
private
String
desc
;
IdConvertBase64Enum
(
String
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
String
getCode
()
{
return
"K"
+
code
;
}
private
static
final
Map
<
String
,
IdConvertBase64Enum
>
ENUM_MAP
=
new
HashMap
<>();
static
{
for
(
IdConvertBase64Enum
lengthEnum
:
values
()){
ENUM_MAP
.
put
(
lengthEnum
.
getCode
(),
lengthEnum
);
}
}
public
static
IdConvertBase64Enum
getByCode
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
return
ENUM_MAP
.
get
(
code
);
}
}
\ No newline at end of file
src/test/java/com/oto/utils/IdMakeUtil.java
View file @
40b5d52a
...
@@ -78,14 +78,4 @@ public class IdMakeUtil implements Authorization {
...
@@ -78,14 +78,4 @@ public class IdMakeUtil implements Authorization {
return
decodeId
;
return
decodeId
;
}
}
public
static
String
encodingId
(
Long
id
,
IdConvertBase64Enum
base64Enum
)
{
if
(
id
==
null
||
base64Enum
==
null
||
base64Enum
.
getCode
().
length
()
!=
3
)
{
return
null
;
}
id
=
(
id
<<
3
)
^
7
;
String
encode
=
encoder
.
encodeToString
(
Long
.
toString
(
id
).
getBytes
());
String
replace
=
encode
.
replace
(
"="
,
""
);
return
base64Enum
.
getCode
()
+
(
encode
.
length
()
-
replace
.
length
())
+
replace
;
}
}
}
src/test/java/com/oto/utils/JmeterAccountFile.java
View file @
40b5d52a
...
@@ -21,14 +21,6 @@ public class JmeterAccountFile {
...
@@ -21,14 +21,6 @@ public class JmeterAccountFile {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// accountFile(path);
// accountFile(path);
otoCookieMaker
();
}
/**
* 生成otoCookie,仅用于压力测试文件
*/
public
static
void
otoCookieMaker
()
{
}
}
//仅用于生成直播账号Authkey文件
//仅用于生成直播账号Authkey文件
...
...
src/test/testNG.xml
View file @
40b5d52a
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"
客集集
"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"
oto
"
verbose=
"1"
thread-count=
"3"
>
<suite-files>
<suite-files>
<suite-file
path=
"workTestNG.xml"
></suite-file>
<suite-file
path=
"workTestNG.xml"
></suite-file>
...
...
test-output/report.html
View file @
40b5d52a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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