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
effbddbd
Commit
effbddbd
authored
Aug 03, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邀请函、测评首页、设置中心、使用攻略的测试用例
parent
6683a357
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
36 deletions
+4
-36
InvitationLetter.java
...com/kjj/cases/assistant/markettools/InvitationLetter.java
+4
-36
No files found.
src/test/java/com/kjj/cases/assistant/markettools/InvitationLetter.java
View file @
effbddbd
...
@@ -20,7 +20,6 @@ public class InvitationLetter implements Authorization{
...
@@ -20,7 +20,6 @@ public class InvitationLetter implements Authorization{
public
String
posterConfId
;
// 海报邀请函配置的confId
public
String
posterConfId
;
// 海报邀请函配置的confId
public
String
posterScid
;
// 海报对应的scid
public
String
posterScid
;
// 海报对应的scid
public
String
forwardTime
;
// 动画转发时间
public
String
forwardTime
;
// 动画转发时间
public
int
listSize
;
// 动画转发时间
@BeforeClass
@BeforeClass
public
void
setUp
(){
public
void
setUp
(){
agentTku
();
agentTku
();
...
@@ -66,18 +65,6 @@ public class InvitationLetter implements Authorization{
...
@@ -66,18 +65,6 @@ public class InvitationLetter implements Authorization{
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
INViTATION_index
,
"贺卡列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
INViTATION_index
,
"贺卡列表为空"
,
response
.
body
().
asString
()));
posterInvitationId
=
response
.
jsonPath
().
getString
(
"data.list.find{ it.invitationType == 1}.contentId"
);
posterInvitationId
=
response
.
jsonPath
().
getString
(
"data.list.find{ it.invitationType == 1}.contentId"
);
animationInvitationId
=
response
.
jsonPath
().
getString
(
"data.list.find{ it.invitationType == 2}.contentId"
);
animationInvitationId
=
response
.
jsonPath
().
getString
(
"data.list.find{ it.invitationType == 2}.contentId"
);
params
.
clear
();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
20
);
response
=
network
.
getResponse
(
params
,
INViTATION_myInvitationLetters
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
listSize
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"发送邀请函列表为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"代理人_获取动画邀请函详情页"
,
priority
=
4
)
@Test
(
description
=
"代理人_获取动画邀请函详情页"
,
priority
=
4
)
...
@@ -326,17 +313,6 @@ public class InvitationLetter implements Authorization{
...
@@ -326,17 +313,6 @@ public class InvitationLetter implements Authorization{
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
CONTENT_READ
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
CONTENT_READ
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
CONTENT_READ
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
CONTENT_READ
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"scid"
,
posterScid
);
params
.
put
(
"forwardTime"
,
forwardTime
);
System
.
out
.
println
(
params
.
toString
());
response
=
network
.
postResponse
(
params
,
DYNAMIC_addVisit
);
System
.
out
.
println
(
response
.
body
().
asString
());
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
result
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
clear
();
params
.
put
(
"confId"
,
posterConfId
);
params
.
put
(
"confId"
,
posterConfId
);
response
=
network
.
getResponse
(
params
,
INViTATION_view
);
response
=
network
.
getResponse
(
params
,
INViTATION_view
);
...
@@ -353,19 +329,11 @@ public class InvitationLetter implements Authorization{
...
@@ -353,19 +329,11 @@ public class InvitationLetter implements Authorization{
//切换为访客
//切换为访客
userTku
();
userTku
();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"scid"
,
posterScid
);
params
.
put
(
"forwardTime"
,
forwardTime
);
Response
response
=
network
.
postResponse
(
params
,
DYNAMIC_addVisit
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"scid"
,
posterScid
);
params
.
put
(
"scid"
,
posterScid
);
params
.
put
(
"bizNo"
,
posterConfId
);
params
.
put
(
"bizNo"
,
posterConfId
);
response
=
network
.
getResponse
(
params
,
CONTENT_READ
);
Response
response
=
network
.
getResponse
(
params
,
CONTENT_READ
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
CONTENT_READ
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
CONTENT_READ
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
CONTENT_READ
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
CONTENT_READ
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
...
@@ -376,7 +344,7 @@ public class InvitationLetter implements Authorization{
...
@@ -376,7 +344,7 @@ public class InvitationLetter implements Authorization{
params
.
put
(
"visitorPhone"
,
"13598765432"
);
params
.
put
(
"visitorPhone"
,
"13598765432"
);
response
=
network
.
postResponse
(
params
,
INViTATION_acceptInvitation
);
response
=
network
.
postResponse
(
params
,
INViTATION_acceptInvitation
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
result
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
INViTATION_acceptInvitation
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
INViTATION_acceptInvitation
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
INViTATION_acceptInvitation
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
result
,
network
.
message
(
params
,
INViTATION_acceptInvitation
,
"获取访问动画邀请函记录失败"
,
response
.
body
().
asString
()));
}
}
...
@@ -394,7 +362,7 @@ public class InvitationLetter implements Authorization{
...
@@ -394,7 +362,7 @@ public class InvitationLetter implements Authorization{
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assert
Equals
(
size
,
listSize
+
2
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"发送邀请函列表为空"
,
response
.
body
().
asString
()));
Assert
.
assert
True
(
size
>
0
,
network
.
message
(
params
,
INViTATION_myInvitationLetters
,
"发送邀请函列表为空"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"代理人_查看动画邀请函详情"
,
priority
=
18
)
@Test
(
description
=
"代理人_查看动画邀请函详情"
,
priority
=
18
)
...
...
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