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
d2f23eae
Commit
d2f23eae
authored
Sep 08, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220824-gxh' into 'master'
删除客户阶段 See merge request
!26
parents
8921fb69
12697a29
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
752 additions
and
4270 deletions
+752
-4270
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+5
-68
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+14
-13
workTestNG.xml
src/test/workTestNG.xml
+5
-5
report.html
test-output/report.html
+728
-4184
No files found.
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
d2f23eae
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/cases/otoseller/Work.java
View file @
d2f23eae
...
@@ -105,12 +105,12 @@ public class Work implements Authorization {
...
@@ -105,12 +105,12 @@ public class Work implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
FORM_submitQuestion
,
"客户填写表单失败"
,
response
.
body
().
asString
()));
// for(int i =
0;i<1
0;i++){
// for(int i =
50;i<6
0;i++){
// HashMap<String,Object> params = new HashMap<>();
// HashMap<String,Object> params = new HashMap<>();
// params.put("formId", "Kj20ODA3");
// params.put("formId", "Kj20ODA3");
// params.put("phoneNum", "130112100
5
"+i);
// params.put("phoneNum", "130112100"+i);
// params.put("urlLink", "https://kjj-static.duibatest.com.cn/cpic-home/202111261430?formId=Kj20ODA3&channel=bd&agent=x");
// params.put("urlLink", "https://kjj-static.duibatest.com.cn/cpic-home/202111261430?formId=Kj20ODA3&channel=bd&agent=x");
// params.put("username", "
用户5
"+i);
// params.put("username", "
9月用户
"+i);
// params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
// params.put("uuid", "622d83e4-ca21-4ccd-94cb-182c0f2a6b60");
// Response response = network.postResponse(params,BasicConfig.FORM_submit);
// Response response = network.postResponse(params,BasicConfig.FORM_submit);
// String recordId = response.jsonPath().getString("data.recordId");
// String recordId = response.jsonPath().getString("data.recordId");
...
@@ -150,7 +150,7 @@ public class Work implements Authorization {
...
@@ -150,7 +150,7 @@ public class Work implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
,
"销售相同产品组分配客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_assignSeller
,
"销售相同产品组分配客户失败"
,
response
.
body
().
asString
()));
// for(int i = 6
028;i<6035
;i++){
// for(int i = 6
104;i<6204
;i++){
// HashMap<String,Object> params = new HashMap<>();
// HashMap<String,Object> params = new HashMap<>();
// params.put("customerId",i);
// params.put("customerId",i);
// params.put("sellerId", 2);
// params.put("sellerId", 2);
...
@@ -274,11 +274,9 @@ public class Work implements Authorization {
...
@@ -274,11 +274,9 @@ public class Work implements Authorization {
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
Object
custInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.custInfo"
);
Object
custInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.custInfo"
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custInfo.custFlow"
);
Object
formInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.formInfo"
);
Object
formInfo
=
response
.
jsonPath
().
getJsonObject
(
"data.formInfo"
);
Assert
.
assertNotNull
(
custInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
custInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户提交计划书状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
formInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
formInfo
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"新客户投保要素确认状态错误非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
@Test
(
description
=
"查询客户电话表单回填状态"
,
priority
=
17
)
...
@@ -312,9 +310,7 @@ public class Work implements Authorization {
...
@@ -312,9 +310,7 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_getCustPhase
);
int
custFlow
=
response
.
jsonPath
().
getInt
(
"data.custFlow"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
Assert
.
assertEquals
(
custFlow
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_getCustPhase
,
"新客户的客户阶段不为1:具备机构养老理念"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_getCustPhase
,
"是否提交计划书不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
commitPlanFlag
,
0
,
network
.
message
(
params
,
BasicConfig
.
PHONE_getCustPhase
,
"是否提交计划书不为否"
,
response
.
body
().
asString
()));
}
}
...
@@ -852,10 +848,8 @@ public class Work implements Authorization {
...
@@ -852,10 +848,8 @@ public class Work implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
Object
custValue
=
response
.
jsonPath
().
getJsonObject
(
"data.custValue"
);
Object
followWeight
=
response
.
jsonPath
().
getJsonObject
(
"data.followWeight"
);
Object
followWeight
=
response
.
jsonPath
().
getJsonObject
(
"data.followWeight"
);
Assert
.
assertNull
(
custValue
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户价值未清空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
followWeight
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户权重未清空"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
followWeight
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户权重未清空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"总监查看名下销售列表"
,
priority
=
72
)
@Test
(
description
=
"总监查看名下销售列表"
,
priority
=
72
)
...
@@ -1117,12 +1111,10 @@ public class Work implements Authorization {
...
@@ -1117,12 +1111,10 @@ public class Work implements Authorization {
public
void
新增见面场景
(){
public
void
新增见面场景
(){
otoManagerAuth
();
otoManagerAuth
();
int
companyIds
[]
=
{
1
,
5
};
int
companyIds
[]
=
{
1
,
5
};
int
custFlows
[]
=
{
1
,
2
};
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confUsable"
,
0
);
params
.
put
(
"confUsable"
,
0
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"companyIds"
,
companyIds
);
params
.
put
(
"custFlows"
,
custFlows
);
params
.
put
(
"sceneName"
,
"勿动-自动化场景"
);
params
.
put
(
"sceneName"
,
"勿动-自动化场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
params
.
put
(
"sceneDesc"
,
"勿动,这是自动化测试专用的面访场景"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_custConfSave
);
...
@@ -1225,6 +1217,15 @@ public class Work implements Authorization {
...
@@ -1225,6 +1217,15 @@ public class Work implements Authorization {
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_customer_update
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_customer_update
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_customer_update
,
"修改客户的产品组失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_customer_update
,
"修改客户的产品组失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"phoneNum"
,
phone
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_oto_customerList
);
int
companySize
=
response
.
jsonPath
().
getInt
(
"data.list[0].companyIds.size()"
);
Assert
.
assertEquals
(
companySize
,
2
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_customerList
,
"客户的产品组错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询所有产品列表"
,
priority
=
97
)
@Test
(
description
=
"查询所有产品列表"
,
priority
=
97
)
...
...
src/test/workTestNG.xml
View file @
d2f23eae
...
@@ -18,11 +18,11 @@
...
@@ -18,11 +18,11 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"久久保人管系统"
>
<!-- <test preserve-order="true" name="久久保人管系统">--
>
<classes
>
<!-- <classes>--
>
<class
name=
"com.oto.cases.otoseller.JiuJiuBao"
/
>
<!-- <class name="com.oto.cases.otoseller.JiuJiuBao"/>--
>
</classes
>
<!-- </classes>--
>
</test
>
<!-- </test>--
>
</suite>
</suite>
<!-- Suite -->
<!-- Suite -->
...
...
test-output/report.html
View file @
d2f23eae
This diff is collapsed.
Click to expand it.
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