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
44fd5c44
Commit
44fd5c44
authored
Nov 14, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加绑定企微、导入外部客户、全部客户列表的接口用例
parent
6d6c3c52
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
23 deletions
+153
-23
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+49
-2
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+4
-4
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+91
-17
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+9
-0
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
44fd5c44
...
@@ -883,15 +883,62 @@ public class Manager implements Authorization {
...
@@ -883,15 +883,62 @@ public class Manager implements Authorization {
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
Assert
.
assertEquals
(
companySize
,
2
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
companySize
,
2
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询所有产品列表"
,
priority
=
57
)
@Test
(
description
=
"查询所有产品列表"
,
priority
=
57
)
public
void
查询所有产品列表
(){
public
void
查询所有产品列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_product_listAll
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_product_listAll
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_product_listAll
,
"查看产品列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_product_listAll
,
"查看产品列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询可导入的客户来源列表"
,
priority
=
58
)
public
void
查询可导入的客户来源列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_getCustSourceEnum
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
BasicConfig
.
MANAGER_getCustSourceEnum
,
"查看可导入的客户来源列表"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"导入客户文件并成功"
,
priority
=
59
)
public
void
导入客户文件
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
params
.
put
(
"source"
,
1
);
params
.
put
(
"fileName"
,
"自动化导入客户.xlsx"
);
params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/20221114/1499deb6eb5222f02ab88facaa0db316.xlsx"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_importOtoCustomer
);
int
result
=
response
.
jsonPath
().
getInt
(
"data"
);
Assert
.
assertNotNull
(
result
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_importOtoCustomer
,
"启动导入客户程序失败"
,
response
.
body
().
asString
()));
params
.
clear
();
boolean
succecss
=
false
;
params
.
put
(
"taskId"
,
result
);
for
(
int
i
=
0
;
i
<
10
;
i
++){
sleep
(
1000
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_result
);
boolean
hasFinish
=
response
.
jsonPath
().
getBoolean
(
"data.hasFinish"
);
if
(
hasFinish
)
{
String
failureExcelUrl
=
response
.
jsonPath
().
getString
(
"data.failureExcelUrl"
);
int
successCount
=
response
.
jsonPath
().
getInt
(
"data.successCount"
);
Assert
.
assertNotNull
(
failureExcelUrl
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"失败原因链接不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
successCount
,
1
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"导入成功数量不为1"
,
response
.
body
().
asString
()));
succecss
=
true
;
break
;
}
}
Assert
.
assertTrue
(
succecss
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_result
,
"导入客户结果失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询导入的文件上传记录"
,
priority
=
60
)
public
void
查询导入的文件上传记录
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskType"
,
34
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
5
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_listForType
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_listForType
,
"查看导入文件上传记录不为空"
,
response
.
body
().
asString
()));
}
}
public
int
searchCustName
(
String
custName
){
public
int
searchCustName
(
String
custName
){
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
44fd5c44
...
@@ -652,13 +652,13 @@ public class Phone implements Authorization {
...
@@ -652,13 +652,13 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"邀约查看历史备注包含
面访
备注"
,
priority
=
56
)
@Test
(
description
=
"邀约查看历史备注包含
各种
备注"
,
priority
=
56
)
public
void
邀约查看历史备注包含
面访
备注
(){
public
void
邀约查看历史备注包含
各种
备注
(){
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_historyRecord
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_historyRecord
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
5
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
7
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
...
@@ -675,7 +675,7 @@ public class Phone implements Authorization {
...
@@ -675,7 +675,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"删除客户"
,
priority
=
79
)
@Test
(
description
=
"删除客户"
,
priority
=
79
)
public
void
删除客户
(){
public
void
删除客户
(){
long
id
=
IdMakeUtil
.
decodingId
(
cust_id
);
long
id
=
IdMakeUtil
.
decodingId
(
cust_id
);
for
(
int
i
=
(
int
)
id
;
i
<
id
+
6
;
i
++){
for
(
int
i
=
(
int
)
id
;
i
<
id
+
7
;
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
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
44fd5c44
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/config/BasicConfig.java
View file @
44fd5c44
...
@@ -130,6 +130,10 @@ public class BasicConfig {
...
@@ -130,6 +130,10 @@ public class BasicConfig {
public
static
final
String
MANAGER_tagUpdate
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/tag/update"
;
public
static
final
String
MANAGER_tagUpdate
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/tag/update"
;
public
static
final
String
MANAGER_custName
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/fuzzy/custName"
;
public
static
final
String
MANAGER_custName
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/fuzzy/custName"
;
public
static
final
String
MANAGER_updateDealFlag
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/updateDealFlag"
;
public
static
final
String
MANAGER_updateDealFlag
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/updateDealFlag"
;
public
static
final
String
MANAGER_getCustSourceEnum
=
MANAGER_HOST
+
"/kjy/manager/pub/form/customer/import/getCustSourceEnum"
;
public
static
final
String
MANAGER_listForType
=
MANAGER_HOST
+
"/kjy/manager/live/import/listForType"
;
public
static
final
String
MANAGER_importOtoCustomer
=
MANAGER_HOST
+
"/kjy/manager/pub/form/importOtoCustomer"
;
public
static
final
String
MANAGER_result
=
MANAGER_HOST
+
"/kjy/manager/live/import/result"
;
//*************** OTO销售工作台 ***************
//*************** OTO销售工作台 ***************
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
...
@@ -210,6 +214,11 @@ public class BasicConfig {
...
@@ -210,6 +214,11 @@ public class BasicConfig {
public
static
final
String
WORK_checkCustList
=
WORK_HOST
+
"/kjy/oto/manager/customer/check/custList"
;
public
static
final
String
WORK_checkCustList
=
WORK_HOST
+
"/kjy/oto/manager/customer/check/custList"
;
public
static
final
String
WORK_checkList
=
WORK_HOST
+
"/kjy/oto/manager/customer/check/list"
;
public
static
final
String
WORK_checkList
=
WORK_HOST
+
"/kjy/oto/manager/customer/check/list"
;
public
static
final
String
WORK_historyRecord
=
WORK_HOST
+
"/kjy/oto/manager/customer/log/historyRecord"
;
public
static
final
String
WORK_historyRecord
=
WORK_HOST
+
"/kjy/oto/manager/customer/log/historyRecord"
;
public
static
final
String
WORK_inviterCustList
=
WORK_HOST
+
"/kjy/oto/manager/customer/invite/custList"
;
public
static
final
String
WORK_SellerCustList
=
WORK_HOST
+
"/kjy/oto/manager/customer/sellerOrExpert/custList"
;
public
static
final
String
WORK_sellerList
=
WORK_HOST
+
"/kjy/oto/manager/customer/role/sellerList"
;
public
static
final
String
WORK_getWxCustByName
=
WORK_HOST
+
"/kjy/oto/manager/customer/getWxCustByName"
;
public
static
final
String
WORK_bindWxCust
=
WORK_HOST
+
"/kjy/oto/manager/customer/bindWxCust"
;
//*************************客集集营销平台******************************
//*************************客集集营销平台******************************
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
...
...
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