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
16084acd
Commit
16084acd
authored
Apr 21, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加创建用户和分配团队的测试用例
parent
963ec98e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
5 deletions
+66
-5
InvitationRecord.java
src/test/java/com/oto/bean/InvitationRecord.java
+1
-0
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+40
-3
Depts.java
src/test/java/com/oto/cases/otoseller/Depts.java
+21
-1
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+1
-0
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+1
-1
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+2
-0
No files found.
src/test/java/com/oto/bean/InvitationRecord.java
View file @
16084acd
...
@@ -5,6 +5,7 @@ import lombok.Data;
...
@@ -5,6 +5,7 @@ import lombok.Data;
@Data
@Data
public
class
InvitationRecord
{
public
class
InvitationRecord
{
public
int
recordId
;
public
int
recordId
;
public
int
deptId
;
public
String
custName
;
public
String
custName
;
public
boolean
hasAssignFlag
;
public
boolean
hasAssignFlag
;
public
String
takeLookName
;
public
String
takeLookName
;
...
...
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
16084acd
...
@@ -188,7 +188,7 @@ public class Activity implements Authorization {
...
@@ -188,7 +188,7 @@ public class Activity implements Authorization {
public
void
查询活动签到配置
(){
public
void
查询活动签到配置
(){
WXCustomerTku
();
WXCustomerTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
+
1
));
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
-
1
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_signDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_signDetail
);
int
signStatus
=
response
.
jsonPath
().
getInt
(
"data.signStatus"
);
int
signStatus
=
response
.
jsonPath
().
getInt
(
"data.signStatus"
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
...
@@ -200,7 +200,7 @@ public class Activity implements Authorization {
...
@@ -200,7 +200,7 @@ public class Activity implements Authorization {
public
void
活动签到
(){
public
void
活动签到
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"firstSubmit"
,
true
);
params
.
put
(
"firstSubmit"
,
true
);
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
+
1
));
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
-
1
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_signSubmit
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_signSubmit
);
boolean
needExtra
=
response
.
jsonPath
().
getBoolean
(
"data.needExtra"
);
boolean
needExtra
=
response
.
jsonPath
().
getBoolean
(
"data.needExtra"
);
Assert
.
assertFalse
(
needExtra
,
network
.
message
(
params
,
BasicConfig
.
WX_signSubmit
,
"用户签到失败,在库手机号需要二次填写"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
needExtra
,
network
.
message
(
params
,
BasicConfig
.
WX_signSubmit
,
"用户签到失败,在库手机号需要二次填写"
,
response
.
body
().
asString
()));
...
@@ -373,10 +373,47 @@ public class Activity implements Authorization {
...
@@ -373,10 +373,47 @@ public class Activity implements Authorization {
Assert
.
assertEquals
(
vosSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_otherDetailForLeader
,
"其他见面场景的客户数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
vosSize
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_otherDetailForLeader
,
"其他见面场景的客户数错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"微信创建转介绍客户"
,
priority
=
23
)
public
void
微信创建转介绍客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化微信转介绍客户"
);
//客户姓名or客户id
params
.
put
(
"custPhoneNum"
,
"15136361011"
);
params
.
put
(
"introducerId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
));
params
.
put
(
"custActionType"
,
"05"
);
params
.
put
(
"community"
,
false
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_saveIntroduce
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_saveIntroduce
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"微信创建社区客户"
,
priority
=
24
)
public
void
微信创建社区客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化微信社区客户"
);
//客户姓名or客户id
params
.
put
(
"custPhoneNum"
,
"15136361012"
);
params
.
put
(
"custActionType"
,
"05"
);
params
.
put
(
"community"
,
true
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_saveIntroduce
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_saveIntroduce
,
"创建社区客户失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"微信创建缘故客户"
,
priority
=
25
)
public
void
微信创建缘故客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化微信缘故客户"
);
//客户姓名or客户id
params
.
put
(
"custPhoneNum"
,
"15136361012"
);
params
.
put
(
"custActionType"
,
"04"
);
params
.
put
(
"community"
,
true
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_saveIntroduce
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_saveIntroduce
,
"创建转介绍客户失败"
,
response
.
body
().
asString
()));
}
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"
pageIndex
"
,
1
);
params
.
put
(
"
custName
"
,
1
);
params
.
put
(
"pagesize"
,
20
);
params
.
put
(
"pagesize"
,
20
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
);
int
submitStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitStatus"
);
int
submitStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitStatus"
);
...
...
src/test/java/com/oto/cases/otoseller/Depts.java
View file @
16084acd
...
@@ -325,7 +325,7 @@ public class Depts implements Authorization {
...
@@ -325,7 +325,7 @@ public class Depts implements Authorization {
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
params
.
put
(
"source"
,
1
);
params
.
put
(
"source"
,
1
);
params
.
put
(
"fileName"
,
"自动化导入客户.xlsx"
);
params
.
put
(
"fileName"
,
"自动化导入客户.xlsx"
);
params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/202
21114/1499deb6eb5222f02ab88facaa0db316
.xlsx"
);
params
.
put
(
"excelUrl"
,
"https://yun.dui88.com/kjy/media/file/202
30421/7c0a1b45b098772326330b4adf7165fc
.xlsx"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_importOtoCustomer
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_importOtoCustomer
);
int
result
=
response
.
jsonPath
().
getInt
(
"data"
);
int
result
=
response
.
jsonPath
().
getInt
(
"data"
);
Assert
.
assertNotNull
(
result
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_importOtoCustomer
,
"启动导入客户程序失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
result
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_importOtoCustomer
,
"启动导入客户程序失败"
,
response
.
body
().
asString
()));
...
@@ -689,6 +689,26 @@ public class Depts implements Authorization {
...
@@ -689,6 +689,26 @@ public class Depts implements Authorization {
Assert
.
assertEquals
(
size
,
12
,
network
.
message
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
,
"问题详情为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
12
,
network
.
message
(
params
,
BasicConfig
.
WORK_findMySellerByFuzzyName
,
"问题详情为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"分配团队"
,
priority
=
48
)
public
void
分配团队
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"customerId"
,
cust_id
);
params
.
put
(
"deptId"
,
47
);
params
.
put
(
"pageSource"
,
2
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_team
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_team
,
"客户分配团队失败"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"phoneNum"
,
"15136361301"
);
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
WORK_MNG_customerList
);
int
deptId
=
response
.
jsonPath
().
getInt
(
"data.list[0].deptId"
);
Assert
.
assertEquals
(
deptId
,
47
,
network
.
message
(
selectParams
,
BasicConfig
.
WORK_MNG_customerList
,
"客户所属团队错误"
,
response
.
body
().
asString
()));
}
public
void
dimissionStatus
(
int
sellreid
){
public
void
dimissionStatus
(
int
sellreid
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
sellreid
);
params
.
put
(
"id"
,
sellreid
);
...
...
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
16084acd
...
@@ -128,6 +128,7 @@ public class Invite implements Authorization {
...
@@ -128,6 +128,7 @@ public class Invite implements Authorization {
@Test
(
description
=
"查看约面日历为已确认"
,
priority
=
9
)
@Test
(
description
=
"查看约面日历为已确认"
,
priority
=
9
)
public
void
查看约面日历为已确认
(){
public
void
查看约面日历为已确认
(){
getCalendarlist
(
today
+
86400000
,
2
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化激活用户"
,
"勿动-自动化测试邀约"
);
Assert
.
assertEquals
(
recordItem
.
deptId
,
47
,
network
.
message
(
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
""
));
}
}
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
16084acd
...
@@ -775,7 +775,7 @@ public class Phone implements Authorization {
...
@@ -775,7 +775,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"删除客户"
,
priority
=
90
)
@Test
(
description
=
"删除客户"
,
priority
=
90
)
public
void
删除客户
(){
public
void
删除客户
(){
int
id
=
cust_id
;
int
id
=
cust_id
;
for
(
int
i
=
id
-
1
;
i
<
id
+
1
0
;
i
++){
for
(
int
i
=
id
-
1
;
i
<
id
+
1
3
;
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/config/BasicConfig.java
View file @
16084acd
...
@@ -312,6 +312,7 @@ public class BasicConfig {
...
@@ -312,6 +312,7 @@ public class BasicConfig {
public
static
final
String
WORK_MNG_searchSeller
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/searchSeller"
;
public
static
final
String
WORK_MNG_searchSeller
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/searchSeller"
;
public
static
final
String
WORK_MNG_custName
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/fuzzy/custName"
;
public
static
final
String
WORK_MNG_custName
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/fuzzy/custName"
;
public
static
final
String
WORK_MNG_qaDetail
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/qaDetail"
;
public
static
final
String
WORK_MNG_qaDetail
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/qaDetail"
;
public
static
final
String
WORK_MNG_team
=
WORK_HOST
+
"/kjy/oto/manager/customer/assign/dept/team"
;
//*************************成员管理****************************
//*************************成员管理****************************
public
static
final
String
WORK_MNG_sellerList
=
WORK_HOST
+
"/kjy/oto/mng/seller/list"
;
public
static
final
String
WORK_MNG_sellerList
=
WORK_HOST
+
"/kjy/oto/mng/seller/list"
;
...
@@ -353,6 +354,7 @@ public class BasicConfig {
...
@@ -353,6 +354,7 @@ public class BasicConfig {
public
static
final
String
WX_deptList
=
WX_HOST
+
"/oto/seller/dept/minimum/list"
;
public
static
final
String
WX_deptList
=
WX_HOST
+
"/oto/seller/dept/minimum/list"
;
public
static
final
String
WX_searchCust
=
WX_HOST
+
"/oto/seller/submitRecord/searchCust"
;
public
static
final
String
WX_searchCust
=
WX_HOST
+
"/oto/seller/submitRecord/searchCust"
;
public
static
final
String
WX_submitRecord
=
WX_HOST
+
"/oto/seller/submitRecord/submit"
;
public
static
final
String
WX_submitRecord
=
WX_HOST
+
"/oto/seller/submitRecord/submit"
;
public
static
final
String
WX_saveIntroduce
=
WX_HOST
+
"/oto/customer/introduce/save"
;
//*************************销售工作台企微端**********************
//*************************销售工作台企微端**********************
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
public
static
final
String
PHONE_getCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/getCustPhase"
;
...
...
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