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
9728b086
Commit
9728b086
authored
Jun 14, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邀约优化的测试用例
parent
73d6acc9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+9
-9
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+3
-3
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+4
-4
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
9728b086
...
@@ -81,7 +81,7 @@ public class Activity implements Authorization {
...
@@ -81,7 +81,7 @@ public class Activity implements Authorization {
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动数量错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动数量错误"
,
response
.
body
().
asString
()));
acitityId
=
response
.
jsonPath
().
getInt
(
"data[0].voList[2].id"
);
acitityId
=
response
.
jsonPath
().
getInt
(
"data[0].voList[2].id"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].sceneName"
);
String
sceneName
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].sceneName"
);
Assert
.
assertEquals
(
sceneName
,
"勿动-自动化一面场景"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sceneName
,
"勿动-自动化一面
沙龙
场景"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval1
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].timeInterval"
);
String
timeInterval1
=
response
.
jsonPath
().
getString
(
"data[0].voList[0].timeInterval"
);
Assert
.
assertEquals
(
timeInterval1
,
"am"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
timeInterval1
,
"am"
,
network
.
message
(
params
,
BasicConfig
.
WORK_listActivity
,
"营销活动排序错误"
,
response
.
body
().
asString
()));
String
timeInterval2
=
response
.
jsonPath
().
getString
(
"data[0].voList[2].timeInterval"
);
String
timeInterval2
=
response
.
jsonPath
().
getString
(
"data[0].voList[2].timeInterval"
);
...
@@ -282,7 +282,7 @@ public class Activity implements Authorization {
...
@@ -282,7 +282,7 @@ public class Activity implements Authorization {
params
.
put
(
"date"
,
today
);
params
.
put
(
"date"
,
today
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_interviewConfigList
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_interviewConfigList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WX_interviewConfigList
,
"其他见面场景组数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_interviewConfigList
,
"其他见面场景组数错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"专家查看见面目的列表"
,
priority
=
15
)
@Test
(
description
=
"专家查看见面目的列表"
,
priority
=
15
)
...
@@ -517,10 +517,10 @@ public class Activity implements Authorization {
...
@@ -517,10 +517,10 @@ public class Activity implements Authorization {
@Test
(
description
=
"查询团队更新经营客户情况"
,
priority
=
40
)
@Test
(
description
=
"查询团队更新经营客户情况"
,
priority
=
40
)
public
void
查询团队更新经营客户情况
(){
public
void
查询团队更新经营客户情况
(){
sleep
(
3
000
);
sleep
(
10
000
);
otoLeaderAuth
();
otoLeaderAuth
();
checChart
(
1
,
4
,
0
);
checChart
(
1
,
0
,
0
);
checChart
(
2
,
1
,
0
);
checChart
(
2
,
3
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
4
,
0
,
0
);
checChart
(
5
,
0
,
0
);
checChart
(
5
,
0
,
0
);
...
@@ -531,7 +531,7 @@ public class Activity implements Authorization {
...
@@ -531,7 +531,7 @@ public class Activity implements Authorization {
public
void
上传
kyc
更新经营客户情况
(){
public
void
上传
kyc
更新经营客户情况
(){
saveKyc
(
cust_id
+
2
,
true
);
saveKyc
(
cust_id
+
2
,
true
);
saveKyc
(
cust_id
+
3
,
true
);
saveKyc
(
cust_id
+
3
,
true
);
sleep
(
3
000
);
sleep
(
10
000
);
checChart
(
1
,
4
,
0
);
checChart
(
1
,
4
,
0
);
checChart
(
2
,
0
,
0
);
checChart
(
2
,
0
,
0
);
checChart
(
3
,
1
,
0
);
checChart
(
3
,
1
,
0
);
...
@@ -545,7 +545,7 @@ public class Activity implements Authorization {
...
@@ -545,7 +545,7 @@ public class Activity implements Authorization {
otoPlanAuth
();
otoPlanAuth
();
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
3
);
savePlanFile
(
3
,
cust_id
+
3
);
sleep
(
3
000
);
sleep
(
10
000
);
checChart
(
1
,
4
,
1
);
checChart
(
1
,
4
,
1
);
checChart
(
2
,
0
,
0
);
checChart
(
2
,
0
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
3
,
0
,
0
);
...
@@ -558,7 +558,7 @@ public class Activity implements Authorization {
...
@@ -558,7 +558,7 @@ public class Activity implements Authorization {
public
void
上传解决方案更新经营客户情况
(){
public
void
上传解决方案更新经营客户情况
(){
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
2
);
savePlanFile
(
3
,
cust_id
+
3
);
savePlanFile
(
3
,
cust_id
+
3
);
sleep
(
3
000
);
sleep
(
10
000
);
checChart
(
1
,
4
,
1
);
checChart
(
1
,
4
,
1
);
checChart
(
2
,
0
,
0
);
checChart
(
2
,
0
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
3
,
0
,
0
);
...
@@ -572,7 +572,7 @@ public class Activity implements Authorization {
...
@@ -572,7 +572,7 @@ public class Activity implements Authorization {
otoLeaderAuth
();
otoLeaderAuth
();
promotionUpdate
(
cust_id
+
2
,
2
);
promotionUpdate
(
cust_id
+
2
,
2
);
promotionUpdate
(
cust_id
+
3
,
2
);
promotionUpdate
(
cust_id
+
3
,
2
);
sleep
(
3
000
);
sleep
(
10
000
);
checChart
(
1
,
4
,
1
);
checChart
(
1
,
4
,
1
);
checChart
(
2
,
0
,
0
);
checChart
(
2
,
0
,
0
);
checChart
(
3
,
0
,
0
);
checChart
(
3
,
0
,
0
);
...
...
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
9728b086
...
@@ -113,9 +113,9 @@ public class Invite implements Authorization {
...
@@ -113,9 +113,9 @@ public class Invite implements Authorization {
params
.
put
(
"custId"
,
cust_id
);
params
.
put
(
"custId"
,
cust_id
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
int
confUsableSize
=
response
.
jsonPath
().
getInt
(
"data[0].findAll{it.confUsable == 1}.size()"
);
int
confUsableSize
=
response
.
jsonPath
().
getInt
(
"data[0].
vos.
findAll{it.confUsable == 1}.size()"
);
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsableSize
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
confUsableSize
,
4
,
network
.
message
(
params
,
BasicConfig
.
WORK_getAllSceneConfs
,
"面访场景包含场景未根据产品组关联"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改客户面访承诺时间为今天"
,
priority
=
8
)
@Test
(
description
=
"修改客户面访承诺时间为今天"
,
priority
=
8
)
...
@@ -239,7 +239,7 @@ public class Invite implements Authorization {
...
@@ -239,7 +239,7 @@ public class Invite implements Authorization {
//查看回显
//查看回显
getHasFirstInvite
(
1
,
true
);
getHasFirstInvite
(
1
,
true
);
getCallCustInfo
(
1
);
getCallCustInfo
(
1
);
getCalendarlist
(
today
,
2
,
"自动化测试客户"
,
"勿动-自动化备用邀约"
);
getCalendarlist
(
today
+
86400000
,
2
,
"自动化测试客户"
,
"勿动-自动化备用邀约"
);
//还原
//还原
assignSeller
(
cust_id
,
INVITE_ID
,
true
,
1
,
"crm"
);
assignSeller
(
cust_id
,
INVITE_ID
,
true
,
1
,
"crm"
);
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
9728b086
...
@@ -588,7 +588,7 @@ public class Phone implements Authorization {
...
@@ -588,7 +588,7 @@ public class Phone implements Authorization {
public
void
邀约仅能查看自己创建的面访
(){
public
void
邀约仅能查看自己创建的面访
(){
otoInviterTku
();
otoInviterTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
...
@@ -609,14 +609,14 @@ public class Phone implements Authorization {
...
@@ -609,14 +609,14 @@ public class Phone implements Authorization {
otoEpertTku
();
otoEpertTku
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_interviewList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.customerInterviewVos.size()"
);
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"专家面访列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
4
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"专家面访列表为空"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
clear
();
params
.
put
(
"custName"
,
"自动化测试
用
户"
);
params
.
put
(
"custName"
,
"自动化测试
客
户"
);
params
.
put
(
"pageSize"
,
"20"
);
params
.
put
(
"pageSize"
,
"20"
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_customerList
);
int
interviewNum
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos[0].interviewNum"
);
int
interviewNum
=
response
.
jsonPath
().
getInt
(
"data.myCustomerVos[0].interviewNum"
);
...
@@ -647,7 +647,7 @@ public class Phone implements Authorization {
...
@@ -647,7 +647,7 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
meetTimeSize
,
3
,
network
.
message
(
params1
,
BasicConfig
.
WORK_detail_v2
,
"客户的见面次数非3"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
meetTimeSize
,
3
,
network
.
message
(
params1
,
BasicConfig
.
WORK_detail_v2
,
"客户的见面次数非3"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
params2
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params2
=
new
HashMap
<>();
params2
.
put
(
"custName"
,
"自动化测试
用
户"
);
params2
.
put
(
"custName"
,
"自动化测试
客
户"
);
params2
.
put
(
"pageIndex"
,
1
);
params2
.
put
(
"pageIndex"
,
1
);
params2
.
put
(
"pageSize"
,
50
);
params2
.
put
(
"pageSize"
,
50
);
response
=
network
.
getResponse
(
params2
,
BasicConfig
.
WORK_inviterCustList
);
response
=
network
.
getResponse
(
params2
,
BasicConfig
.
WORK_inviterCustList
);
...
...
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