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
e31773e6
Commit
e31773e6
authored
Oct 21, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新总监盘点的header接口
parent
b8230480
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
30 deletions
+39
-30
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+27
-27
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+11
-2
NetworkUtils.java
src/test/java/com/oto/utils/NetworkUtils.java
+1
-1
No files found.
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
e31773e6
...
@@ -118,26 +118,26 @@ public class Manager implements Authorization {
...
@@ -118,26 +118,26 @@ public class Manager implements Authorization {
int
size
=
response
.
jsonPath
().
getInt
(
"data.size"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.size"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_channelList
,
"渠道列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_channelList
,
"渠道列表为空"
,
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("sellerName", "勿动-自动化邀约");
params
.
put
(
"sellerName"
,
"勿动-自动化邀约"
);
//
params.put("phoneNumber", "18248405155");
params
.
put
(
"phoneNumber"
,
"18248405155"
);
//
params.put("roleType", 1);
params
.
put
(
"roleType"
,
1
);
//
params.put("callPermission", 1);
params
.
put
(
"callPermission"
,
1
);
//
params.put("sellerStatus", 1);
params
.
put
(
"sellerStatus"
,
1
);
//
params.put("companyIds", new int[]{5});
params
.
put
(
"companyIds"
,
new
int
[]{
5
});
//
params.put("roles", new int[]{5});
params
.
put
(
"roles"
,
new
int
[]{
5
});
//
params.put("sellerLevel", 1);
params
.
put
(
"sellerLevel"
,
1
);
//
params.put("workStatus", 1);
params
.
put
(
"workStatus"
,
1
);
//
params.put("assignNewCustPermission", 1);
params
.
put
(
"assignNewCustPermission"
,
1
);
//
params.put("assignRecycleCustPermission", 1);
params
.
put
(
"assignRecycleCustPermission"
,
1
);
//
Response response = network.postResponse(params, BasicConfig.MANAGER_oto_saveSeller);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
);
//
boolean success = response.jsonPath().getBoolean("success");
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
//
Assert.assertFalse(success,network.message(params,BasicConfig.MANAGER_oto_saveSeller,"新增同一手机号销售成功",response.body().asString()));
Assert
.
assertFalse
(
success
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_saveSeller
,
"新增同一手机号销售成功"
,
response
.
body
().
asString
()));
//
}
}
//
//
//
@Test
(
description
=
"公域引流_填写表单"
,
priority
=
6
)
@Test
(
description
=
"公域引流_填写表单"
,
priority
=
6
)
public
void
公域引流
_
填写表单
(){
public
void
公域引流
_
填写表单
(){
...
@@ -145,7 +145,7 @@ public class Manager implements Authorization {
...
@@ -145,7 +145,7 @@ public class Manager implements Authorization {
PubForm
(
"1513636130"
+
i
,
"自动化测试用户"
+
i
);
PubForm
(
"1513636130"
+
i
,
"自动化测试用户"
+
i
);
}
}
// for(int i =
30;i<5
0;i++){
// for(int i =
10;i<2
0;i++){
// HashMap<String,Object> params = new HashMap<>();
// HashMap<String,Object> params = new HashMap<>();
// params.put("formId", "Kj22MTU5MQ");
// params.put("formId", "Kj22MTU5MQ");
// params.put("phoneNum", "130112100"+i);
// params.put("phoneNum", "130112100"+i);
...
@@ -220,12 +220,12 @@ public class Manager implements Authorization {
...
@@ -220,12 +220,12 @@ public class Manager implements Authorization {
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_listAllCompany
,
"查看所有公司列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_listAllCompany
,
"查看所有公司列表为空"
,
response
.
body
().
asString
()));
}
}
//
@Test(description = "查看所有总监列表",priority = 11)
@Test
(
description
=
"查看所有总监列表"
,
priority
=
11
)
//
public void 查看所有总监列表(){
public
void
查看所有总监列表
(){
//
Response response = network.getResponse(BasicConfig.MANAGER_oto_directorList);
Response
response
=
network
.
getResponse
(
BasicConfig
.
MANAGER_oto_directorList
);
//
int size = response.jsonPath().getInt("data.list.size()");
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
//
Assert.assertTrue(size>0,network.message(BasicConfig.MANAGER_oto_directorList,"查看所有总监列表为空",response.body().asString()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
BasicConfig
.
MANAGER_oto_directorList
,
"查看所有总监列表为空"
,
response
.
body
().
asString
()));
//
}
}
@Test
(
description
=
"修改工作状态为请假中"
,
priority
=
12
)
@Test
(
description
=
"修改工作状态为请假中"
,
priority
=
12
)
public
void
修改工作状态为请假中
(){
public
void
修改工作状态为请假中
(){
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
e31773e6
...
@@ -208,9 +208,18 @@ public class Work implements Authorization {
...
@@ -208,9 +208,18 @@ public class Work implements Authorization {
public
void
查询新客户头部信息
(){
public
void
查询新客户头部信息
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"type"
,
1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_header
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
int
allCallTimes
=
response
.
jsonPath
().
getInt
(
"data.allCallTimes"
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"头部信息为空"
,
response
.
body
().
asString
()));
int
allCallTime
=
response
.
jsonPath
().
getInt
(
"data.allCallTime"
);
int
callTimes
=
response
.
jsonPath
().
getInt
(
"data.callTimes"
);
int
custStar
=
response
.
jsonPath
().
getInt
(
"data.custStar"
);
int
addWxStatus
=
response
.
jsonPath
().
getInt
(
"data.custStar"
);
Assert
.
assertEquals
(
allCallTimes
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"总通话次数非0"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
allCallTime
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"总call次数非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
(
addWxStatus
,
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_header
,
"客户的加微状态不是未添加"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查询新客户详细信息"
,
priority
=
16
)
@Test
(
description
=
"查询新客户详细信息"
,
priority
=
16
)
...
...
src/test/java/com/oto/utils/NetworkUtils.java
View file @
e31773e6
...
@@ -27,7 +27,7 @@ public class NetworkUtils {
...
@@ -27,7 +27,7 @@ public class NetworkUtils {
//cookies中的tku
//cookies中的tku
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
agentCookies
.
put
(
"tku"
,
AGENT_TKU
);
//多场景测试标志
//多场景测试标志
agentCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-3
395
"
);
agentCookies
.
put
(
"_duibaServiceGroupKey"
,
"miria-3
401
"
);
//json类型的headers
//json类型的headers
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
agentHeaders
.
put
(
"Content-Type"
,
"application/json"
);
//二进制文件的headers
//二进制文件的headers
...
...
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