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
4c1c2638
Commit
4c1c2638
authored
May 11, 2022
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加OTO销售工作台移动端1.1的测试用例
parent
7afafbb8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
Work.java
src/test/java/com/kjj/cases/otoseller/Work.java
+4
-6
No files found.
src/test/java/com/kjj/cases/otoseller/Work.java
View file @
4c1c2638
...
@@ -8,7 +8,6 @@ import org.testng.Assert;
...
@@ -8,7 +8,6 @@ import org.testng.Assert;
import
org.testng.annotations.BeforeTest
;
import
org.testng.annotations.BeforeTest
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -23,7 +22,6 @@ public class Work implements Authorization {
...
@@ -23,7 +22,6 @@ public class Work implements Authorization {
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
public
int
tagId
;
//标签ID
public
int
tagId
;
//标签ID
public
int
custId
;
//客户ID
public
int
custId
;
//客户ID
public
int
collectCustId
=
2801
;
//客户ID
public
String
phone
;
//客户手机号
public
String
phone
;
//客户手机号
public
int
followTimes
;
//跟进次数
public
int
followTimes
;
//跟进次数
public
static
Map
<
String
,
Integer
>
header
;
public
static
Map
<
String
,
Integer
>
header
;
...
@@ -512,7 +510,7 @@ public class Work implements Authorization {
...
@@ -512,7 +510,7 @@ public class Work implements Authorization {
@Test
(
description
=
"放弃客户进入回收池"
,
priority
=
48
)
@Test
(
description
=
"放弃客户进入回收池"
,
priority
=
48
)
public
void
放弃客户进入回收池
(){
public
void
放弃客户进入回收池
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
c
ollectC
ustId
);
params
.
put
(
"custId"
,
custId
);
params
.
put
(
"abandonReasonType"
,
3
);
params
.
put
(
"abandonReasonType"
,
3
);
params
.
put
(
"abandonRemark"
,
"放弃原因"
+
new
Date
());
params
.
put
(
"abandonRemark"
,
"放弃原因"
+
new
Date
());
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_abandonCust
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_abandonCust
);
...
@@ -545,7 +543,7 @@ public class Work implements Authorization {
...
@@ -545,7 +543,7 @@ public class Work implements Authorization {
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_recycleList
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_recycleList
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_recycleList
,
"查看回收池客户列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
BasicConfig
.
WORK_recycleList
,
"查看回收池客户列表为空"
,
response
.
body
().
asString
()));
int
result
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.custId == "
+
c
ollectC
ustId
+
"}.size()"
);
int
result
=
response
.
jsonPath
().
getInt
(
"data.list.findAll{it.custId == "
+
custId
+
"}.size()"
);
Assert
.
assertEquals
(
result
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_recycleList
,
"回收池客户列表不包含刚刚的回收客户"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
result
,
1
,
network
.
message
(
params
,
BasicConfig
.
WORK_recycleList
,
"回收池客户列表不包含刚刚的回收客户"
,
response
.
body
().
asString
()));
}
}
...
@@ -553,7 +551,7 @@ public class Work implements Authorization {
...
@@ -553,7 +551,7 @@ public class Work implements Authorization {
public
void
认领回收池客户
(){
public
void
认领回收池客户
(){
sleep
(
2000
);
sleep
(
2000
);
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
c
ollectC
ustId
);
params
.
put
(
"custId"
,
custId
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_claim
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_claim
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_claim
,
"删除客户失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_claim
,
"删除客户失败"
,
response
.
body
().
asString
()));
...
@@ -571,7 +569,7 @@ public class Work implements Authorization {
...
@@ -571,7 +569,7 @@ public class Work implements Authorization {
@Test
(
description
=
"查询认领客户评价清空"
,
priority
=
54
)
@Test
(
description
=
"查询认领客户评价清空"
,
priority
=
54
)
public
void
查询认领客户评价清空
(){
public
void
查询认领客户评价清空
(){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"custId"
,
c
ollectC
ustId
);
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
custValue
=
response
.
jsonPath
().
getJsonObject
(
"data.custValue"
);
Object
followWeight
=
response
.
jsonPath
().
getJsonObject
(
"data.followWeight"
);
Object
followWeight
=
response
.
jsonPath
().
getJsonObject
(
"data.followWeight"
);
...
...
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