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
dfd9db78
Commit
dfd9db78
authored
Apr 16, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
bd96bb49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
OpenLive.java
src/test/java/com/kjj/cases/live/anchor/OpenLive.java
+1
-1
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+16
-9
No files found.
src/test/java/com/kjj/cases/live/anchor/OpenLive.java
View file @
dfd9db78
...
...
@@ -35,7 +35,7 @@ public class OpenLive implements AdminAuthorization {
Object
data
=
openRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
openParam
,
BasicConfig
.
ANCHOR_OPEN
,
"开启直播失败"
,
openRes
.
body
().
asString
()));
ThreadSleepUtils
.
sleep
(
10
000
);
ThreadSleepUtils
.
sleep
(
5
000
);
}
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
dfd9db78
...
...
@@ -288,10 +288,13 @@ public class Lottery implements AdminAuthorization {
Map
<
String
,
Object
>
luckDetailParam
=
new
HashMap
<>();
luckDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
luckDetailRes
=
network
.
getResponse
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
);
Object
data
=
luckDetailRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
,
"查询中奖任务失败"
,
luckDetailRes
.
body
().
asString
()));
try
{
Boolean
hasDrawTask
=
luckDetailRes
.
jsonPath
().
getBoolean
(
"data.hasDrawTask"
);
Assert
.
assertTrue
(
hasDrawTask
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
USER_result
,
"查询中奖任务失败"
,
luckDetailRes
.
body
().
asString
()));
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"result = "
+
JSON
.
toJSONString
(
luckDetailRes
.
jsonPath
().
get
()));
throw
e
;
}
}
@Test
(
description
=
"访客A中奖任务_分享直播间"
,
priority
=
21
)
...
...
@@ -428,7 +431,7 @@ public class Lottery implements AdminAuthorization {
break
;
}
}
Assert
.
assert
NotNull
(
result
,
network
.
message
(
myLotteryCodeParam
,
BasicConfig
.
MOBILE_MyLotteryCode
,
"查询访客A抽奖券列表失败"
,
myLotteryCodeRes
.
body
().
asString
()));
Assert
.
assert
True
(
result
,
network
.
message
(
myLotteryCodeParam
,
BasicConfig
.
MOBILE_MyLotteryCode
,
"查询访客A抽奖券列表失败"
,
myLotteryCodeRes
.
body
().
asString
()));
}
@Test
(
description
=
"访客A抽奖码数量"
,
priority
=
31
)
...
...
@@ -451,9 +454,13 @@ public class Lottery implements AdminAuthorization {
Map
<
String
,
Object
>
luckDetailParam
=
new
HashMap
<>();
luckDetailParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
luckDetailRes
=
network
.
getResponse
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
);
Object
data
=
luckDetailRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
ANCHOR_luckDetail
,
"查询中奖任务失败"
,
luckDetailRes
.
body
().
asString
()));
try
{
Boolean
hasLuckTask
=
luckDetailRes
.
jsonPath
().
getBoolean
(
"data.hasLuckTask"
);
Assert
.
assertTrue
(
hasLuckTask
,
network
.
message
(
luckDetailParam
,
BasicConfig
.
USER_result
,
"查询任务失败"
,
luckDetailRes
.
body
().
asString
()));
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"result = "
+
JSON
.
toJSONString
(
luckDetailRes
.
jsonPath
().
get
()));
throw
e
;
}
}
...
...
@@ -609,7 +616,7 @@ public class Lottery implements AdminAuthorization {
@Test
(
description
=
"访客B的抽奖券列表"
,
priority
=
44
)
public
void
访客
B
的抽奖券列表
()
{
visitorAuth2
();
ThreadSleepUtils
.
sleep
(
10
000
);
ThreadSleepUtils
.
sleep
(
3
000
);
Map
<
String
,
Object
>
myLotteryCodeParam
=
new
HashMap
<>();
myLotteryCodeParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
myLotteryCodeParam
.
put
(
"pageIndex"
,
1
);
...
...
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