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
105a8a32
Commit
105a8a32
authored
Apr 25, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加服务专家的测试用例
parent
1c89fbb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
Activity.java
src/test/java/com/oto/cases/otoseller/Activity.java
+16
-16
No files found.
src/test/java/com/oto/cases/otoseller/Activity.java
View file @
105a8a32
...
@@ -276,7 +276,7 @@ public class Activity implements Authorization {
...
@@ -276,7 +276,7 @@ public class Activity implements Authorization {
params
.
put
(
"date"
,
today
);
params
.
put
(
"date"
,
today
);
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
));
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
3
));
params
.
put
(
"configId"
,
440
);
params
.
put
(
"configId"
,
440
);
params
.
put
(
"status"
,
1
);
params
.
put
(
"status"
,
0
);
params
.
put
(
"timeInterval"
,
"am"
);
params
.
put
(
"timeInterval"
,
"am"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_checkSign
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_checkSign
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -368,7 +368,7 @@ public class Activity implements Authorization {
...
@@ -368,7 +368,7 @@ public class Activity implements Authorization {
Assert
.
assertEquals
(
submitStatus2
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售非【未提报】状态"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
submitStatus2
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售非【未提报】状态"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics1
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"专家的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics1
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"专家的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics2
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
configStatistics2
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的见面总数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custCount
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的签到数不为
0
"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
custCount
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_leaderList
,
"销售的签到数不为
2
"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"总监查看专家今日签到活动情况"
,
priority
=
21
)
@Test
(
description
=
"总监查看专家今日签到活动情况"
,
priority
=
21
)
...
@@ -387,7 +387,7 @@ public class Activity implements Authorization {
...
@@ -387,7 +387,7 @@ public class Activity implements Authorization {
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus1
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户2\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
int
signStatus2
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户3\")}.signStatus"
);
int
signStatus3
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus"
);
int
signStatus3
=
response
.
jsonPath
().
getInt
(
"data.list[0].custList.find{it.custName.equals(\"自动化测试用户4\")}.signStatus"
);
Assert
.
assertEquals
(
signStatus0
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已到场的签到状态非【已到场
】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus0
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已到场的签到状态非【已签到
】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus1
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已鸽的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus2
,
2
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【已签到】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus3
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【未到场】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
signStatus3
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_submitRecordDetail
,
"已签到的签到状态非【未到场】"
,
response
.
body
().
asString
()));
...
@@ -447,7 +447,7 @@ public class Activity implements Authorization {
...
@@ -447,7 +447,7 @@ public class Activity implements Authorization {
@Test
(
description
=
"查看客户报名页"
,
priority
=
26
)
@Test
(
description
=
"查看客户报名页"
,
priority
=
26
)
public
void
查看客户报名页
(){
public
void
查看客户报名页
(){
WXCustomerTku5
();
WXCustomerTku5
();
Response
response
=
network
.
ge
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
Response
response
=
network
.
pos
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
Assert
.
assertEquals
(
showType
,
1
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【报名页】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
showType
,
1
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【报名页】"
,
response
.
body
().
asString
()));
...
@@ -460,7 +460,7 @@ public class Activity implements Authorization {
...
@@ -460,7 +460,7 @@ public class Activity implements Authorization {
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_sign
,
"客户公众号报名失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_sign
,
"客户公众号报名失败"
,
response
.
body
().
asString
()));
response
=
network
.
ge
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
response
=
network
.
pos
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
boolean
sign
=
response
.
jsonPath
().
getBoolean
(
"data.sign"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
Assert
.
assertEquals
(
showType
,
1
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【报名页】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
showType
,
1
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【报名页】"
,
response
.
body
().
asString
()));
...
@@ -470,7 +470,7 @@ public class Activity implements Authorization {
...
@@ -470,7 +470,7 @@ public class Activity implements Authorization {
@Test
(
description
=
"查看客户中间页"
,
priority
=
28
)
@Test
(
description
=
"查看客户中间页"
,
priority
=
28
)
public
void
查看客户中间页
(){
public
void
查看客户中间页
(){
WXCustomerTku2
();
WXCustomerTku2
();
Response
response
=
network
.
ge
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
Response
response
=
network
.
pos
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
Assert
.
assertEquals
(
showType
,
2
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【中间页】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
showType
,
2
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【中间页】"
,
response
.
body
().
asString
()));
}
}
...
@@ -478,7 +478,7 @@ public class Activity implements Authorization {
...
@@ -478,7 +478,7 @@ public class Activity implements Authorization {
@Test
(
description
=
"查看客户服务专家"
,
priority
=
29
)
@Test
(
description
=
"查看客户服务专家"
,
priority
=
29
)
public
void
查看客户服务专家
(){
public
void
查看客户服务专家
(){
WXCustomerTku3
();
WXCustomerTku3
();
Response
response
=
network
.
ge
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
Response
response
=
network
.
pos
tResponse
(
BasicConfig
.
WX_serviceExpert_detail
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
int
showType
=
response
.
jsonPath
().
getInt
(
"data.showType"
);
String
expertConfigUrl
=
response
.
jsonPath
().
getString
(
"data.expertConfigUrl"
);
String
expertConfigUrl
=
response
.
jsonPath
().
getString
(
"data.expertConfigUrl"
);
Assert
.
assertEquals
(
showType
,
3
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【专家页】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
showType
,
3
,
network
.
message
(
BasicConfig
.
WX_serviceExpert_detail
,
"展示页面非【专家页】"
,
response
.
body
().
asString
()));
...
@@ -490,9 +490,9 @@ public class Activity implements Authorization {
...
@@ -490,9 +490,9 @@ public class Activity implements Authorization {
WXLeaderTku
();
WXLeaderTku
();
Response
response
=
network
.
getResponse
(
BasicConfig
.
WX_info
);
Response
response
=
network
.
getResponse
(
BasicConfig
.
WX_info
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.roles.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.roles.size()"
);
boolean
isShowSignDetailButton
=
response
.
jsonPath
().
getBoolean
(
"data.isS
howSignDetailButton"
);
boolean
showSignDetailButton
=
response
.
jsonPath
().
getBoolean
(
"data.s
howSignDetailButton"
);
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WX_info
,
"登录人角色数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
2
,
network
.
message
(
BasicConfig
.
WX_info
,
"登录人角色数错误"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
isS
howSignDetailButton
,
network
.
message
(
BasicConfig
.
WX_info
,
"总监不可见签到详情"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
s
howSignDetailButton
,
network
.
message
(
BasicConfig
.
WX_info
,
"总监不可见签到详情"
,
response
.
body
().
asString
()));
}
}
@Test
(
description
=
"查看签到列表"
,
priority
=
31
)
@Test
(
description
=
"查看签到列表"
,
priority
=
31
)
...
@@ -505,8 +505,8 @@ public class Activity implements Authorization {
...
@@ -505,8 +505,8 @@ public class Activity implements Authorization {
int
shouldSignNum
=
response
.
jsonPath
().
getInt
(
"data.shouldSignNum"
);
int
shouldSignNum
=
response
.
jsonPath
().
getInt
(
"data.shouldSignNum"
);
int
notSignNum
=
response
.
jsonPath
().
getInt
(
"data.notSignNum"
);
int
notSignNum
=
response
.
jsonPath
().
getInt
(
"data.notSignNum"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.vos.size()"
);
int
size
=
response
.
jsonPath
().
getInt
(
"data.vos.size()"
);
int
isSign1
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.
custN
ame.equals(\"自动化测试用户0\")}.isSign"
);
int
isSign1
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.
n
ame.equals(\"自动化测试用户0\")}.isSign"
);
int
isSign2
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.
custN
ame.equals(\"自动化测试用户2\")}.isSign"
);
int
isSign2
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.
n
ame.equals(\"自动化测试用户2\")}.isSign"
);
Assert
.
assertEquals
(
shouldSignNum
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"应签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
shouldSignNum
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"应签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
notSignNum
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"未签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
notSignNum
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"未签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"签到列表人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
size
,
3
,
network
.
message
(
params
,
BasicConfig
.
WX_sign_list
,
"签到列表人数错误"
,
response
.
body
().
asString
()));
...
@@ -519,20 +519,20 @@ public class Activity implements Authorization {
...
@@ -519,20 +519,20 @@ public class Activity implements Authorization {
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
-
1
));
params
.
put
(
"activityId"
,
IdMakeUtil
.
encodingId
((
long
)
acitityId
-
1
));
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
1
));
params
.
put
(
"custId"
,
IdMakeUtil
.
encodingId
((
long
)
cust_id
+
1
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_s
aveIntroduce
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_s
ign_complement
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_s
ubmitRecord
,
"补签失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WX_s
ign_complement
,
"补签失败"
,
response
.
body
().
asString
()));
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_sign_list
);
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WX_sign_list
);
int
notSignNum
=
response
.
jsonPath
().
getInt
(
"data.notSignNum"
);
int
notSignNum
=
response
.
jsonPath
().
getInt
(
"data.notSignNum"
);
int
isSign
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.custName.equals(\"自动化测试用户2\")}.isSign"
);
int
isSign
=
response
.
jsonPath
().
getInt
(
"data.vos.find{it.custName.equals(\"自动化测试用户2\")}.isSign"
);
Assert
.
assertEquals
(
notSignNum
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_s
aveIntroduce
,
"未签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
notSignNum
,
0
,
network
.
message
(
params
,
BasicConfig
.
WX_s
ign_list
,
"未签到人数错误"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
isSign
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_s
aveIntroduce
,
"已分配客户的签到非【是】"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
isSign
,
1
,
network
.
message
(
params
,
BasicConfig
.
WX_s
ign_list
,
"已分配客户的签到非【是】"
,
response
.
body
().
asString
()));
}
}
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
public
void
sellerSubmitRecord
(
int
status
,
int
count
){
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"
custName
"
,
1
);
params
.
put
(
"
pageIndex
"
,
1
);
params
.
put
(
"pagesize"
,
20
);
params
.
put
(
"pagesize"
,
20
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WX_sellerSubmitRecordList
);
int
submitStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitStatus"
);
int
submitStatus
=
response
.
jsonPath
().
getInt
(
"data.list[0].submitStatus"
);
...
...
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