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
ac17aa28
Commit
ac17aa28
authored
Apr 14, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20210414bxl' into 'master'
资料 See merge request test-group/kejiji!49
parents
fe062d00
049a54c2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
311 additions
and
71 deletions
+311
-71
ResourceEditList.java
src/test/java/com/kjj/bean/ResourceEditList.java
+23
-0
ResourcePushList.java
src/test/java/com/kjj/bean/ResourcePushList.java
+15
-0
LiveVisitors.java
src/test/java/com/kjj/cases/live/LiveVisitors.java
+259
-70
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+14
-1
No files found.
src/test/java/com/kjj/bean/ResourceEditList.java
0 → 100644
View file @
ac17aa28
package
com
.
kjj
.
bean
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ResourceEditList
{
private
List
<
Editlist
>
list
;
@Data
public
static
class
Editlist
{
private
String
id
;
private
String
name
;
private
int
resourceType
;
private
boolean
selected
;
}
private
boolean
hasNext
;
}
src/test/java/com/kjj/bean/ResourcePushList.java
0 → 100644
View file @
ac17aa28
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
ResourcePushList
{
private
String
confId
;
private
String
resourceImg
;
private
String
resourceTitle
;
private
int
resourceType
;
private
int
pushType
;
private
boolean
hasOn
;
private
boolean
hasPasterOn
;
private
boolean
hasConfPaster
;
}
src/test/java/com/kjj/cases/live/LiveVisitors.java
View file @
ac17aa28
...
@@ -9,7 +9,6 @@ import com.kjj.utils.JsonUtil;
...
@@ -9,7 +9,6 @@ import com.kjj.utils.JsonUtil;
import
com.kjj.utils.ThreadSleepUtils
;
import
com.kjj.utils.ThreadSleepUtils
;
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.ArrayList
;
import
java.util.ArrayList
;
...
@@ -20,69 +19,89 @@ import java.util.Map;
...
@@ -20,69 +19,89 @@ import java.util.Map;
public
class
LiveVisitors
implements
AdminAuthorization
public
class
LiveVisitors
implements
AdminAuthorization
{
{
@BeforeClass
public
void
setUp
()
{
visitorAuth
();
}
public
String
confId_imagetext
;
public
String
confId_imagetext
;
public
String
confId_form
;
public
String
confId_form
;
public
String
confId_link
;
public
String
confId_link
;
public
String
confId_test
;
public
String
confId_test
;
public
String
confId_free
;
public
String
confId_free
;
public
String
confid
;
public
int
pushType
;
public
String
id
;
//************主播端************
//************主播端************
//************主播端************
/*助播端端权益列表*/
@Test
(
description
=
"助播端权益列表"
,
priority
=
1
)
public
void
助播端权益列表
()
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceList
);
List
<
ResourcePushList
>
list
=
JsonUtil
.
parseResponseToListBean
(
response
,
ResourcePushList
.
class
);
ResourcePushList
one
=
list
.
get
(
1
);
confid
=
one
.
getConfId
();
pushType
=
one
.
getPushType
();
System
.
out
.
println
(
confid
);
System
.
out
.
println
(
pushType
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceList
,
"查询主播端权益列表失败"
,
response
.
body
().
asString
()));
}
/*助播端上架权益*/
@Test
(
description
=
"助播端上架权益"
,
priority
=
2
)
public
void
助播端上架权益
()
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confid
);
params
.
put
(
"pushType"
,
pushType
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_ResourceOn
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceOn
,
"主播端上架权益失败"
,
response
.
body
().
asString
()));
}
/*访客端权益列表*/
/*访客端权益列表*/
@Test
(
description
=
"访客端权益列表"
,
priority
=
1
)
@Test
(
description
=
"访客端权益列表"
,
priority
=
3
)
public
void
访客端权益列表
()
public
void
访客端权益列表
()
{
{
ThreadSleepUtils
.
sleep
(
30000
);
ThreadSleepUtils
.
sleep
(
30000
);
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Resource
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Resource
);
List
<
LiveVisitor
>
liveVisitors
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
List
<
LiveVisitor
>
liveVisitors
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
LiveVisitor
one
=
liveVisitors
.
get
(
0
);
LiveVisitor
one
=
liveVisitors
.
get
(
0
);
System
.
out
.
println
(
one
.
getConfId
());
System
.
out
.
println
(
one
.
getConfId
());
confId_imagetext
=
one
.
getConfId
();
confId_imagetext
=
one
.
getConfId
();
LiveVisitor
two
=
liveVisitors
.
get
(
3
);
LiveVisitor
two
=
liveVisitors
.
get
(
3
);
System
.
out
.
println
(
two
.
getConfId
());
System
.
out
.
println
(
two
.
getConfId
());
confId_free
=
two
.
getConfId
();
confId_free
=
two
.
getConfId
();
LiveVisitor
three
=
liveVisitors
.
get
(
4
);
LiveVisitor
three
=
liveVisitors
.
get
(
4
);
System
.
out
.
println
(
three
.
getConfId
());
System
.
out
.
println
(
three
.
getConfId
());
confId_form
=
three
.
getConfId
();
confId_form
=
three
.
getConfId
();
LiveVisitor
four
=
liveVisitors
.
get
(
5
);
LiveVisitor
four
=
liveVisitors
.
get
(
5
);
System
.
out
.
println
(
four
.
getConfId
());
System
.
out
.
println
(
four
.
getConfId
());
confId_test
=
four
.
getConfId
();
confId_test
=
four
.
getConfId
();
LiveVisitor
five
=
liveVisitors
.
get
(
6
);
LiveVisitor
five
=
liveVisitors
.
get
(
6
);
System
.
out
.
println
(
four
.
getConfId
());
System
.
out
.
println
(
four
.
getConfId
());
confId_link
=
five
.
getConfId
();
confId_link
=
five
.
getConfId
();
System
.
out
.
println
(
liveVisitors
);
System
.
out
.
println
(
liveVisitors
);
Assert
.
assertNotNull
(
liveVisitors
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Resource
,
"查询权益列表失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
liveVisitors
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Resource
,
"查询权益列表失败"
,
response
.
body
().
asString
()));
}
}
/*访客端表单资料-查询*/
@Test
(
description
=
"访客端表单资料查询"
,
priority
=
4
)
public
ResourceForm
访客端系统表单资料查询
()
/*表单资料-查询*/
@Test
(
description
=
"表单资料查询"
,
priority
=
2
)
public
ResourceForm
系统表单资料查询
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_form
);
params
.
put
(
"confId"
,
confId_form
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Form
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Form
);
...
@@ -93,18 +112,16 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -93,18 +112,16 @@ public class LiveVisitors implements AdminAuthorization
return
agentBeans
;
return
agentBeans
;
}
}
/*访客端访客表单资料-提交*/
@Test
(
description
=
"访客端表单资料提交"
,
priority
=
5
)
/*表单资料-提交*/
public
void
访客端系统表单资料提交
()
@Test
(
description
=
"表单资料提交"
,
priority
=
3
)
public
void
系统表单资料提交
()
{
{
ResourceForm
list
=
系统表单资料查询
();
visitorAuth
();
ResourceForm
list
=
访客端系统表单资料查询
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_form
);
params
.
put
(
"confId"
,
confId_form
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
List
<
ResourceForm
.
FieldList
>
fieldList
=
list
.
getFieldList
();
List
<
ResourceForm
.
FieldList
>
fieldList
=
list
.
getFieldList
();
List
<
JSONObject
>
fieldListparam
=
new
ArrayList
<>();
List
<
JSONObject
>
fieldListparam
=
new
ArrayList
<>();
JSONObject
one
=
new
JSONObject
();
JSONObject
one
=
new
JSONObject
();
one
.
put
(
"fieldId"
,
fieldList
.
get
(
0
).
getFieldId
());
one
.
put
(
"fieldId"
,
fieldList
.
get
(
0
).
getFieldId
());
...
@@ -116,34 +133,45 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -116,34 +133,45 @@ public class LiveVisitors implements AdminAuthorization
fieldListparam
.
add
(
two
);
fieldListparam
.
add
(
two
);
params
.
put
(
"fieldList"
,
fieldListparam
);
params
.
put
(
"fieldList"
,
fieldListparam
);
System
.
out
.
println
(
JSONObject
.
toJSONString
(
params
));
System
.
out
.
println
(
JSONObject
.
toJSONString
(
params
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_FormSubmit
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_FormSubmit
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_FormSubmit
,
"提交表单资料失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_FormSubmit
,
"提交表单资料失败"
,
response
.
body
().
asString
()));
}
}
/*助播端下架权益*/
/*免费领资料-查询*/
@Test
(
description
=
"助播端下架权益"
,
priority
=
6
)
@Test
(
description
=
"免费领资料查询"
,
priority
=
4
)
public
void
助播端下架权益
()
public
void
免费领资料查询
()
{
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confid
);
params
.
put
(
"pushType"
,
pushType
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_ResourceOff
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceOff
,
"主播端下架权益失败"
,
response
.
body
().
asString
()));
}
/*访客端免费领资料-查询*/
@Test
(
description
=
"访客端免费领资料查询"
,
priority
=
7
)
public
void
访客端免费领资料查询
()
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_free
);
params
.
put
(
"confId"
,
confId_free
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceF
ree
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceF
indDetailByConfid
);
ResourceFree
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceFree
.
class
);
ResourceFree
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceFree
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceF
ree
,
"查询免费领资料失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceF
indDetailByConfid
,
"查询免费领资料失败"
,
response
.
body
().
asString
()));
}
}
/*免费领资料-领取*/
/*
访客端
免费领资料-领取*/
@Test
(
description
=
"
免费领资料领取"
,
priority
=
5
)
@Test
(
description
=
"
访客端免费领资料领取"
,
priority
=
8
)
public
void
免费领资料领取
()
public
void
访客端
免费领资料领取
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_free
);
params
.
put
(
"confId"
,
confId_free
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -152,12 +180,11 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -152,12 +180,11 @@ public class LiveVisitors implements AdminAuthorization
Assert
.
assertTrue
(
invite
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Link
,
"领取免费领资料失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
invite
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Link
,
"领取免费领资料失败"
,
response
.
body
().
asString
()));
}
}
/*访客端链接小程序资料-查询*/
/*链接小程序资料-查询*/
@Test
(
description
=
"访客端链接资料查询"
,
priority
=
9
)
@Test
(
description
=
"链接资料查询"
,
priority
=
6
)
public
void
访客端链接小程序资料查询
()
public
void
链接小程序资料查询
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_link
);
params
.
put
(
"confId"
,
confId_link
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Link1
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Link1
);
...
@@ -167,10 +194,11 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -167,10 +194,11 @@ public class LiveVisitors implements AdminAuthorization
}
}
/*链接资料资料-领取*/
/*
访客端
链接资料资料-领取*/
@Test
(
description
=
"
链接资料领取"
,
priority
=
7
)
@Test
(
description
=
"
访客端链接资料领取"
,
priority
=
10
)
public
void
链接小程序资料领取
()
public
void
访客端
链接小程序资料领取
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_link
);
params
.
put
(
"confId"
,
confId_link
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
@@ -179,46 +207,43 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -179,46 +207,43 @@ public class LiveVisitors implements AdminAuthorization
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Link
,
"领取链接资料失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Link
,
"领取链接资料失败"
,
response
.
body
().
asString
()));
}
}
/*秒薪测试配置-查询*/
/*
访客端
秒薪测试配置-查询*/
@Test
(
description
=
"
秒薪测试查询"
,
priority
=
8
)
@Test
(
description
=
"
访客端秒薪测试查询"
,
priority
=
11
)
public
ResourceTestDetail
秒薪测试查询
()
public
ResourceTestDetail
访客端
秒薪测试查询
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_test
);
params
.
put
(
"confId"
,
confId_test
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
);
ResourceTestDetail
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceTestDetail
.
class
);
ResourceTestDetail
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceTestDetail
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
,
"查询秒薪测试失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
,
"查询秒薪测试失败"
,
response
.
body
().
asString
()));
return
agentBeans
;
return
agentBeans
;
}
}
/*秒薪测试-参与*/
/*
访客端
秒薪测试-参与*/
@Test
(
description
=
"
秒薪测试参与"
,
priority
=
9
)
@Test
(
description
=
"
访客端秒薪测试参与"
,
priority
=
12
)
public
void
秒薪测试参与
()
public
void
访客端
秒薪测试参与
()
{
{
visitorAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
);
List
<
ResourceTestParticipate
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
ResourceTestParticipate
.
class
);
List
<
ResourceTestParticipate
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
ResourceTestParticipate
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
,
"秒薪测试参与失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
,
"秒薪测试参与失败"
,
response
.
body
().
asString
()));
}
}
/*访客端权益测试-详情*/
/*权益测试-详情*/
@Test
(
description
=
"访客端测试提交"
,
priority
=
13
)
@Test
(
description
=
"权益测试提交"
,
priority
=
10
)
public
void
权益测试详情提交
()
public
void
权益测试详情提交
()
{
{
ResourceTestDetail
list
=
秒薪测试查询
();
visitorAuth
();
ResourceTestDetail
list
=
访客端秒薪测试查询
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_test
);
params
.
put
(
"confId"
,
confId_test
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
List
<
ResourceTestDetail
.
FieldList
>
fieldList
=
list
.
getFieldList
();
List
<
ResourceTestDetail
.
FieldList
>
fieldList
=
list
.
getFieldList
();
List
<
JSONObject
>
fieldListparam
=
new
ArrayList
<>();
List
<
JSONObject
>
fieldListparam
=
new
ArrayList
<>();
JSONObject
one
=
new
JSONObject
();
JSONObject
one
=
new
JSONObject
();
one
.
put
(
"fieldId"
,
fieldList
.
get
(
0
).
getFieldId
());
one
.
put
(
"fieldId"
,
fieldList
.
get
(
0
).
getFieldId
());
...
@@ -233,6 +258,170 @@ public class LiveVisitors implements AdminAuthorization
...
@@ -233,6 +258,170 @@ public class LiveVisitors implements AdminAuthorization
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestSubmit
,
"提交秒薪测试失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestSubmit
,
"提交秒薪测试失败"
,
response
.
body
().
asString
()));
}
}
//********************代理人*************//
//********************代理人*************//
//********************代理人*************//
/*代理人端权益列表查询*/
@Test
(
description
=
"代理人端权益列表查询"
,
priority
=
14
)
public
void
代理人端权益列表查询
()
{
agentAuth
();
ThreadSleepUtils
.
sleep
(
30000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Resource
);
List
<
LiveVisitor
>
liveVisitors
=
JsonUtil
.
parseResponseToListBean
(
response
,
LiveVisitor
.
class
);
System
.
out
.
println
(
liveVisitors
);
Assert
.
assertNotNull
(
liveVisitors
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Resource
,
"查询权益列表失败"
,
response
.
body
().
asString
()));
}
//代理人端图文资料查询
@Test
(
description
=
"代理人端图文资料查询"
,
priority
=
15
)
public
void
代理人端图文资料查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_imagetext
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
);
ResourceFree
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceFree
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
,
"查询免费领资料失败"
,
response
.
body
().
asString
()));
}
//代理人端表单资料查询
@Test
(
description
=
"代理人端表单资料查询"
,
priority
=
16
)
public
ResourceForm
代理人端表单资料查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_form
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_Form
);
ResourceForm
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceForm
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_Form
,
"查询表单资料失败"
,
response
.
body
().
asString
()));
return
agentBeans
;
}
/*代理人端免费领资料-查询*/
@Test
(
description
=
"代理人端免费领资料查询"
,
priority
=
17
)
public
void
代理人端免费领资料查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_free
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
);
ResourceFree
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceFree
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
,
"查询免费领资料失败"
,
response
.
body
().
asString
()));
}
//代理人端小程序链接资料查询
@Test
(
description
=
"代理人端小程序链接资料查询"
,
priority
=
18
)
public
void
代理人端小程序链接资料查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_link
);
params
.
put
(
"liveid"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
);
ResourceFree
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceFree
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceFindDetailByConfid
,
"查询免费领资料失败"
,
response
.
body
().
asString
()));
}
//代理人端秒薪查询
@Test
(
description
=
"代理人端秒薪查询"
,
priority
=
19
)
public
void
代理人端秒薪查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_test
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
);
ResourceTestDetail
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceTestDetail
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
,
"查询秒薪测试失败"
,
response
.
body
().
asString
()));
}
//代理人端秒薪资料查询
@Test
(
description
=
"代理人端秒薪资料查询"
,
priority
=
20
)
public
ResourceTestDetail
代理人端秒薪资料查询
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_test
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
);
ResourceTestDetail
agentBeans
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceTestDetail
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestDetail
,
"查询秒薪测试失败"
,
response
.
body
().
asString
()));
return
agentBeans
;
}
/*代理人秒薪测试-参与*/
@Test
(
description
=
"代理人秒薪测试参与"
,
priority
=
21
)
public
void
代理人秒薪测试参与
()
{
agentAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
);
List
<
ResourceTestParticipate
>
agentBeans
=
JsonUtil
.
parseResponseToListBean
(
response
,
ResourceTestParticipate
.
class
);
System
.
out
.
println
(
JSON
.
toJSONString
(
agentBeans
));
Assert
.
assertNotNull
(
agentBeans
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceTestParticipate
,
"秒薪测试参与失败"
,
response
.
body
().
asString
()));
}
/*代理人权益测试-详情*/
@Test
(
description
=
"代理人权益测试提交"
,
priority
=
22
)
public
void
代理人权益测试详情提交
()
{
agentAuth
();
ResourceTestDetail
list
=
代理人端秒薪资料查询
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"confId"
,
confId_test
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
List
<
ResourceTestDetail
.
FieldList
>
fieldList
=
list
.
getFieldList
();
List
<
JSONObject
>
fieldListparam
=
new
ArrayList
<>();
JSONObject
one
=
new
JSONObject
();
one
.
put
(
"fieldId"
,
fieldList
.
get
(
0
).
getFieldId
());
one
.
put
(
"fieldValue"
,
"100000"
);
one
.
put
(
"fieldSubmitIds"
,
""
);
fieldListparam
.
add
(
one
);
params
.
put
(
"fieldList"
,
fieldListparam
);
System
.
out
.
println
(
JSONObject
.
toJSONString
(
params
));
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MOBILE_ResourceTestSubmit
);
System
.
out
.
println
(
JSONObject
.
toJSONString
(
"公司业务员无法参与"
));
}
//助播端查询已经添加过的权益列表
@Test
(
description
=
"助播端查询已经添加过的权益列表"
,
priority
=
23
)
public
void
助播端查询编辑的权益列表
()
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pageIndex"
,
1
);
params
.
put
(
"pageSize"
,
30
);
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceEditList
);
ResourceEditList
list
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceEditList
.
class
);
System
.
out
.
println
(
list
);
Assert
.
assertNotNull
(
list
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceEditList
,
"查询主播端权益列表失败"
,
response
.
body
().
asString
()));
}
//助播端编辑权益
@Test
(
description
=
"助播端编辑权益"
,
priority
=
24
)
public
void
助播端编辑权益
()
{
adminAuth
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"ids"
,
confId_imagetext
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MOBILE_ResourceEditList
);
ResourceEditList
list
=
JsonUtil
.
parseResponseToBean
(
response
,
ResourceEditList
.
class
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"success"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_ResourceEdit
,
"编辑主播端权益列表失败"
,
response
.
body
().
asString
()));
}
}
}
src/test/java/com/kjj/config/BasicConfig.java
View file @
ac17aa28
...
@@ -137,11 +137,16 @@ public class BasicConfig {
...
@@ -137,11 +137,16 @@ public class BasicConfig {
//查询资料列表//
//查询资料列表//
public
static
final
String
MOBILE_Resource
=
MOBILE_HOST
+
"/clue/resource/list"
;
public
static
final
String
MOBILE_Resource
=
MOBILE_HOST
+
"/clue/resource/list"
;
public
static
final
String
MOBILE_ResourceOn
=
MOBILE_HOST
+
"/conf/live/push/on"
;
public
static
final
String
MOBILE_ResourceOff
=
MOBILE_HOST
+
"/conf/live/push/off"
;
public
static
final
String
MOBILE_ResourceEditList
=
MOBILE_HOST
+
"/conf/pre/resource/list"
;
public
static
final
String
MOBILE_ResourceEdit
=
MOBILE_HOST
+
"/conf/pre/resource/saveOrUpdate"
;
public
static
final
String
MOBILE_ResourceList
=
MOBILE_HOST
+
"/conf/live/push/list"
;
public
static
final
String
MOBILE_Form
=
MOBILE_HOST
+
"/clue/resource/form/detail"
;
public
static
final
String
MOBILE_Form
=
MOBILE_HOST
+
"/clue/resource/form/detail"
;
public
static
final
String
MOBILE_FormSubmit
=
MOBILE_HOST
+
"/clue/resource/form/submit"
;
public
static
final
String
MOBILE_FormSubmit
=
MOBILE_HOST
+
"/clue/resource/form/submit"
;
public
static
final
String
MOBILE_Link1
=
MOBILE_HOST
+
"/clue/info/interact"
;
public
static
final
String
MOBILE_Link1
=
MOBILE_HOST
+
"/clue/info/interact"
;
public
static
final
String
MOBILE_Link
=
MOBILE_HOST
+
"/kjy/live/user/resource/receive"
;
public
static
final
String
MOBILE_Link
=
MOBILE_HOST
+
"/kjy/live/user/resource/receive"
;
public
static
final
String
MOBILE_ResourceF
ree
=
MOBILE_HOST
+
"/kjy/live/user/resource/findDetailByConfId"
;
public
static
final
String
MOBILE_ResourceF
indDetailByConfid
=
MOBILE_HOST
+
"/kjy/live/user/resource/findDetailByConfId"
;
public
static
final
String
MOBILE_ResourceTestDetail
=
MOBILE_HOST
+
"/clue/resource/test/detail"
;
public
static
final
String
MOBILE_ResourceTestDetail
=
MOBILE_HOST
+
"/clue/resource/test/detail"
;
public
static
final
String
MOBILE_ResourceTestParticipate
=
MOBILE_HOST
+
"/clue/resource/test/participate"
;
public
static
final
String
MOBILE_ResourceTestParticipate
=
MOBILE_HOST
+
"/clue/resource/test/participate"
;
public
static
final
String
MOBILE_ResourceTestSubmit
=
MOBILE_HOST
+
"/clue/resource/test/submit"
;
public
static
final
String
MOBILE_ResourceTestSubmit
=
MOBILE_HOST
+
"/clue/resource/test/submit"
;
...
@@ -155,6 +160,14 @@ public class BasicConfig {
...
@@ -155,6 +160,14 @@ public class BasicConfig {
public
static
final
String
MOBILE_MyLotteryCode
=
MOBILE_HOST
+
"/kjy/live/lottery/myLotteryCode"
;
public
static
final
String
MOBILE_MyLotteryCode
=
MOBILE_HOST
+
"/kjy/live/lottery/myLotteryCode"
;
//投票
public
static
final
String
MOBILE_ChoiceCurrentDetail
=
MOBILE_HOST
+
"/conf/live/choice/currentDetail"
;
public
static
final
String
MOBILE_AddChoice
=
MOBILE_HOST
+
"/conf/live/choice/addChoice"
;
public
static
final
String
MOBILE_ChoiceGetList
=
MOBILE_HOST
+
"/conf/live/choice/getList"
;
public
static
final
String
MOBILE_ChoiceSend
=
MOBILE_HOST
+
"/conf/live/choice/send"
;
public
static
final
String
MOBILE_ChoiceClose
=
MOBILE_HOST
+
"/conf/live/choice/close"
;
//红包//
//红包//
public
static
final
String
MOBILE_AnchorRedList
=
MOBILE_HOST
+
"/conf/live/red/findRedList"
;
public
static
final
String
MOBILE_AnchorRedList
=
MOBILE_HOST
+
"/conf/live/red/findRedList"
;
public
static
final
String
MOBILE_FindRedList
=
MOBILE_HOST
+
"/clue/red/findRedList"
;
public
static
final
String
MOBILE_FindRedList
=
MOBILE_HOST
+
"/clue/red/findRedList"
;
...
...
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