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
401036fe
Commit
401036fe
authored
Aug 13, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用的变量及修改注释
parent
4ddb4993
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
268 additions
and
35 deletions
+268
-35
Material.java
src/test/java/com/kjj/bean/manager/Material.java
+14
-0
RedList.java
src/test/java/com/kjj/bean/manager/RedList.java
+1
-1
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+64
-13
TimeRed.java
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
+187
-21
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+2
-0
No files found.
src/test/java/com/kjj/bean/manager/Material.java
0 → 100644
View file @
401036fe
package
com
.
kjj
.
bean
.
manager
;
import
lombok.Data
;
@Data
public
class
Material
{
private
long
id
;
private
int
agentReceiveType
;
public
Material
(
long
l
,
int
i
)
{
this
.
id
=
l
;
this
.
agentReceiveType
=
i
;
}
}
src/test/java/com/kjj/bean/manager/RedList.java
View file @
401036fe
...
...
@@ -7,5 +7,5 @@ public class RedList {
private
Integer
id
;
private
long
bizConfId
;
private
int
taskType
;
}
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
401036fe
...
...
@@ -25,6 +25,7 @@ public class SaveLive implements Authorization {
public
String
EncodeLiveID
;
public
long
welfareConfId
;
private
Integer
taskId
;
public
List
<
RedList
>
redId
;
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
...
...
@@ -154,19 +155,19 @@ public class SaveLive implements Authorization {
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
liveID
);
List
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
355L
);
ids
.
add
(
356L
);
ids
.
add
(
357L
);
ids
.
add
(
358L
);
ids
.
add
(
359L
);
ids
.
add
(
652L
);
ids
.
add
(
960L
);
Params
.
put
(
"
ids
"
,
ids
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_
3
);
List
<
Material
>
ids
=
new
ArrayList
<>();
ids
.
add
(
new
Material
(
355L
,
0
)
);
ids
.
add
(
new
Material
(
356L
,
0
)
);
ids
.
add
(
new
Material
(
357L
,
0
)
);
ids
.
add
(
new
Material
(
358L
,
0
)
);
ids
.
add
(
new
Material
(
359L
,
0
)
);
ids
.
add
(
new
Material
(
960L
,
0
)
);
ids
.
add
(
new
Material
(
3384L
,
0
)
);
Params
.
put
(
"
resourceList
"
,
ids
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_
8
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_
3
,
"产品资料配置失败"
,
response
.
body
().
asString
()));
System
.
out
.
println
(
response
.
body
().
asString
()
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_
8
,
"产品资料配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"问卷"
,
priority
=
8
)
...
...
@@ -1553,7 +1554,6 @@ public class SaveLive implements Authorization {
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_timeRed
,
"添加第1轮赞现金任务失败"
,
response
.
body
().
asString
()));
}
public
List
<
RedList
>
redId
;
@Test
(
description
=
"查询第1轮红包配置列表"
,
priority
=
79
)
public
void
查询第
1
轮红包配置列表
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
...
...
@@ -2286,7 +2286,58 @@ public class SaveLive implements Authorization {
}
@Test
(
description
=
"保存第5轮和第6轮配置红包"
,
priority
=
122
)
public
void
保存第
5
轮和第
6
轮配置红包
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"viewTime"
,
3
);
Params
.
put
(
"rewardAmount"
,
100
);
Params
.
put
(
"bizConfId"
,
this
.
bizConfId
.
get
(
2
).
getBizConfId
());
Params
.
put
(
"taskType"
,
3
);
Params
.
put
(
"taskName"
,
"图文"
);
Params
.
put
(
"authOpen"
,
0
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_TimeRedSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_TimeRedSave
,
"保存第5轮配置红包失败"
,
response
.
body
().
asString
()));
Params
.
put
(
"bizConfId"
,
this
.
bizConfId
.
get
(
3
).
getBizConfId
());
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_TimeRedSave
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_TimeRedSave
,
"保存第6轮配置红包失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询时长红包配置列表"
,
priority
=
123
)
public
void
查询时长红包配置列表
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"pageIndex"
,
1
);
Params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_timeRedList
);
List
<
RedList
>
list
=
JsonUtil
.
parseResponseToPageBean
(
response
,
RedList
.
class
);
System
.
out
.
println
(
list
);
this
.
redId
=
list
;
Assert
.
assertEquals
(
list
.
size
(),
6
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_timeRedList
,
"查询时长红包配置列表失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询第5轮和第6轮时长红包详情"
,
priority
=
124
)
public
void
查询第
5
轮和第
6
轮时长红包详情
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"id"
,
this
.
redId
.
get
(
4
).
getId
()
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_otherDetail
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_otherDetail
,
"查询第5轮时长红包详情失败"
,
response
.
body
().
asString
()));
Params
.
put
(
"id"
,
this
.
redId
.
get
(
5
).
getId
()
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_otherDetail
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_otherDetail
,
"查询第6轮时长红包详情失败"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/treasure/TimeRed.java
View file @
401036fe
package
com
.
kjj
.
cases
.
live
.
treasure
;
import
com.kjj.bean.manager.Material
;
import
com.kjj.bean.manager.RedList
;
import
com.kjj.bean.red.RedConf
;
import
com.kjj.bean.resources.ResourceForm
;
import
com.kjj.cases.admin.Authorization
;
...
...
@@ -15,12 +17,15 @@ import org.testng.annotations.Test;
import
java.util.*
;
import
static
com
.
kjj
.
utils
.
IdMakeUtil
.
encodingId
;
public
class
TimeRed
implements
Authorization
{
@BeforeClass
public
void
setUp
()
{
BaseUtils
.
ssoLogin
();
}
public
List
<
RedConf
>
id
;
public
List
<
RedConf
>
bizConfId
;
public
List
<
RedList
>
list
;
@Test
(
description
=
"查询攒现金红包配置"
,
priority
=
1
)
public
void
查询攒现金红包配置
()
{
...
...
@@ -388,15 +393,12 @@ public class TimeRed implements Authorization {
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
tasksRes
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
Object
data1
=
tasksRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertNotNull
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客I未完成表单任务"
,
tasksRes
.
body
().
asString
()));
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成表单任务"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启第4轮红包"
,
priority
=
17
)
public
void
开启第
4
轮红包
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
...
...
@@ -415,8 +417,6 @@ public class TimeRed implements Authorization {
boolean
data1
=
redRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客I开启第4轮红包失败"
,
redRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询开启第4轮红包结果"
,
priority
=
18
)
...
...
@@ -442,12 +442,182 @@ public class TimeRed implements Authorization {
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state1
);
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第4轮红包"
,
stateRes
.
body
().
asString
()));
}
@Test
(
description
=
"删除第5轮时长红包任务"
,
priority
=
19
)
public
void
删除第
5
轮时长红包任务
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"pageIndex"
,
1
);
Params
.
put
(
"pageSize"
,
20
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_timeRedList
);
list
=
JsonUtil
.
parseResponseToPageBean
(
response
,
RedList
.
class
);
Params
.
clear
();
Params
.
put
(
"redRoundId"
,
list
.
get
(
4
).
getId
());
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_deleteTask
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_deleteTask
,
"删除第5轮时长红包任务失败"
,
response
.
body
().
asString
()));
Params
.
clear
();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Params
.
put
(
"pageIndex"
,
1
);
Params
.
put
(
"pageSize"
,
20
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
MANAGER_timeRedList
);
list
=
JsonUtil
.
parseResponseToPageBean
(
response
,
RedList
.
class
);
Assert
.
assertEquals
(
list
.
get
(
4
).
getTaskType
(),
0
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_timeRedList
,
"删除第5轮时长红包任务失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看第5轮红包任务完成情况"
,
priority
=
20
)
public
void
查看第
5
轮红包任务完成情况
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成表单任务"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成表单任务"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启第5轮红包"
,
priority
=
21
)
public
void
开启第
5
轮红包
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"id"
,
this
.
id
.
get
(
4
).
getId
());
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客H开启第4轮红包失败"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
redRes
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
boolean
data1
=
redRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客I开启第4轮红包失败"
,
redRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询开启第5轮红包结果"
,
priority
=
22
)
public
void
查询开启第
5
轮红包结果
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"id"
,
this
.
id
.
get
(
4
).
getId
());
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_openState
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state
);
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第4轮红包"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
stateRes
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_openState
);
Object
data1
=
stateRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data1
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state1
);
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第4轮红包"
,
stateRes
.
body
().
asString
()));
}
@Test
(
description
=
"下架第6轮红包任务对应的权益"
,
priority
=
23
)
public
void
下架第
6
轮红包任务对应的权益
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
List
<
Material
>
ids
=
new
ArrayList
<>();
ids
.
add
(
new
Material
(
355L
,
0
));
ids
.
add
(
new
Material
(
357L
,
0
));
ids
.
add
(
new
Material
(
358L
,
0
));
ids
.
add
(
new
Material
(
359L
,
0
));
ids
.
add
(
new
Material
(
960L
,
0
));
ids
.
add
(
new
Material
(
3384L
,
0
));
Params
.
put
(
"resourceList"
,
ids
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_8
);
System
.
out
.
println
(
Params
);
System
.
out
.
println
(
response
.
body
().
asString
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
MANAGER_saveAndUpdate_8
,
"产品资料配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查看第6轮红包任务完成情况"
,
priority
=
24
)
public
void
查看第
6
轮红包任务完成情况
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
1000
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成表单任务"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_tasks
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_tasks
,
"访客H未完成表单任务"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"开启第6轮红包"
,
priority
=
25
)
public
void
开启第
6
轮红包
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"id"
,
this
.
id
.
get
(
5
).
getId
());
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
response
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客H开启第4轮红包失败"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
redRes
=
network
.
postResponse
(
Params
,
BasicConfig
.
ANCHOR_redOpen
);
boolean
data1
=
redRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_redOpen
,
"访客I开启第4轮红包失败"
,
redRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询开启第6轮红包结果"
,
priority
=
26
)
public
void
查询开启第
6
轮红包结果
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Params
.
put
(
"id"
,
this
.
id
.
get
(
5
).
getId
());
visitorAuth9
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
response
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_openState
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Integer
state
=
response
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
response
.
body
().
asString
());
Assert
.
assertTrue
(
state
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客H未领取第4轮红包"
,
response
.
body
().
asString
()));
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
Response
stateRes
=
network
.
getResponse
(
Params
,
BasicConfig
.
ANCHOR_openState
);
Object
data1
=
stateRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data1
);
Integer
state1
=
stateRes
.
jsonPath
().
getInt
(
"data.state"
);
System
.
out
.
println
(
state1
);
Assert
.
assertTrue
(
state1
==
2
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_openState
,
"访客I未领取第4轮红包"
,
stateRes
.
body
().
asString
()));
}
//提现
@Test
(
description
=
"查询提现页面展示数据"
,
priority
=
19
)
@Test
(
description
=
"查询提现页面展示数据"
,
priority
=
27
)
public
void
查询提现页面展示数据
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
...
...
@@ -470,11 +640,9 @@ public class TimeRed implements Authorization {
Integer
surplusNum1
=
withdrawDetailRes
.
jsonPath
().
getInt
(
"data.surplusNum"
);
System
.
out
.
println
(
surplusNum1
);
Assert
.
assertTrue
(
surplusNum1
==
1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_withdrawDetail
,
"提现页面剩余红包个数错误"
,
withdrawDetailRes
.
body
().
asString
()));
}
@Test
(
description
=
"攒现金红包提现"
,
priority
=
2
0
)
@Test
(
description
=
"攒现金红包提现"
,
priority
=
2
8
)
public
void
攒现金红包提现
()
{
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -491,12 +659,10 @@ public class TimeRed implements Authorization {
boolean
data1
=
withdrawRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
Params
,
BasicConfig
.
ANCHOR_withdraw
,
"访客I攒现金红包提现状态不对"
,
withdrawRes
.
body
().
asString
()));
}
@Test
(
description
=
"攒现金红包提现结果"
,
priority
=
2
1
)
@Test
(
description
=
"攒现金红包提现结果"
,
priority
=
2
9
)
public
void
攒现金红包提现结果
()
{
visitorAuth9
();
...
...
@@ -525,7 +691,7 @@ public class TimeRed implements Authorization {
}
@Test
(
description
=
"领取抽奖码"
,
priority
=
22
)
@Test
(
description
=
"领取抽奖码"
,
priority
=
30
)
public
void
领取抽奖码
()
{
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
1000
);
...
...
@@ -538,7 +704,7 @@ public class TimeRed implements Authorization {
}
@Test
(
description
=
"领取抽奖码结果"
,
priority
=
23
)
@Test
(
description
=
"领取抽奖码结果"
,
priority
=
31
)
public
void
领取抽奖码结果
()
{
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
500
);
...
...
@@ -551,7 +717,7 @@ public class TimeRed implements Authorization {
}
@Test
(
description
=
"访客I的抽奖券列表"
,
priority
=
24
)
@Test
(
description
=
"访客I的抽奖券列表"
,
priority
=
32
)
public
void
访客
I
的抽奖券列表
()
{
visitorAuth8
();
ThreadSleepUtils
.
sleep
(
3000
);
...
...
@@ -572,7 +738,7 @@ public class TimeRed implements Authorization {
}
@Test
(
description
=
"查询用户数据"
,
priority
=
25
)
@Test
(
description
=
"查询用户数据"
,
priority
=
33
)
public
void
查询用户数据
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
...
...
@@ -593,7 +759,7 @@ public class TimeRed implements Authorization {
}
@Test
(
description
=
"查询领取统计"
,
priority
=
26
)
@Test
(
description
=
"查询领取统计"
,
priority
=
34
)
public
void
查询领取统计
()
{
Map
<
String
,
Object
>
Params
=
new
HashMap
<>();
Params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
401036fe
...
...
@@ -172,6 +172,7 @@ public class BasicConfig {
public
static
final
String
ANCHOR_code
=
MOBILE_HOST
+
"/kjy/live/time/red/code"
;
public
static
final
String
ANCHOR_state
=
MOBILE_HOST
+
"/kjy/live/time/red/code/state"
;
public
static
final
String
ANCHOR_tasks
=
MOBILE_HOST
+
"/kjy/live/time/red/tasks"
;
public
static
final
String
MANAGER_deleteTask
=
MANAGER_HOST
+
"/kjy/manager/live/time/red/deleteTask"
;
// *************** 成功案例库 ***************
public
static
final
String
MANAGER_caseTemp
=
MANAGER_HOST
+
"/kjy/manager/live/caseTemp/list"
;
...
...
@@ -350,6 +351,7 @@ public class BasicConfig {
public
static
final
String
MANAGER_rewardList
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/list"
;
public
static
final
String
MANAGER_delete
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/delete"
;
public
static
final
String
MANAGER_update
=
MANAGER_HOST
+
"/kjy/manager/live/ques/reward/update"
;
public
static
final
String
MANAGER_saveAndUpdate_8
=
MANAGER_HOST
+
"/kjy/manager/live/resource/pre/conf/saveOrUpdate4Resource"
;
//定时投票
public
static
final
String
MANAGER_timedChoice
=
MANAGER_HOST
+
"/kjy/manager/live/timedChoice/getList"
;
public
static
final
String
MANAGER_saveTimedChoice
=
MANAGER_HOST
+
"/kjy/manager/live/timedChoice/saveOrUpdate"
;
...
...
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