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
06420dbc
Commit
06420dbc
authored
Mar 22, 2021
by
别湘灵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'master' of /Users/biexiangling/Documents/kejiji with conflicts.
parent
44681908
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
31 deletions
+128
-31
LiveVisitor.java
src/test/java/com/kjj/bean/LiveVisitor.java
+14
-0
CloseLive.java
src/test/java/com/kjj/cases/live/CloseLive.java
+1
-1
LiveMaterial.java
src/test/java/com/kjj/cases/live/LiveMaterial.java
+16
-17
LiveVisitors.java
src/test/java/com/kjj/cases/live/LiveVisitors.java
+72
-12
OpenLive.java
src/test/java/com/kjj/cases/live/OpenLive.java
+1
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+16
-0
liveTestNG.xml
src/test/liveTestNG.xml
+8
-0
No files found.
src/test/java/com/kjj/bean/LiveVisitor.java
View file @
06420dbc
package
com
.
kjj
.
bean
;
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
LiveVisitor
{
public
class
LiveVisitor
{
private
String
confId
;
private
String
resourceBigImg
;
private
String
resourceTitle
;
private
int
resourceType
;
private
String
resourceImg
;
private
String
outLink
;
private
int
outLinkType
;
private
String
outLinkAppId
;
private
String
resourceButtonTitle
;
private
String
resourceSubTitle
;
private
String
testType
;
}
}
src/test/java/com/kjj/cases/live/CloseLive.java
View file @
06420dbc
...
@@ -23,7 +23,7 @@ public class CloseLive implements AdminAuthorization{
...
@@ -23,7 +23,7 @@ public class CloseLive implements AdminAuthorization{
public
void
closeLive
()
{
public
void
closeLive
()
{
Map
<
String
,
Object
>
closeParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
closeParam
=
new
HashMap
<>();
closeParam
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
closeParam
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
closeParam
.
put
(
"cid"
,
101
);
closeParam
.
put
(
"cid"
,
90
);
Response
closeRes
=
network
.
postResponse
(
closeParam
,
BasicConfig
.
ANCHOR_CLOSE
);
Response
closeRes
=
network
.
postResponse
(
closeParam
,
BasicConfig
.
ANCHOR_CLOSE
);
Object
data
=
closeRes
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
closeRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/cases/live/LiveMaterial.java
View file @
06420dbc
package
com
.
kjj
.
cases
.
live
;
package
com
.
kjj
.
cases
.
live
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.kjj.bean.VoteBean
;
import
com.kjj.bean.VoteBean
;
import
com.kjj.bean.VoteListBean
;
import
com.kjj.bean.VoteListBean
;
import
com.kjj.bean.WelfareBean
;
import
com.kjj.bean.WelfareBean
;
...
@@ -8,11 +7,11 @@ import com.kjj.bean.WelfareListBean;
...
@@ -8,11 +7,11 @@ import com.kjj.bean.WelfareListBean;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.JsonUtil
;
import
groovy.json.JsonBuilder
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.util.*
;
import
java.util.*
;
...
@@ -35,7 +34,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -35,7 +34,7 @@ public class LiveMaterial implements AdminAuthorization {
saveOrUpdateParam
.
put
(
"welfareName"
,
"盲盒锦鲤"
);
saveOrUpdateParam
.
put
(
"welfareName"
,
"盲盒锦鲤"
);
saveOrUpdateParam
.
put
(
"welfarePictures"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"welfarePictures"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"welfarePicturesArr"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"welfarePicturesArr"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"companyId"
,
101
);
saveOrUpdateParam
.
put
(
"companyId"
,
90
);
Response
saveOrUpdatePes
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE6
);
Response
saveOrUpdatePes
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE6
);
boolean
data
=
saveOrUpdatePes
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
saveOrUpdatePes
.
jsonPath
().
getBoolean
(
"data"
);
...
@@ -47,7 +46,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -47,7 +46,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询福利并删除
()
{
public
void
查询福利并删除
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyId"
,
101
);
params
.
put
(
"companyId"
,
90
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
1
);
params
.
put
(
"pageSize"
,
1
);
...
@@ -77,7 +76,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -77,7 +76,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
添加投票
()
{
public
void
添加投票
()
{
Map
<
String
,
Object
>
choiceParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
choiceParam
=
new
HashMap
<>();
choiceParam
.
put
(
"companyId"
,
101
);
choiceParam
.
put
(
"companyId"
,
90
);
choiceParam
.
put
(
"question"
,
"投票测试一"
);
choiceParam
.
put
(
"question"
,
"投票测试一"
);
List
<
VoteListBean
>
votes
=
new
ArrayList
<>();
List
<
VoteListBean
>
votes
=
new
ArrayList
<>();
VoteListBean
vote
=
new
VoteListBean
();
VoteListBean
vote
=
new
VoteListBean
();
...
@@ -104,7 +103,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -104,7 +103,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询投票并删除
()
{
public
void
查询投票并删除
()
{
Map
<
String
,
Object
>
choiceListPram
=
new
HashMap
<>();
Map
<
String
,
Object
>
choiceListPram
=
new
HashMap
<>();
choiceListPram
.
put
(
"companyId"
,
101
);
choiceListPram
.
put
(
"companyId"
,
90
);
choiceListPram
.
put
(
"pageIndex"
,
1
);
choiceListPram
.
put
(
"pageIndex"
,
1
);
choiceListPram
.
put
(
"pageSize"
,
1
);
choiceListPram
.
put
(
"pageSize"
,
1
);
...
@@ -132,7 +131,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -132,7 +131,7 @@ public class LiveMaterial implements AdminAuthorization {
@Test
(
description
=
"问题管理"
,
priority
=
5
)
@Test
(
description
=
"问题管理"
,
priority
=
5
)
public
void
添加问题
()
{
public
void
添加问题
()
{
Map
<
String
,
Object
>
questionParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
questionParam
=
new
HashMap
<>();
questionParam
.
put
(
"companyId"
,
101
);
questionParam
.
put
(
"companyId"
,
90
);
questionParam
.
put
(
"question"
,
"测试问题"
);
questionParam
.
put
(
"question"
,
"测试问题"
);
Response
questionRes
=
network
.
postResponse
(
questionParam
,
BasicConfig
.
MANAGER_QUESTION
);
Response
questionRes
=
network
.
postResponse
(
questionParam
,
BasicConfig
.
MANAGER_QUESTION
);
...
@@ -145,7 +144,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -145,7 +144,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询问题并删除
()
{
public
void
查询问题并删除
()
{
Map
<
String
,
Object
>
question1Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
question1Param
=
new
HashMap
<>();
question1Param
.
put
(
"companyId"
,
101
);
question1Param
.
put
(
"companyId"
,
90
);
question1Param
.
put
(
"pageIndex"
,
1
);
question1Param
.
put
(
"pageIndex"
,
1
);
question1Param
.
put
(
"pageSize"
,
1
);
question1Param
.
put
(
"pageSize"
,
1
);
...
@@ -173,7 +172,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -173,7 +172,7 @@ public class LiveMaterial implements AdminAuthorization {
@Test
(
description
=
"添加图文资料"
,
priority
=
7
)
@Test
(
description
=
"添加图文资料"
,
priority
=
7
)
public
void
添加图文资料
()
{
public
void
添加图文资料
()
{
Map
<
String
,
Object
>
resourceParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
resourceParam
=
new
HashMap
<>();
resourceParam
.
put
(
"companyId"
,
101
);
resourceParam
.
put
(
"companyId"
,
90
);
resourceParam
.
put
(
"resourceTitle"
,
"图文资料2"
);
resourceParam
.
put
(
"resourceTitle"
,
"图文资料2"
);
resourceParam
.
put
(
"resourceButtonTitle"
,
"我要报名"
);
resourceParam
.
put
(
"resourceButtonTitle"
,
"我要报名"
);
resourceParam
.
put
(
"resourceImg"
,
"https://yun.dui88.com/kjy/image/20210306/1615023456356.jpeg"
);
resourceParam
.
put
(
"resourceImg"
,
"https://yun.dui88.com/kjy/image/20210306/1615023456356.jpeg"
);
...
@@ -191,7 +190,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -191,7 +190,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询图文并删除
()
{
public
void
查询图文并删除
()
{
Map
<
String
,
Object
>
imageTextParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
imageTextParam
=
new
HashMap
<>();
imageTextParam
.
put
(
"companyId"
,
101
);
imageTextParam
.
put
(
"companyId"
,
90
);
imageTextParam
.
put
(
"pageIndex"
,
1
);
imageTextParam
.
put
(
"pageIndex"
,
1
);
imageTextParam
.
put
(
"pageSize"
,
1
);
imageTextParam
.
put
(
"pageSize"
,
1
);
imageTextParam
.
put
(
"resourceTypeList"
,
1
);
imageTextParam
.
put
(
"resourceTypeList"
,
1
);
...
@@ -238,7 +237,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -238,7 +237,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询链接并删除
()
{
public
void
查询链接并删除
()
{
Map
<
String
,
Object
>
linkParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
linkParam
=
new
HashMap
<>();
linkParam
.
put
(
"companyId"
,
101
);
linkParam
.
put
(
"companyId"
,
90
);
linkParam
.
put
(
"pageIndex"
,
1
);
linkParam
.
put
(
"pageIndex"
,
1
);
linkParam
.
put
(
"pageSize"
,
1
);
linkParam
.
put
(
"pageSize"
,
1
);
linkParam
.
put
(
"resourceTypeList"
,
9
);
linkParam
.
put
(
"resourceTypeList"
,
9
);
...
@@ -268,7 +267,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -268,7 +267,7 @@ public class LiveMaterial implements AdminAuthorization {
@Test
(
description
=
"添加表单"
,
priority
=
11
)
@Test
(
description
=
"添加表单"
,
priority
=
11
)
public
void
添加表单
()
{
public
void
添加表单
()
{
Map
<
String
,
Object
>
formParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
formParam
=
new
HashMap
<>();
formParam
.
put
(
"companyId"
,
101
);
formParam
.
put
(
"companyId"
,
90
);
formParam
.
put
(
"resourceTitle"
,
"表单"
);
formParam
.
put
(
"resourceTitle"
,
"表单"
);
formParam
.
put
(
"resourceButtonTitle"
,
"我要报名"
);
formParam
.
put
(
"resourceButtonTitle"
,
"我要报名"
);
formParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
formParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
...
@@ -287,7 +286,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -287,7 +286,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
查询表单并删除
()
{
public
void
查询表单并删除
()
{
Map
<
String
,
Object
>
form1Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
form1Param
=
new
HashMap
<>();
form1Param
.
put
(
"companyId"
,
101
);
form1Param
.
put
(
"companyId"
,
90
);
form1Param
.
put
(
"pageIndex"
,
1
);
form1Param
.
put
(
"pageIndex"
,
1
);
form1Param
.
put
(
"pageSize"
,
1
);
form1Param
.
put
(
"pageSize"
,
1
);
form1Param
.
put
(
"resourceTypeList"
,
12
);
form1Param
.
put
(
"resourceTypeList"
,
12
);
...
@@ -316,7 +315,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -316,7 +315,7 @@ public class LiveMaterial implements AdminAuthorization {
@Test
(
description
=
"免费领资料"
,
priority
=
13
)
@Test
(
description
=
"免费领资料"
,
priority
=
13
)
public
void
免费领资料
()
{
public
void
免费领资料
()
{
Map
<
String
,
Object
>
freeParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
freeParam
=
new
HashMap
<>();
freeParam
.
put
(
"companyId"
,
101
);
freeParam
.
put
(
"companyId"
,
90
);
freeParam
.
put
(
"resourceTitle"
,
"免费领资料"
);
freeParam
.
put
(
"resourceTitle"
,
"免费领资料"
);
freeParam
.
put
(
"resourceButtonTitle"
,
"领取资料"
);
freeParam
.
put
(
"resourceButtonTitle"
,
"领取资料"
);
freeParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
freeParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
...
@@ -335,7 +334,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -335,7 +334,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
删除免费领资料
()
{
public
void
删除免费领资料
()
{
Map
<
String
,
Object
>
form1Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
form1Param
=
new
HashMap
<>();
form1Param
.
put
(
"companyId"
,
101
);
form1Param
.
put
(
"companyId"
,
90
);
form1Param
.
put
(
"pageIndex"
,
1
);
form1Param
.
put
(
"pageIndex"
,
1
);
form1Param
.
put
(
"pageSize"
,
1
);
form1Param
.
put
(
"pageSize"
,
1
);
form1Param
.
put
(
"resourceTypeList"
,
11
);
form1Param
.
put
(
"resourceTypeList"
,
11
);
...
@@ -364,7 +363,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -364,7 +363,7 @@ public class LiveMaterial implements AdminAuthorization {
@Test
(
description
=
"秒薪测试"
,
priority
=
15
)
@Test
(
description
=
"秒薪测试"
,
priority
=
15
)
public
void
秒薪测试
()
{
public
void
秒薪测试
()
{
Map
<
String
,
Object
>
testParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
testParam
=
new
HashMap
<>();
testParam
.
put
(
"companyId"
,
101
);
testParam
.
put
(
"companyId"
,
90
);
testParam
.
put
(
"clueType"
,
1
);
testParam
.
put
(
"clueType"
,
1
);
testParam
.
put
(
"mainButtonTitle"
,
"领取门票"
);
testParam
.
put
(
"mainButtonTitle"
,
"领取门票"
);
testParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
testParam
.
put
(
"resourcePicturesArr"
,
Arrays
.
asList
(
"https://yun.dui88.com/kjy/image/20210306/1615033326937.jpg"
));
...
@@ -386,7 +385,7 @@ public class LiveMaterial implements AdminAuthorization {
...
@@ -386,7 +385,7 @@ public class LiveMaterial implements AdminAuthorization {
public
void
删除秒薪测试
()
{
public
void
删除秒薪测试
()
{
Map
<
String
,
Object
>
test1Param
=
new
HashMap
<>();
Map
<
String
,
Object
>
test1Param
=
new
HashMap
<>();
test1Param
.
put
(
"companyId"
,
101
);
test1Param
.
put
(
"companyId"
,
90
);
test1Param
.
put
(
"pageIndex"
,
1
);
test1Param
.
put
(
"pageIndex"
,
1
);
test1Param
.
put
(
"pageSize"
,
1
);
test1Param
.
put
(
"pageSize"
,
1
);
test1Param
.
put
(
"resourceTypeList"
,
13
);
test1Param
.
put
(
"resourceTypeList"
,
13
);
...
...
src/test/java/com/kjj/cases/live/LiveVisitors.java
View file @
06420dbc
package
com
.
kjj
.
cases
.
live
;
package
com
.
kjj
.
cases
.
live
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.
AgentBean
;
import
com.kjj.bean.
LiveVisitor
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.JsonUtil
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
public
class
LiveVisitors
{
public
class
LiveVisitors
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
visitorAuth
();
}
public
String
confId
;
/*访客端权益列表*/
@Test
(
description
=
"访客端权益列表"
,
priority
=
1
)
public
void
访客端权益列表
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Resource
);
List
<
LiveVisitor
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
if
(
agentBeans
.
size
()
>
0
)
{
LiveVisitor
bean
=
agentBeans
.
get
(
0
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
bean
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Resource
,
"查询权益列表失败"
,
response
.
body
().
asString
()));
}
}
/*公众号资料-领取*/
@Test
(
description
=
"公众号资料领取"
,
priority
=
2
)
public
void
公众号资料领取
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
);
List
<
LiveVisitor
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
LiveVisitor
bean
=
agentBeans
.
get
(
0
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
bean
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
,
"领取公众号资料失败"
,
response
.
body
().
asString
()));
}
/*代理人首页直播列表*/
@Test
(
description
=
"代理人首页 "
,
priority
=
1
)
/*表单资料-领取*/
public
void
代理人直播列表
()
{
@Test
(
description
=
"表单资料领取"
,
priority
=
3
)
public
void
表单资料领取
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"confId"
,
confId
);
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Procurator
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
);
List
<
AgentBean
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
AgentBean
.
class
);
List
<
LiveVisitor
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
if
(
agentBeans
.
size
()
>
0
)
{
LiveVisitor
bean
=
agentBeans
.
get
(
0
);
AgentBean
bean
=
agentBeans
.
get
(
0
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
bean
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Procurator
,
"查询直播列表
失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
bean
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
,
"领取表单资料
失败"
,
response
.
body
().
asString
()));
}
}
/*免费领资料-领取*/
@Test
(
description
=
"免费领资料领取"
,
priority
=
3
)
public
void
免费领资料领取
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
);
List
<
LiveVisitor
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
LiveVisitor
bean
=
agentBeans
.
get
(
0
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
bean
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_OfficialAccounts
,
"领取表单资料失败"
,
response
.
body
().
asString
()));
}
}
}
}
src/test/java/com/kjj/cases/live/OpenLive.java
View file @
06420dbc
...
@@ -18,7 +18,7 @@ public class OpenLive implements AdminAuthorization {
...
@@ -18,7 +18,7 @@ public class OpenLive implements AdminAuthorization {
public
void
开启直播
()
{
public
void
开启直播
()
{
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
openParam
=
new
HashMap
<>();
openParam
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
openParam
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
openParam
.
put
(
"cid"
,
101
);
openParam
.
put
(
"cid"
,
90
);
Response
openRes
=
network
.
postResponse
(
openParam
,
BasicConfig
.
ANCHOR_OPEN
);
Response
openRes
=
network
.
postResponse
(
openParam
,
BasicConfig
.
ANCHOR_OPEN
);
Object
data
=
openRes
.
jsonPath
().
getJsonObject
(
"data"
);
Object
data
=
openRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
06420dbc
...
@@ -112,6 +112,22 @@ public class BasicConfig {
...
@@ -112,6 +112,22 @@ public class BasicConfig {
public
static
final
String
MOBILE_TeamTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/teamCharts"
;
public
static
final
String
MOBILE_TeamTeamCharts
=
MOBILE_HOST
+
"/kjy/live/team/teamCharts"
;
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
public
static
final
String
MOBILE_AgentPersonalTeamCharts
=
MOBILE_HOST
+
"/kjy/live/agent/personalTeamCharts"
;
//代理人列表//
//访客端领取资料//
//查询资料列表//
public
static
final
String
MOBILE_Resource
=
MOBILE_HOST
+
"/clue/resource/list"
;
//公众号领取//
public
static
final
String
MOBILE_OfficialAccounts
=
MOBILE_HOST
+
"/kjy/live/user/resource/receive"
;
//表单资料领取//
public
static
final
String
MOBILE_
=
MOBILE_HOST
+
"/kjy/live/user/resource/receive"
;
//访客端领取资料//
public
static
final
String
MOBILE_GetAgentPosterInfo
=
MOBILE_HOST
+
"/kjy/live/share/getAgentPosterInfo"
;
public
static
final
String
MOBILE_GetAgentPosterInfo
=
MOBILE_HOST
+
"/kjy/live/share/getAgentPosterInfo"
;
...
...
src/test/liveTestNG.xml
View file @
06420dbc
...
@@ -26,6 +26,12 @@
...
@@ -26,6 +26,12 @@
</classes>
</classes>
</test>
</test>
<test
preserve-order=
"true"
name=
"访客领取资料"
>
<classes>
<class
name=
"com.kjj.cases.live.LiveVisitors"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.CloseLive"
/>
<class
name=
"com.kjj.cases.live.CloseLive"
/>
...
@@ -35,5 +41,7 @@
...
@@ -35,5 +41,7 @@
</suite>
</suite>
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