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
b4614791
Commit
b4614791
authored
Jul 06, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Feature/20220706-gxh' into 'master'
增加测试用例 See merge request
!14
parents
3de3e463
7548228a
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
229 additions
and
10 deletions
+229
-10
Authorization.java
src/test/java/com/oto/cases/admin/Authorization.java
+11
-4
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+150
-3
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+50
-0
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+17
-2
workTestNG.xml
src/test/workTestNG.xml
+1
-1
No files found.
src/test/java/com/oto/cases/admin/Authorization.java
View file @
b4614791
...
@@ -22,10 +22,6 @@ public interface Authorization {
...
@@ -22,10 +22,6 @@ public interface Authorization {
default
void
otoLeaderAuth
()
{
default
void
otoLeaderAuth
()
{
network
.
agentCookies
.
put
(
otoLeaderCookieKey
,
otoLeaderCookieValue
);
network
.
agentCookies
.
put
(
otoLeaderCookieKey
,
otoLeaderCookieValue
);
}
}
//oto销售工作台手机端-销售
default
void
otoSellerTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_TKU
);
}
//oto销售工作台-管理员
//oto销售工作台-管理员
default
void
otoManagerAuth
()
{
default
void
otoManagerAuth
()
{
...
@@ -33,6 +29,9 @@ public interface Authorization {
...
@@ -33,6 +29,9 @@ public interface Authorization {
}
}
//oto销售工作台手机端-销售
default
void
otoSellerTku
()
{
network
.
agentCookies
.
put
(
"tku"
,
OTO_TKU
);
}
/**
/**
* 集客助手相关授权
* 集客助手相关授权
*/
*/
...
@@ -50,4 +49,12 @@ public interface Authorization {
...
@@ -50,4 +49,12 @@ public interface Authorization {
}
}
/**
* 直播小程序相关授权
*/
default
void
visitorAuth
()
{
network
.
agentCookies
.
put
(
"authKey"
,
visitorAuth
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
visitorAuth
);
}
}
}
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
b4614791
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
b4614791
...
@@ -678,6 +678,56 @@ public class Phone implements Authorization {
...
@@ -678,6 +678,56 @@ public class Phone implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除见面场景失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_delCust
,
"删除见面场景失败"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看我的预日报为未提交"
,
priority
=
48
)
public
void
查看我的预日报为未提交
(){
otoSellerTku
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_paper_getReportFlag
);
int
reportFlag
=
response
.
jsonPath
().
getInt
(
"data.reportFlag"
);
Assert
.
assertEquals
(
reportFlag
,
0
,
network
.
message
(
BasicConfig
.
PHONE_paper_getReportFlag
,
"日报提交状态非未提交"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看日报客户列表"
,
priority
=
49
)
public
void
查看日报客户列表
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_paper_getCustomers
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
PHONE_paper_getCustomers
,
"订单状态未更新为已参观"
,
response
.
body
().
asString
()));
String
label
=
response
.
jsonPath
().
getString
(
"data.list[0].label"
);
Assert
.
assertEquals
(
label
,
"今日查看微信"
,
network
.
message
(
BasicConfig
.
PHONE_paper_getCustomers
,
"日报提交状态非0:未提交"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"提交日报"
,
priority
=
50
)
public
void
提交日报
()
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
ArrayList
custIds
=
new
ArrayList
();
custIds
.
add
(
IdMakeUtil
.
decodingId
(
cust_id
));
custIds
.
add
(
IdMakeUtil
.
decodingId
(
introduceCustomer_id
));
custIds
.
add
(
IdMakeUtil
.
decodingId
(
myselfCustomer_id
));
params
.
put
(
"custIds"
,
custIds
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
PHONE_paper_updateCustomer
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
PHONE_paper_updateCustomer
,
"提交日报失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"提交后查看日报状态"
,
priority
=
51
)
public
void
提交后查看日报状态
()
{
Response
response
=
network
.
getResponse
(
BasicConfig
.
PHONE_paper_getReportFlag
);
int
reportFlag
=
response
.
jsonPath
().
getInt
(
"data.reportFlag"
);
Assert
.
assertEquals
(
reportFlag
,
1
,
network
.
message
(
BasicConfig
.
PHONE_paper_getReportFlag
,
"日报提交状态非1:未提交"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询新客户详细信息"
,
priority
=
52
)
public
void
查询新客户详细信息
(){
otosellerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_detail
);
int
addWxStatus
=
response
.
jsonPath
().
getInt
(
"data.custInfo.addWxStatus"
);
Assert
.
assertEquals
(
addWxStatus
,
3
,
network
.
message
(
params
,
BasicConfig
.
WORK_detail
,
"加微状态不为3:上报已添加"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"删除客户"
,
priority
=
79
)
@Test
(
description
=
"删除客户"
,
priority
=
79
)
public
void
删除客户
(){
public
void
删除客户
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
b4614791
...
@@ -15,7 +15,8 @@ public class BasicConfig {
...
@@ -15,7 +15,8 @@ public class BasicConfig {
/**
/**
* 直播账号授权key
* 直播账号授权key
*/
*/
//直播访客 (吉吉)ID:907
public
static
String
visitorAuth
=
"LEH7epeHVDJWzhZ6DiexTHnfZVkhkqorGGQahRpVDVGzx7dWtF6qSrZH5EJekTCXsUVsZSSj1giy6aNiJSTN1JdVtPHgU"
;
/**
/**
* 集客助手授权key
* 集客助手授权key
*/
*/
...
@@ -99,6 +100,15 @@ public class BasicConfig {
...
@@ -99,6 +100,15 @@ public class BasicConfig {
public
static
final
String
MANAGER_notification_signInvalid
=
MANAGER_HOST
+
"/kjy/manager/oto/notification/signInvalid"
;
public
static
final
String
MANAGER_notification_signInvalid
=
MANAGER_HOST
+
"/kjy/manager/oto/notification/signInvalid"
;
public
static
final
String
MANAGER_supplier_listAll
=
MANAGER_HOST
+
"/kjy/manager/oto/supplier/listAll"
;
public
static
final
String
MANAGER_supplier_listAll
=
MANAGER_HOST
+
"/kjy/manager/oto/supplier/listAll"
;
public
static
final
String
MANAGER_notification_getNotificationTemplate
=
MANAGER_HOST
+
"/kjy/manager/oto/notification/getNotificationTemplate"
;
public
static
final
String
MANAGER_notification_getNotificationTemplate
=
MANAGER_HOST
+
"/kjy/manager/oto/notification/getNotificationTemplate"
;
public
static
final
String
MANAGER_account_saveOrUpdate
=
MANAGER_HOST
+
"/kjy/manager/oto/account/saveOrUpdate"
;
public
static
final
String
MANAGER_account_list
=
MANAGER_HOST
+
"/kjy/manager/oto/account/list"
;
public
static
final
String
MANAGER_link_save
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/save"
;
public
static
final
String
MANAGER_link_getStatus
=
MANAGER_HOST
+
"/kjy/manager/live/link/getStatus"
;
public
static
final
String
MANAGER_link_list
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/list"
;
public
static
final
String
MANAGER_link_listByPathKey
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/listByPathKey"
;
public
static
final
String
MANAGER_link_fakeUpdate
=
MANAGER_HOST
+
"/kjy/manager/oto/link/mapping/fakeUpdate"
;
public
static
final
String
MANAGER_account_fuzzyByAccountName
=
MANAGER_HOST
+
"/kjy/manager/oto/account/fuzzyByAccountName"
;
public
static
final
String
live_mapping_getTrueLinkInfo
=
MOBILE_HOST
+
"/kjy/live/oto/link/mapping/getTrueLinkInfo"
;
//*************** OTO销售工作台 ***************
//*************** OTO销售工作台 ***************
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
...
@@ -146,13 +156,14 @@ public class BasicConfig {
...
@@ -146,13 +156,14 @@ public class BasicConfig {
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_modifyTaskConf
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/modifyTaskConf"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_statisticHeader
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/statistic/header"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
public
static
final
String
WORK_taskDetailsList
=
WORK_HOST
+
"/kjy/oto/manager/sellerTask/taskDetailsList"
;
//***********************销售工作台手机端**********************
public
static
final
String
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
public
static
final
String
PHONE_custConfSave
=
WORK_HOST
+
"/kjy/oto/manager/custconf/save"
;
public
static
final
String
PHONE_custConfList
=
WORK_HOST
+
"/kjy/oto/manager/custconf/list"
;
public
static
final
String
PHONE_custConfList
=
WORK_HOST
+
"/kjy/oto/manager/custconf/list"
;
public
static
final
String
PHONE_updateStatus
=
WORK_HOST
+
"/kjy/oto/manager/custconf/updateStatus"
;
public
static
final
String
PHONE_updateStatus
=
WORK_HOST
+
"/kjy/oto/manager/custconf/updateStatus"
;
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"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_updateCustPhase
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateCustPhase"
;
public
static
final
String
PHONE_delete
=
WORK_HOST
+
"/kjy/oto/manager/custconf/delete"
;
public
static
final
String
PHONE_delete
=
WORK_HOST
+
"/kjy/oto/manager/custconf/delete"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerList
=
PHONE_HOST
+
"/kjy/oto/manager/customer/list"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
public
static
final
String
PHONE_customerSave
=
PHONE_HOST
+
"/kjy/oto/manager/customer/introduce/save"
;
public
static
final
String
PHONE_appointmentDetail
=
PHONE_HOST
+
"/kjy/oto/interview/appointment/detail"
;
public
static
final
String
PHONE_appointmentDetail
=
PHONE_HOST
+
"/kjy/oto/interview/appointment/detail"
;
...
@@ -181,7 +192,11 @@ public class BasicConfig {
...
@@ -181,7 +192,11 @@ public class BasicConfig {
public
static
final
String
PHONE_checkCustPhase
=
PHONE_HOST
+
"/kjy/oto/interview/checkCustPhase"
;
public
static
final
String
PHONE_checkCustPhase
=
PHONE_HOST
+
"/kjy/oto/interview/checkCustPhase"
;
public
static
final
String
PHONE_notification_getDetail
=
PHONE_HOST
+
"/kjy/oto/notification/getDetail"
;
public
static
final
String
PHONE_notification_getDetail
=
PHONE_HOST
+
"/kjy/oto/notification/getDetail"
;
public
static
final
String
PHONE_notification_updateSignatureInfo
=
PHONE_HOST
+
"/kjy/oto/notification/updateSignatureInfo"
;
public
static
final
String
PHONE_notification_updateSignatureInfo
=
PHONE_HOST
+
"/kjy/oto/notification/updateSignatureInfo"
;
public
static
final
String
PHONE_paper_getReportFlag
=
PHONE_HOST
+
"/kjy/oto/seller/daily/paper/getReportFlag"
;
public
static
final
String
PHONE_paper_getCustomers
=
PHONE_HOST
+
"/kjy/oto/seller/daily/paper/getCustomers"
;
public
static
final
String
PHONE_paper_updateCustomer
=
PHONE_HOST
+
"/kjy/oto/seller/daily/paper/updateCustomer"
;
//******************专用测试接口****************************8
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_verifyCode
=
WORK_HOST
+
"/kjy/oto/auto/test/verifyCode"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
public
static
final
String
WORK_delCust
=
WORK_HOST
+
"/kjy/oto/auto/test/delCust"
;
public
static
final
String
WORK_delPubFormRecord
=
WORK_HOST
+
"/kjy/oto/auto/test/delPubFormRecord"
;
public
static
final
String
WORK_delPubFormRecord
=
WORK_HOST
+
"/kjy/oto/auto/test/delPubFormRecord"
;
...
...
src/test/workTestNG.xml
View file @
b4614791
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"保险OTO"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"保险OTO"
verbose=
"1"
thread-count=
"3"
>
<test
preserve-order=
"true"
name=
"
销售管理
"
>
<test
preserve-order=
"true"
name=
"
管理后台-公域引流
"
>
<classes>
<classes>
<class
name=
"com.oto.cases.otoseller.Manager"
/>
<class
name=
"com.oto.cases.otoseller.Manager"
/>
</classes>
</classes>
...
...
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