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
45285156
Commit
45285156
authored
Dec 01, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加盘点计划回收和新平台销售的测试用例
parent
0626c9d7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
319 additions
and
80 deletions
+319
-80
InvitationRecord.java
src/test/java/com/oto/bean/InvitationRecord.java
+1
-1
InviteDay.java
src/test/java/com/oto/bean/InviteDay.java
+2
-2
Plan.java
src/test/java/com/oto/bean/Plan.java
+18
-0
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+37
-1
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+20
-5
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+230
-70
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+11
-1
No files found.
src/test/java/com/oto/bean/
i
nvitationRecord.java
→
src/test/java/com/oto/bean/
I
nvitationRecord.java
View file @
45285156
...
...
@@ -3,7 +3,7 @@ package com.oto.bean;
import
lombok.Data
;
@Data
public
class
i
nvitationRecord
{
public
class
I
nvitationRecord
{
public
int
recordId
;
public
String
custName
;
public
boolean
hasAssignFlag
;
...
...
src/test/java/com/oto/bean/
i
nviteDay.java
→
src/test/java/com/oto/bean/
I
nviteDay.java
View file @
45285156
...
...
@@ -5,7 +5,7 @@ import lombok.Data;
import
java.util.List
;
@Data
public
class
i
nviteDay
{
public
class
I
nviteDay
{
public
long
calendarTime
;
public
List
<
i
nvitationRecord
>
invitationInfo
;
public
List
<
I
nvitationRecord
>
invitationInfo
;
}
src/test/java/com/oto/bean/Plan.java
0 → 100644
View file @
45285156
package
com
.
oto
.
bean
;
import
lombok.Data
;
@Data
public
class
Plan
{
public
String
planActionType
;
public
String
actionTime
;
public
int
actionSeller
;
public
Integer
interviewSceneConfId
;
public
Plan
(
String
planActionType
,
String
actionTime
,
int
actionSeller
,
Integer
interviewSceneConfId
)
{
this
.
planActionType
=
planActionType
;
this
.
actionTime
=
actionTime
;
this
.
actionSeller
=
actionSeller
;
this
.
interviewSceneConfId
=
interviewSceneConfId
;
}
}
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
45285156
...
...
@@ -83,6 +83,7 @@ public class Manager implements Authorization {
params
.
put
(
"sellerLevel"
,
2
);
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"parentId"
,
28
);
params
.
put
(
"thirdParty"
,
new
int
[]{
1
,
2
});
System
.
out
.
println
(
JSONObject
.
toJSONString
(
params
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -106,6 +107,7 @@ public class Manager implements Authorization {
params
.
put
(
"sellerLevel"
,
1
);
params
.
put
(
"roles"
,
new
int
[]{
5
,});
params
.
put
(
"parentId"
,
LEADER_ID
);
params
.
put
(
"thirdParty"
,
new
int
[]{
1
});
params
.
put
(
"sellerName"
,
"勿动-自动化测试邀约"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_updateSeller
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -133,6 +135,7 @@ public class Manager implements Authorization {
params
.
put
(
"workStatus"
,
1
);
params
.
put
(
"assignNewCustPermission"
,
1
);
params
.
put
(
"assignRecycleCustPermission"
,
1
);
params
.
put
(
"thirdParty"
,
new
int
[]{
1
,
2
});
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
...
...
@@ -938,7 +941,40 @@ public class Manager implements Authorization {
params
.
put
(
"pageSize"
,
5
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_listForType
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_listForType
,
"查看导入文件上传记录不为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_listForType
,
"查看导入文件上传记录为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询设备列表"
,
priority
=
61
)
public
void
查询设备列表
(){
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_ykAvailableList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_ykAvailableList
,
"查看设备列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"绑定设备"
,
priority
=
62
)
public
void
绑定设备
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"accountName"
,
"imei4"
);
params
.
put
(
"sellerId"
,
SELLER_ID
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_ykBind
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
MANAGER_ykBind
,
"绑定设备失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"解绑设备"
,
priority
=
63
)
public
void
解绑设备
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"sellerId"
,
SELLER_ID
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_ykUnbind
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
MANAGER_ykUnbind
,
"解绑设备失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"刷新设备绑定情况"
,
priority
=
64
)
public
void
刷新设备绑定情况
(){
Response
response
=
network
.
postResponse
(
BasicConfig
.
MANAGER_ykSyncBind
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
MANAGER_ykSyncBind
,
"刷新设备失败"
,
response
.
body
().
asString
()));
}
public
int
searchCustName
(
String
custName
){
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
45285156
...
...
@@ -14,6 +14,8 @@ 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
.
utils
.
BaseUtils
.*;
import
static
com
.
oto
.
utils
.
ThreadSleepUtils
.
sleep
;
//手机端
...
...
@@ -246,12 +248,12 @@ public class Phone implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
interviewIds
.
get
(
0
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custExtDetail
);
int
followWeight
=
response
.
jsonPath
().
getInt
(
"data.followWeight"
);
String
followWeight
=
response
.
jsonPath
().
getString
(
"data.followWeight"
);
String
interviewAddress
=
response
.
jsonPath
().
getString
(
"data.interviewAddress"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
String
giveProspectusFlag
=
response
.
jsonPath
().
getString
(
"data.giveProspectusFlag"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
Assert
.
assert
Equals
(
followWeight
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户权重回显不为1"
,
response
.
body
().
asString
()));
Assert
.
assert
Null
(
followWeight
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户权重回显不为1"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
interviewAddress
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户地址回显为空"
,
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
()));
...
...
@@ -398,11 +400,11 @@ public class Phone implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
PHONE_custExtDetail
);
String
interviewAddress
=
response
.
jsonPath
().
getString
(
"data.interviewAddress"
);
int
commitPlanFlag
=
response
.
jsonPath
().
getInt
(
"data.commitPlanFlag"
);
int
followWeight
=
response
.
jsonPath
().
getInt
(
"data.followWeight"
);
String
followWeight
=
response
.
jsonPath
().
getString
(
"data.followWeight"
);
String
giveProspectusFlag
=
response
.
jsonPath
().
getString
(
"data.giveProspectusFlag"
);
String
expertName
=
response
.
jsonPath
().
getString
(
"data.expertName"
);
Assert
.
assertNotNull
(
interviewAddress
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户地址回显不为空"
,
response
.
body
().
asString
()));
Assert
.
assertN
otN
ull
(
followWeight
,
network
.
message
(
params
,
BasicConfig
.
PHONE_custExtDetail
,
"客户等级回显不为1"
,
response
.
body
().
asString
()));
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
()));
...
...
@@ -658,7 +660,7 @@ public class Phone implements Authorization {
params
.
put
(
"custId"
,
IdMakeUtil
.
decodingId
(
cust_id
));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_historyRecord
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size()"
);
Assert
.
assertEquals
(
size
,
7
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
6
,
network
.
message
(
params
,
BasicConfig
.
WORK_historyRecord
,
"邀约面访列表不为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"专家能查看关联自己的面访"
,
priority
=
57
)
...
...
@@ -672,6 +674,19 @@ public class Phone implements Authorization {
Assert
.
assertEquals
(
size
,
1
,
network
.
message
(
params
,
BasicConfig
.
PHONE_interviewList
,
"专家面访列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"上传面访后完成见面计划"
,
priority
=
58
)
public
void
上传面访后完成见面计划
(){
otoTakerAuth
();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ids"
,
planIds
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_getPlanDetail
);
int
phoneStatus
=
response
.
jsonPath
().
getInt
(
"data.meets[0].planStatus"
);
Assert
.
assertEquals
(
phoneStatus
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_getPlanDetail
,
"见面计划状态非已完成"
,
response
.
body
().
asString
()));
params
.
clear
();
getSellerPlan
(
1
,
1
,
1
,
1
,
2
,
0
);
}
@Test
(
description
=
"删除客户"
,
priority
=
79
)
public
void
删除客户
(){
long
id
=
IdMakeUtil
.
decodingId
(
cust_id
);
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
45285156
This diff is collapsed.
Click to expand it.
src/test/java/com/oto/config/BasicConfig.java
View file @
45285156
...
...
@@ -134,6 +134,10 @@ public class BasicConfig {
public
static
final
String
MANAGER_listForType
=
MANAGER_HOST
+
"/kjy/manager/live/import/listForType"
;
public
static
final
String
MANAGER_importOtoCustomer
=
MANAGER_HOST
+
"/kjy/manager/pub/form/importOtoCustomer"
;
public
static
final
String
MANAGER_result
=
MANAGER_HOST
+
"/kjy/manager/live/import/result"
;
public
static
final
String
MANAGER_ykAvailableList
=
MANAGER_HOST
+
"/kjy/manager/oto/seller/account/yk/availableList"
;
public
static
final
String
MANAGER_ykBind
=
MANAGER_HOST
+
"/kjy/manager/oto/seller/account/yk/bind"
;
public
static
final
String
MANAGER_ykUnbind
=
MANAGER_HOST
+
"/kjy/manager/oto/seller/account/yk/unbind"
;
public
static
final
String
MANAGER_ykSyncBind
=
MANAGER_HOST
+
"/kjy/manager/oto/seller/account/yk/syncBind"
;
//*************** OTO销售工作台 ***************
public
static
final
String
WORK_getCaptcha
=
WORK_HOST
+
"/kjy/oto/manager/auth/captcha"
;
...
...
@@ -220,6 +224,12 @@ public class BasicConfig {
public
static
final
String
WORK_getWxCustByName
=
WORK_HOST
+
"/kjy/oto/manager/customer/getWxCustByName"
;
public
static
final
String
WORK_bindWxCust
=
WORK_HOST
+
"/kjy/oto/manager/customer/bindWxCust"
;
public
static
final
String
WORK_updateFollowUp
=
WORK_HOST
+
"/kjy/oto/manager/customer/updateFollowUp"
;
public
static
final
String
WORK_getFollowInfo
=
WORK_HOST
+
"/kjy/oto/manager/customer/getFollowInfo"
;
public
static
final
String
WORK_getSellerPlanCalendarList
=
WORK_HOST
+
"/kjy/oto/manager/customer/getSellerPlanCalendarList"
;
public
static
final
String
WORK_getDirectorPlanCalendarList
=
WORK_HOST
+
"/kjy/oto/manager/customer/getDirectorPlanCalendarList"
;
public
static
final
String
WORK_getPlanDetail
=
WORK_HOST
+
"/kjy/oto/manager/customer/getPlanDetail"
;
public
static
final
String
WORK_getPlanList
=
WORK_HOST
+
"/kjy/oto/manager/customer/getPlanList"
;
public
static
final
String
WORK_callSubmit
=
WORK_HOST
+
"/kjy/oto/manager/customer/call/cust/info/submit"
;
//*************************客集集营销平台******************************
public
static
final
String
PHONE_bindWxUser
=
HOST
+
"/kjy/oto/interview/bindWxUser"
;
...
...
@@ -265,7 +275,7 @@ public class BasicConfig {
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_delPubFormRecord
=
WORK_HOST
+
"/kjy/oto/auto/test/delPubFormRecord"
;
public
static
final
String
CALL_BACK_1
=
WORK_HOST
+
"/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo=
18248405155&CalledNo=
"
;
public
static
final
String
CALL_BACK_1
=
WORK_HOST
+
"/kjy/oto/notify/record?CallSheetID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallID=e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd&CallType=dialout&CallNo="
;
public
static
final
String
CALL_BACK_2
=
"&Ring=2022-11-07%2013:57:06&RingingTime=&Begin=2022-11-07%2013:57:14&End=2022-11-07%2013:57:28&CallTimeLength="
;
public
static
final
String
CALL_BACK_3
=
"&MonitorFilename=http://work-phone-record.oss-cn-beijing.aliyuncs.com/20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&RecordFile=20221103/20221103135706_16621273912_136****3947_e7b4efe0-e7bc-4fc1-9ce8-d7655dccc8cd.mp3&FileServer=http://work-phone-record.oss-cn-beijing.aliyuncs.com/&ring=2022-11-07%2013:57:06"
;
...
...
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