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
4e030676
Commit
4e030676
authored
Dec 26, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改标签接口
parent
5603c832
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12275 additions
and
846 deletions
+12275
-846
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+1
-1
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+21
-9
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+36
-20
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+3
-2
report.html
test-output/report.html
+12214
-814
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
4e030676
...
...
@@ -830,7 +830,7 @@ public class Manager implements Authorization {
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
int
dealFlag
=
response
.
jsonPath
().
getInt
(
"data.list[0].dealFlag"
);
Assert
.
assertEquals
(
tagSize
,
2
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"批量打客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
tagSize
,
3
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"批量打客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
dealFlag
,
0
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"取消客户成单失败"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
4e030676
...
...
@@ -14,8 +14,9 @@ import org.testng.annotations.Test;
import
java.sql.SQLException
;
import
java.util.*
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
getSellerPlan
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.
planIds
;
import
static
com
.
oto
.
cases
.
otoseller
.
Work
.*;
import
static
com
.
oto
.
config
.
BasicConfig
.
EXPERT_ID
;
import
static
com
.
oto
.
config
.
BasicConfig
.
INVITE_ID
;
import
static
com
.
oto
.
utils
.
BaseUtils
.*;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
//手机端
...
...
@@ -274,7 +275,7 @@ public class Phone implements Authorization {
params
.
put
(
"birthdayTime"
,
"1960-01-03"
);
params
.
put
(
"custAddress"
,
"杭州市文新地铁站"
);
params
.
put
(
"followWeight"
,
3
);
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
284
L
));
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
43
L
));
params
.
put
(
"giveProspectusFlag"
,
1
);
params
.
put
(
"commitPlanFlag"
,
1
);
params
.
put
(
"prospectusAmount"
,
"计划书金额20W"
);
...
...
@@ -323,7 +324,7 @@ public class Phone implements Authorization {
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.list[0].sellerVo.sellerName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.list[0].expertVo.sellerName"
);
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
专家
"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
总监
"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sellerName
,
"勿动-自动化测试带看"
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
}
...
...
@@ -407,7 +408,7 @@ public class Phone implements Authorization {
Assert
.
assertNull
(
followWeight
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户等级回显不为1"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
giveProspectusFlag
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否可送计划书不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
专家
"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"专家回显错误,非【勿动-自动化测试专家】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
总监
"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"专家回显错误,非【勿动-自动化测试专家】"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"上传社区参观面访详情"
,
priority
=
30
)
...
...
@@ -425,7 +426,7 @@ public class Phone implements Authorization {
params
.
put
(
"birthdayTime"
,
"1960-01-03"
);
params
.
put
(
"custAddress"
,
"杭州市文新地铁站"
);
params
.
put
(
"followWeight"
,
2
);
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
43
L
));
params
.
put
(
"expertId"
,
IdMakeUtil
.
encodingId
(
284
L
));
params
.
put
(
"giveProspectusFlag"
,
1
);
params
.
put
(
"commitPlanFlag"
,
0
);
params
.
put
(
"isNormal"
,
false
);
...
...
@@ -509,7 +510,7 @@ public class Phone implements Authorization {
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
Assert
.
assertEquals
(
giveProspectusFlag
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否可送计划书不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
专家
"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试
总监
"
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"是否已送计划书不为否"
,
response
.
body
().
asString
()));
}
...
...
@@ -638,8 +639,8 @@ public class Phone implements Authorization {
@Test
(
description
=
"查看面访详情"
,
priority
=
53
)
public
void
查看面访详情
(){
interviewdetail
(
interviewIds
.
get
(
0
),
3
,
2
,
"手机号不一致且非面对面扫码的情况说明"
,
1
,
1
,
"勿动-自动化测试
专家
"
);
interviewdetail
(
interviewIds
.
get
(
1
),
2
,
1
,
"手机号不一致的情况说明"
,
1
,
0
,
"勿动-自动化测试
总监
"
);
interviewdetail
(
interviewIds
.
get
(
0
),
3
,
2
,
"手机号不一致且非面对面扫码的情况说明"
,
1
,
1
,
"勿动-自动化测试
总监
"
);
interviewdetail
(
interviewIds
.
get
(
1
),
2
,
1
,
"手机号不一致的情况说明"
,
1
,
0
,
"勿动-自动化测试
专家
"
);
interviewdetail
(
interviewIds
.
get
(
2
),
1
,
0
,
""
,
0
,
0
,
null
);
}
...
...
@@ -666,12 +667,23 @@ public class Phone implements Authorization {
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
public
void
专家能查看关联自己的面访
(){
otoEpertTku
();
long
id
=
IdMakeUtil
.
decodingId
(
cust_id
);
assignSeller
((
int
)
id
,
EXPERT_ID
,
true
,
3
);
//分配给专家
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化激活用户"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"专家面访列表为空"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"custName"
,
"自动化激活用户"
);
params
.
put
(
"pageSize"
,
"20"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
interviewNum
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos[0].interviewNum"
);
Assert
.
assertEquals
(
interviewNum
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_customerList
,
"专家线下拜访次数不包含关联面访"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"上传面访后完成见面计划"
,
priority
=
58
)
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
4e030676
...
...
@@ -62,6 +62,8 @@ public class Work implements Authorization {
public
void
公域引流
_
创建标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"tagName"
,
"勿动-自动化测试标签"
);
params
.
put
(
"roleTypes"
,
new
int
[]{
6
});
params
.
put
(
"sellerIds"
,
new
int
[]{
3
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_saveTag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveTag
,
"创建标签失败"
,
response
.
body
().
asString
()));
...
...
@@ -95,6 +97,8 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"tagName"
,
"勿动-自动化更新标签"
);
params
.
put
(
"id"
,
tagId
);
params
.
put
(
"roleTypes"
,
new
int
[]{
5
,
2
});
params
.
put
(
"sellerIds"
,
new
int
[]{
43
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateTag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateTag
,
"修改标签失败"
,
response
.
body
().
asString
()));
...
...
@@ -171,7 +175,9 @@ public class Work implements Authorization {
public
void
工作台
_
标签列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_tagList
);
String
tagName
=
response
.
jsonPath
().
getString
(
"data.find{it.tagId =="
+
tagId
+
"}.tagName"
);
Assert
.
assertEquals
(
tagName
,
"勿动-自动化更新标签"
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"跟进表格数量为空"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
tagName
,
"勿动-自动化更新标签"
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"标签名称错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"标签数量错误"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"全部客户客户列表"
,
priority
=
11
)
...
...
@@ -426,7 +432,7 @@ public class Work implements Authorization {
response
=
network
.
getResponse
(
BasicConfig
.
WORK_tagList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.tagId =="
+
tagId
+
"}.size()"
);
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"
跟进表格数量为空
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
0
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"
标签数量错误
"
,
response
.
body
().
asString
()));
params
.
clear
();
sleep
(
1000
);
...
...
@@ -467,7 +473,7 @@ public class Work implements Authorization {
response
=
network
.
getResponse
(
BasicConfig
.
WORK_tagList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.findAll{it.tagId =="
+
tagId
+
"}.size()"
);
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"
跟进表格数量为空
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
BasicConfig
.
WORK_tagList
,
"
标签数量错误
"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看日报客户列表"
,
priority
=
30
)
...
...
@@ -656,21 +662,6 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_fuzzyCustName
,
"客户查找结果为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_删除标签"
,
priority
=
41
)
public
void
公域引流
_
删除标签
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
tagId
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_deleteTag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_deleteTag
,
"删除标签失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_tagList
);
int
id
=
response
.
jsonPath
().
getInt
(
"data.list[0].id"
);
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"新标签的状态不为打开"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_关闭销售呼叫权限"
,
priority
=
42
)
public
void
公域引流
_
关闭销售呼叫权限
(){
...
...
@@ -1319,6 +1310,13 @@ public class Work implements Authorization {
}
@Test
(
description
=
"查看可筛选标签列表"
,
priority
=
95
)
public
void
查看可筛选标签列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
WORK_customerTagList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WORK_customerTagList
,
"查看可筛选标签数量正确"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"关闭见面场景状态"
,
priority
=
97
)
public
void
关闭见面场景状态
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -1491,7 +1489,7 @@ public class Work implements Authorization {
sleep
(
3000
);
//销售完成面访,跟进时间更新,联系新客户任务完成
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskConfId"
,
7
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
params
.
put
(
"taskConfId"
,
7
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_taskList
);
...
...
@@ -1830,6 +1828,24 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_getSceneTypes
,
"场景结果为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"公域引流_删除标签"
,
priority
=
125
)
public
void
公域引流
_
删除标签
(){
otoInviterAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
tagId
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_deleteTag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_deleteTag
,
"删除标签失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_tagList
);
int
id
=
response
.
jsonPath
().
getInt
(
"data.list[0].id"
);
Assert
.
assertTrue
(
id
!=
tagId
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_tagList
,
"标签删除后依旧显示"
,
response
.
body
().
asString
()));
}
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -1968,7 +1984,7 @@ public class Work implements Authorization {
return
totalCoefficient
;
}
public
void
assignSeller
(
int
customerId
,
int
sellerId
,
boolean
result
,
int
assignType
)
{
public
static
void
assignSeller
(
int
customerId
,
int
sellerId
,
boolean
result
,
int
assignType
)
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"customerId"
,
customerId
);
params
.
put
(
"assignType"
,
assignType
);
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
4e030676
...
...
@@ -43,8 +43,8 @@ public class BasicConfig {
/*******OTO销售工作台*********/
public
static
final
String
OTO_INVITER_TKU
=
"4yrzAfNog7WE527NKCNmqBqph48N7mWR9J49QYysZmKYC3DF97hQFap7RphynF3GFXLhp7GFZ35mc"
;
public
static
final
String
OTO_TAKER_TKU
=
"7Fcuh7FWTsTHSqdG
Me8YkveUybFE3wHk9mLiXVmBDJLeb1ziCz1PgEhvP8PDF2wzLy1Wa5NDhHptVxQMDus68MuZTCnuHsdPqgdN8hDwNHG4UKSHETMxQ8Fr8RJEoFPKsMipeBj1qyQbHUfDHkAXttwC
"
;
public
static
final
String
OTO_EXPERT_TKU
=
"7Fcuh7FWTsTHSqdG
Me8Ykvemfh5GwzxxMicv5aVZLvZgWavNN8HMHeTDGLKfKVwwHZfCGXL864f64enZ1L3MUeg1UkZwKqhTkZM65V8comDPFGtrB3kRFzcnK94m1riZJRydADDmM6h6fAqXK6ajs26B
"
;
public
static
final
String
OTO_TAKER_TKU
=
"7Fcuh7FWTsTHSqdG
HA53Jv3dAJESuwVEjyYePsTe2DpEFKDPSzrQRd3KraSE3H5BGxqE2SuTfwkRUMgsgrRGRBysJFuFUdtZ5eXkeWd1o9ffLzF68btpHd9GH5TADtCSTQFRyvULHXDqaDbEmxDXshzT
"
;
public
static
final
String
OTO_EXPERT_TKU
=
"7Fcuh7FWTsTHSqdG
HA53Jv3LYQbKS8M4zrecCLrSzbd2jbXqxG9neiHi6Ct8hfd1zqPsZQkzmSPsTJiFu4sxyAGaxLuuZY98NdwLwvSzfwrJyPWtAX63qCbBEBW24SkDwhEQXqGf4pxWyFRnfiARmw2C
"
;
// *************** 客集集域名 ***************
public
static
final
String
HOST
=
"https://kjj.m.duibatest.com.cn"
;
public
static
final
String
SSO_HOST
=
"https://sso.duibatest.com.cn"
;
...
...
@@ -232,6 +232,7 @@ public class BasicConfig {
public
static
final
String
WORK_callSubmit
=
WORK_HOST
+
"/kjy/oto/manager/customer/call/cust/info/submit"
;
public
static
final
String
WORK_getSceneTypes
=
WORK_HOST
+
"/kjy/oto/manager/custconf/getSceneTypes"
;
public
static
final
String
WORK_promotionUpdate
=
WORK_HOST
+
"/kjy/oto/manager/customer/promotion/update"
;
public
static
final
String
WORK_customerTagList
=
WORK_HOST
+
"/kjy/oto/manager/customer/tag/list"
;
//*************************客集集营销平台******************************
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
...
...
test-output/report.html
View file @
4e030676
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