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
093b723d
Commit
093b723d
authored
Nov 09, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邀约任务的接口用例
parent
fd56f23c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
11 deletions
+39
-11
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+38
-10
BasicConfig.java
src/test/java/com/oto/config/BasicConfig.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Work.java
View file @
093b723d
...
@@ -212,13 +212,13 @@ public class Work implements Authorization {
...
@@ -212,13 +212,13 @@ public class Work implements Authorization {
int
allCallTime
=
response
.
jsonPath
().
getInt
(
"data.allCallTime"
);
int
allCallTime
=
response
.
jsonPath
().
getInt
(
"data.allCallTime"
);
int
callTimes
=
response
.
jsonPath
().
getInt
(
"data.callTimes"
);
int
callTimes
=
response
.
jsonPath
().
getInt
(
"data.callTimes"
);
int
custStar
=
response
.
jsonPath
().
getInt
(
"data.custStar"
);
int
custStar
=
response
.
jsonPath
().
getInt
(
"data.custStar"
);
int
addWxStatus
=
response
.
jsonPath
().
getInt
(
"data.
custStar
"
);
int
addWxStatus
=
response
.
jsonPath
().
getInt
(
"data.
addWxStatus
"
);
String
custHead
=
response
.
jsonPath
().
getString
(
"data.custHead"
);
String
custHead
=
response
.
jsonPath
().
getString
(
"data.custHead"
);
String
custDescription
=
response
.
jsonPath
().
getString
(
"data.custDescription"
);
String
custDescription
=
response
.
jsonPath
().
getString
(
"data.custDescription"
);
String
expertRemark
=
response
.
jsonPath
().
getString
(
"data.expertRemark"
);
String
expertRemark
=
response
.
jsonPath
().
getString
(
"data.expertRemark"
);
Assert
.
assertEquals
(
allCallTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总
通话
次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总
call
次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTime
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总
call次数
非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTime
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总
通话时间
非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话
时间
非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话
次数
非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStar
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户星标不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custStar
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户星标不为否"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
addWxStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户的加微状态不是未添加"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
addWxStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户的加微状态不是未添加"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custHead
,
"https://yun.kjjcrm.com/kjy/media/file/20221018/c9c37c521ddfd949614f1b78b92a1001.png?x-oss-process=image/quality,q_80"
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户头像非默认头像"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custHead
,
"https://yun.kjjcrm.com/kjy/media/file/20221018/c9c37c521ddfd949614f1b78b92a1001.png?x-oss-process=image/quality,q_80"
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户头像非默认头像"
,
response
.
body
().
asString
()));
...
@@ -1482,10 +1482,10 @@ public class Work implements Authorization {
...
@@ -1482,10 +1482,10 @@ public class Work implements Authorization {
public
void
邀约完成任务
(){
public
void
邀约完成任务
(){
otoInviterAuth
();
otoInviterAuth
();
//notDeal -未接通,dealing-已接通
//notDeal -未接通,dealing-已接通
callling
(
"15136361301"
,
"notDeal"
);
callling
(
"15136361301"
,
0
,
"notDeal"
);
callling
(
"15136361301"
,
"notDeal"
);
callling
(
"15136361301"
,
0
,
"notDeal"
);
callling
(
"15136361302"
,
"notDeal"
);
callling
(
"15136361302"
,
0
,
"notDeal"
);
callling
(
"15136361303"
,
"dealing"
);
callling
(
"15136361303"
,
30
,
"dealing"
);
//销售完成面访,跟进时间更新,联系新客户任务完成
//销售完成面访,跟进时间更新,联系新客户任务完成
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"taskConfId"
,
7
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
params
.
put
(
"taskConfId"
,
7
);
//任务配置id,4:联系未跟进的客户,5:复拨未接通的客户,6:超过N天未跟进的客户
...
@@ -1496,6 +1496,34 @@ public class Work implements Authorization {
...
@@ -1496,6 +1496,34 @@ public class Work implements Authorization {
Assert
.
assertEquals
(
finishCustNum
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskList
,
"已完成数量记录错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
finishCustNum
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_taskList
,
"已完成数量记录错误"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"校验邀约的通话信息"
,
priority
=
14
)
public
void
校验邀约的通话信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"type"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
int
allCallTimes
=
response
.
jsonPath
().
getInt
(
"data.allCallTimes"
);
int
allCallTime
=
response
.
jsonPath
().
getInt
(
"data.allCallTime"
);
int
callTimes
=
response
.
jsonPath
().
getInt
(
"data.callTimes"
);
String
lastCallTime
=
response
.
jsonPath
().
getString
(
"data.lastCallTime"
);
Assert
.
assertEquals
(
allCallTimes
,
2
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总call次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTime
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话时间非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertNull
(
lastCallTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话次数非0"
,
response
.
body
().
asString
()));
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"type"
,
1
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
allCallTimes
=
response
.
jsonPath
().
getInt
(
"data.allCallTimes"
);
allCallTime
=
response
.
jsonPath
().
getInt
(
"data.allCallTime"
);
callTimes
=
response
.
jsonPath
().
getInt
(
"data.callTimes"
);
lastCallTime
=
response
.
jsonPath
().
getString
(
"data.lastCallTime"
);
Assert
.
assertEquals
(
allCallTimes
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总call次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTime
,
30
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话时间非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
callTimes
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
lastCallTime
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"新客户总通话次数非0"
,
response
.
body
().
asString
()));
}
//修改客户的约面情况
//修改客户的约面情况
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
public
void
updateInvite
(
int
interviewFlag
,
long
time
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -1662,9 +1690,9 @@ public class Work implements Authorization {
...
@@ -1662,9 +1690,9 @@ public class Work implements Authorization {
}
}
}
}
public
void
callling
(
String
custPhone
,
String
callState
){
public
void
callling
(
String
custPhone
,
int
length
,
String
callState
){
//销售完成面访,跟进时间更新,联系新客户任务完成
//销售完成面访,跟进时间更新,联系新客户任务完成
String
CALL_URL
=
CALL_BACK_1
+
custPhone
+
CALL_BACK_2
+
callState
+
CALL_BACK_3
;
String
CALL_URL
=
CALL_BACK_1
+
custPhone
+
CALL_BACK_2
+
length
+
"&State="
+
callState
+
CALL_BACK_3
;
Response
response
=
network
.
getResponse
(
CALL_URL
);
Response
response
=
network
.
getResponse
(
CALL_URL
);
}
}
...
...
src/test/java/com/oto/config/BasicConfig.java
View file @
093b723d
...
@@ -256,7 +256,7 @@ public class BasicConfig {
...
@@ -256,7 +256,7 @@ public class BasicConfig {
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"
;
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=18248405155&CalledNo="
;
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=
0&State=
"
;
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"
;
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