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
4f800dca
Commit
4f800dca
authored
Oct 15, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改客户数量、视频列表数量校验并增加秒杀资格字段
parent
c66024ac
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
8 deletions
+19
-8
HomePage.java
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
+5
-4
GameLottery.java
...java/com/kjj/cases/assistant/markettools/GameLottery.java
+1
-1
Answer.java
src/test/java/com/kjj/cases/live/answer/Answer.java
+0
-2
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+1
-1
ConfSecondKill.java
...st/java/com/kjj/cases/live/secondKill/ConfSecondKill.java
+7
-0
SecondKill.java
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
+5
-0
No files found.
src/test/java/com/kjj/cases/assistant/homePage/HomePage.java
View file @
4f800dca
...
...
@@ -38,6 +38,7 @@ public class HomePage implements Authorization {
public
String
visitId
;
//用户的visitId
public
String
activityScid
;
//测评对应的scid
public
long
articleId
;
//解密后的的文章id
public
int
totalCount
;
//视频数量
@BeforeClass
public
void
setUp
()
{
...
...
@@ -289,8 +290,8 @@ public class HomePage implements Authorization {
params
.
put
(
"secondTagId"
,
724
);
//二级标签
params
.
put
(
"contentType"
,
"video"
);
Response
response
=
network
.
getResponse
(
params
,
HOME_getContentList
);
Object
obj
=
response
.
jsonPath
().
getJsonObjec
t
(
"data.totalCount"
);
Assert
.
assert
Equals
(
obj
,
3
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页视频列表失败"
,
response
.
body
().
asString
()));
totalCount
=
response
.
jsonPath
().
getIn
t
(
"data.totalCount"
);
Assert
.
assert
True
(
totalCount
>
0
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页视频列表失败"
,
response
.
body
().
asString
()));
}
//验证视频是否下架成功
...
...
@@ -313,8 +314,8 @@ public class HomePage implements Authorization {
params
.
put
(
"secondTagId"
,
724
);
params
.
put
(
"contentType"
,
"video"
);
Response
response
=
network
.
getResponse
(
params
,
HOME_getContentList
);
Object
obj
=
response
.
jsonPath
().
getJsonObjec
t
(
"data.totalCount"
);
Assert
.
assertEquals
(
obj
,
2
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页视频列表失败"
,
response
.
body
().
asString
()));
int
obj
=
response
.
jsonPath
().
getIn
t
(
"data.totalCount"
);
Assert
.
assertEquals
(
obj
,
totalCount
-
1
,
network
.
message
(
params
,
HOME_getContentList
,
"获取首页视频列表失败"
,
response
.
body
().
asString
()));
}
//管理后台新增公司专区内容
...
...
src/test/java/com/kjj/cases/assistant/markettools/GameLottery.java
View file @
4f800dca
...
...
@@ -150,7 +150,7 @@ public class GameLottery implements Authorization {
//获取客户列表
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
2
0
);
params
.
put
(
"pageSize"
,
5
0
);
params
.
put
(
"visitorNickname"
,
""
);
Response
response
=
network
.
getResponse
(
params
,
LOTTERRY_customerList
);
boolean
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
...
...
src/test/java/com/kjj/cases/live/answer/Answer.java
View file @
4f800dca
...
...
@@ -479,8 +479,6 @@ public class Answer implements Authorization {
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"quesConfId"
,
this
.
quesConfId
.
get
(
1
).
getQuesConfId
()
);
// params.put("liveId", "Kj21NTI3ODM");
// params.put("quesConfId","Kj21NzY1MTE");
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_QuesParticipateInfo
);
boolean
result
=
response
.
jsonPath
().
getBoolean
(
"data.result"
);
System
.
out
.
println
(
response
.
body
().
asString
());
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
4f800dca
...
...
@@ -1206,7 +1206,7 @@ public class Lottery implements Authorization {
Response
hasEndResB
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataB
=
getDataLottery
(
hasEndResB
);
String
responseBody
=
"A="
+
hasEndResA
.
body
().
asString
()
+
", B="
+
hasEndResB
.
body
().
asString
();
Assert
.
assertTrue
(
dataA
||
dataB
||
dataC
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"访客未中奖"
,
responseBody
));
Assert
.
assertTrue
(
dataA
&&
dataB
&&
dataC
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"访客未中奖"
,
responseBody
));
}
...
...
src/test/java/com/kjj/cases/live/secondKill/ConfSecondKill.java
View file @
4f800dca
...
...
@@ -47,6 +47,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar
.
put
(
"goodsAmount"
,
1
);
// 1 == 0.01
secKillAddPar
.
put
(
"interactNum"
,
3
);
secKillAddPar
.
put
(
"ableAgent"
,
0
);
// 代理人不可参与
secKillAddPar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
secKillAddPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
secKillAddRes
=
network
.
postResponse
(
secKillAddPar
,
BasicConfig
.
MANAGER_secondKillSave
);
try
{
...
...
@@ -65,6 +66,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar
.
put
(
"goodsAmount"
,
1
);
// 1 == 0.01
secKillAddPar
.
put
(
"interactNum"
,
3
);
secKillAddPar
.
put
(
"ableAgent"
,
0
);
secKillAddPar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
secKillAddPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
secKillAddRes
;
boolean
data
;
...
...
@@ -124,6 +126,7 @@ public class ConfSecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
1
);
secKillUpdatePar
.
put
(
"id"
,
newSecKillId
);
secKillUpdatePar
.
put
(
"ableAgent"
,
0
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
MANAGER_secondKillUpdate
);
try
{
boolean
data
=
secKillUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -188,6 +191,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar
.
put
(
"goodsAmount"
,
5
);
// 1 == 0.01
secKillAddPar
.
put
(
"interactNum"
,
3
);
secKillAddPar
.
put
(
"ableAgent"
,
0
);
// 代理人不可参与
secKillAddPar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
secKillAddPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
secKillAddRes
=
network
.
postResponse
(
secKillAddPar
,
BasicConfig
.
ANCHOR_secondKillSave
);
try
{
...
...
@@ -206,6 +210,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar
.
put
(
"goodsAmount"
,
1
);
// 1 == 0.01
secKillAddPar
.
put
(
"interactNum"
,
1
);
secKillAddPar
.
put
(
"ableAgent"
,
1
);
// 代理人可参与
secKillAddPar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
secKillAddPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
secKillAddRes
=
network
.
postResponse
(
secKillAddPar
,
BasicConfig
.
ANCHOR_secondKillSave
);
try
{
...
...
@@ -224,6 +229,7 @@ public class ConfSecondKill implements Authorization {
secKillAddPar
.
put
(
"goodsAmount"
,
0
);
// 1 == 0.01
secKillAddPar
.
put
(
"interactNum"
,
1
);
secKillAddPar
.
put
(
"ableAgent"
,
1
);
// 代理人可参与
secKillAddPar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
secKillAddPar
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
secKillAddRes
=
network
.
postResponse
(
secKillAddPar
,
BasicConfig
.
ANCHOR_secondKillSave
);
try
{
...
...
@@ -265,6 +271,7 @@ public class ConfSecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
3
);
secKillUpdatePar
.
put
(
"id"
,
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
0
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
try
{
boolean
data
=
secKillUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
...
...
src/test/java/com/kjj/cases/live/secondKill/SecondKill.java
View file @
4f800dca
...
...
@@ -39,6 +39,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
3
);
secKillUpdatePar
.
put
(
"id"
,
ConfSecondKill
.
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
1
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
System
.
out
.
println
(
secKillUpdateRes
.
body
().
asString
());
}
...
...
@@ -51,6 +52,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
3
);
secKillUpdatePar
.
put
(
"id"
,
ConfSecondKill
.
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
1
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
System
.
out
.
println
(
secKillUpdateRes
.
body
().
asString
());
}
...
...
@@ -63,6 +65,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
1
);
secKillUpdatePar
.
put
(
"id"
,
ConfSecondKill
.
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
1
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
System
.
out
.
println
(
secKillUpdateRes
.
body
().
asString
());
}
...
...
@@ -75,6 +78,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
4
);
secKillUpdatePar
.
put
(
"id"
,
ConfSecondKill
.
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
1
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
try
{
boolean
data
=
secKillUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -93,6 +97,7 @@ public class SecondKill implements Authorization {
secKillUpdatePar
.
put
(
"interactNum"
,
4
);
secKillUpdatePar
.
put
(
"id"
,
ConfSecondKill
.
skIdFirst
);
secKillUpdatePar
.
put
(
"ableAgent"
,
0
);
secKillUpdatePar
.
put
(
"isNeedQualified"
,
0
);
// 不需要秒杀资格
Response
secKillUpdateRes
=
network
.
postResponse
(
secKillUpdatePar
,
BasicConfig
.
ANCHOR_secondKillUpdate
);
try
{
boolean
data
=
secKillUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
...
...
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