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
eaba6bcf
Commit
eaba6bcf
authored
Mar 10, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加险种和成单的测试用例
parent
48cded8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
43 deletions
+25
-43
Depts.java
src/test/java/com/oto/cases/otoseller/Depts.java
+14
-2
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+9
-40
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+2
-1
No files found.
src/test/java/com/oto/cases/otoseller/Depts.java
View file @
eaba6bcf
...
@@ -226,7 +226,19 @@ public class Depts implements Authorization {
...
@@ -226,7 +226,19 @@ public class Depts implements Authorization {
public
void
标记成单
(){
public
void
标记成单
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"applicantName"
,
"测试投保人"
);
params
.
put
(
"comeIntoFacetime"
,
"2023-03-23"
);
params
.
put
(
"costOption"
,
3
);
params
.
put
(
"dealFlag"
,
1
);
params
.
put
(
"dealFlag"
,
1
);
params
.
put
(
"expertId"
,
EXPERT_ID
);
params
.
put
(
"guaranteeSlipNo"
,
"ZDHCS202303230001_01"
);
params
.
put
(
"insuranceAmount"
,
"100000000"
);
params
.
put
(
"insureTime"
,
"2023-03-24"
);
params
.
put
(
"insuredName"
,
"测试被保人"
);
params
.
put
(
"productId"
,
19
);
params
.
put
(
"sellerId"
,
SELLER_ID
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"writtenPremium"
,
"100000000"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_updateDealFlag
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_updateDealFlag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_updateDealFlag
,
"标记成单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_updateDealFlag
,
"标记成单失败"
,
response
.
body
().
asString
()));
...
@@ -263,9 +275,9 @@ public class Depts implements Authorization {
...
@@ -263,9 +275,9 @@ public class Depts implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"dealFlag"
,
0
);
params
.
put
(
"dealFlag"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_
update
DealFlag
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_MNG_
cancel
DealFlag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_
update
DealFlag
,
"取消成单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_MNG_
cancel
DealFlag
,
"取消成单失败"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageIndex"
,
1
);
...
...
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
eaba6bcf
...
@@ -86,7 +86,7 @@ public class Manager implements Authorization {
...
@@ -86,7 +86,7 @@ public class Manager implements Authorization {
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
,
"新增同名公司成功"
,
response
.
body
().
asString
()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveCompany
,
"新增同名公司成功"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"修改产品信息"
,
priority
=
5
)
@Test
(
description
=
"修改产品
组
信息"
,
priority
=
5
)
public
void
修改产品信息
(){
public
void
修改产品信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
5
);
params
.
put
(
"id"
,
5
);
...
@@ -96,7 +96,7 @@ public class Manager implements Authorization {
...
@@ -96,7 +96,7 @@ public class Manager implements Authorization {
params
.
put
(
"sellerArea"
,
"浙江省-杭州市"
);
params
.
put
(
"sellerArea"
,
"浙江省-杭州市"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改
客户
失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_updateCompany
,
"修改
产品组
失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"分页查看产品组列表"
,
priority
=
6
)
@Test
(
description
=
"分页查看产品组列表"
,
priority
=
6
)
...
@@ -143,23 +143,17 @@ public class Manager implements Authorization {
...
@@ -143,23 +143,17 @@ public class Manager implements Authorization {
@Test
(
description
=
"修改公司产品"
,
priority
=
9
)
@Test
(
description
=
"修改公司产品"
,
priority
=
9
)
public
void
修改公司产品
(){
public
void
修改公司产品
(){
ArrayList
companyIds
=
new
ArrayList
();
companyIds
.
add
(
5
);
ArrayList
costOptions
=
new
ArrayList
();
ArrayList
costOptions
=
new
ArrayList
();
costOptions
.
add
(
0
);
costOptions
.
add
(
0
);
costOptions
.
add
(
1
);
costOptions
.
add
(
1
);
costOptions
.
add
(
2
);
costOptions
.
add
(
2
);
ArrayList
moneyOptions
=
new
ArrayList
();
moneyOptions
.
add
(
1
);
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
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
11
);
params
.
put
(
"supplierId"
,
11
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"
moneyOptions"
,
moneyOptions
);
params
.
put
(
"
conversionCoefficient"
,
0.123
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改公司产品失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改公司产品失败"
,
response
.
body
().
asString
()));
...
@@ -188,25 +182,18 @@ public class Manager implements Authorization {
...
@@ -188,25 +182,18 @@ public class Manager implements Authorization {
@Test
(
description
=
"还原公司产品"
,
priority
=
11
)
@Test
(
description
=
"还原公司产品"
,
priority
=
11
)
public
void
还原公司产品
(){
public
void
还原公司产品
(){
ArrayList
companyIds
=
new
ArrayList
();
companyIds
.
add
(
5
);
ArrayList
costOptions
=
new
ArrayList
();
ArrayList
costOptions
=
new
ArrayList
();
costOptions
.
add
(
0
);
costOptions
.
add
(
0
);
costOptions
.
add
(
1
);
costOptions
.
add
(
1
);
costOptions
.
add
(
2
);
costOptions
.
add
(
2
);
costOptions
.
add
(
3
);
costOptions
.
add
(
3
);
ArrayList
moneyOptions
=
new
ArrayList
();
moneyOptions
.
add
(
1
);
moneyOptions
.
add
(
2
);
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
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"co
mpanyIds"
,
companyIds
);
params
.
put
(
"co
nversionCoefficient"
,
0.356
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"moneyOptions"
,
moneyOptions
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改公司产品失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改公司产品失败"
,
response
.
body
().
asString
()));
...
@@ -619,27 +606,18 @@ public class Manager implements Authorization {
...
@@ -619,27 +606,18 @@ public class Manager implements Authorization {
}
}
@Test
(
description
=
"
标记成单
"
,
priority
=
46
)
@Test
(
description
=
"
客户标签更新
"
,
priority
=
46
)
public
void
标记成单
(){
public
void
标记成单
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"dealFlag"
,
1
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_updateDealFlag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_updateDealFlag
,
"标记成单失败"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
Response
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
int
dealFlag
=
response
.
jsonPath
().
getInt
(
"data.list[0].dealFlag"
);
String
inviteName
=
response
.
jsonPath
().
getString
(
"data.list[0].inviteVo.sellerName"
);
String
inviteName
=
response
.
jsonPath
().
getString
(
"data.list[0].inviteVo.sellerName"
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.list[0].sellerVo.sellerName"
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.list[0].sellerVo.sellerName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.list[0].expertVo.sellerName"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.list[0].expertVo.sellerName"
);
Assert
.
assertEquals
(
tagSize
,
1
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
tagSize
,
1
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
dealFlag
,
1
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"标记客户成单失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
inviteName
,
"勿动-自动化测试邀约"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进邀约错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
inviteName
,
"勿动-自动化测试邀约"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进邀约错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sellerName
,
"勿动-自动化测试带看"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进销售错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
sellerName
,
"勿动-自动化测试带看"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进销售错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进专家错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
expertName
,
"勿动-自动化测试专家"
,
network
.
message
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
,
"当前跟进专家错误"
,
response
.
body
().
asString
()));
...
@@ -655,24 +633,15 @@ public class Manager implements Authorization {
...
@@ -655,24 +633,15 @@ public class Manager implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_tag_batchUpdate
,
"批量修改客户标签失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_tag_batchUpdate
,
"批量修改客户标签失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"取消成单"
,
priority
=
48
)
@Test
(
description
=
"批量客户标签更新"
,
priority
=
48
)
public
void
取消成单
(){
public
void
批量客户标签更新
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custids
.
get
(
0
));
params
.
put
(
"dealFlag"
,
0
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_updateDealFlag
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_updateDealFlag
,
"取消成单失败"
,
response
.
body
().
asString
()));
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"pageSize"
,
10
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
selectParams
.
put
(
"phoneNum"
,
"15136361300"
);
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
Response
response
=
network
.
getResponse
(
selectParams
,
BasicConfig
.
MANAGER_oto_customerList
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
int
tagSize
=
response
.
jsonPath
().
getInt
(
"data.list[0].tagNames.size()"
);
int
dealFlag
=
response
.
jsonPath
().
getInt
(
"data.list[0].dealFlag"
);
Assert
.
assertEquals
(
tagSize
,
3
,
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
()));
}
}
@Test
(
description
=
"跟进人筛选客户"
,
priority
=
49
)
@Test
(
description
=
"跟进人筛选客户"
,
priority
=
49
)
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
eaba6bcf
...
@@ -283,7 +283,8 @@ public class BasicConfig {
...
@@ -283,7 +283,8 @@ public class BasicConfig {
public
static
final
String
WORK_MNG_assignSeller
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/assignSeller"
;
public
static
final
String
WORK_MNG_assignSeller
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/assignSeller"
;
public
static
final
String
WORK_MNG_updateCompany
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/update"
;
public
static
final
String
WORK_MNG_updateCompany
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/update"
;
public
static
final
String
WORK_MNG_updateTag
=
WORK_HOST
+
"/kjy/oto/manager/customer/tag"
;
public
static
final
String
WORK_MNG_updateTag
=
WORK_HOST
+
"/kjy/oto/manager/customer/tag"
;
public
static
final
String
WORK_MNG_updateDealFlag
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/updateDealFlag"
;
public
static
final
String
WORK_MNG_updateDealFlag
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/updateDealFlag/v2"
;
public
static
final
String
WORK_MNG_cancelDealFlag
=
WORK_HOST
+
"/kjy/oto/mng/pub/form/customer/cancelDealFlag/v2"
;
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"
;
...
...
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