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
e67c0126
Commit
e67c0126
authored
Sep 13, 2021
by
xiamengchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
直播中测试完善
parent
a8b48fde
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
272 additions
and
228 deletions
+272
-228
ResourceForm.java
src/test/java/com/kjj/bean/resources/ResourceForm.java
+1
-0
ResourceFree.java
src/test/java/com/kjj/bean/resources/ResourceFree.java
+1
-0
LiveLater.java
src/test/java/com/kjj/cases/live/agent/LiveLater.java
+5
-0
LiveVisitors.java
src/test/java/com/kjj/cases/live/anchor/LiveVisitors.java
+53
-25
PersonalPage.java
src/test/java/com/kjj/cases/live/customer/PersonalPage.java
+10
-0
EvaluationConf.java
...st/java/com/kjj/cases/live/liveConfig/EvaluationConf.java
+17
-17
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+2
-2
LotteryCode.java
...test/java/com/kjj/cases/live/lotteryCode/LotteryCode.java
+1
-2
liveTestNG.xml
src/test/liveTestNG.xml
+182
-182
No files found.
src/test/java/com/kjj/bean/resources/ResourceForm.java
View file @
e67c0126
...
...
@@ -12,6 +12,7 @@ public class ResourceForm {
private
List
<
FieldList
>
fieldList
;
private
String
received
;
private
String
evaluationId
;
private
boolean
hasSubmitEvaluation
;
@Data
public
static
class
FieldList
...
...
src/test/java/com/kjj/bean/resources/ResourceFree.java
View file @
e67c0126
...
...
@@ -24,4 +24,5 @@ public class ResourceFree {
private
String
outLinkAppId
;
private
String
formBanner
;
private
String
evaluationId
;
private
boolean
hasSubmitEvaluation
;
}
src/test/java/com/kjj/cases/live/agent/LiveLater.java
View file @
e67c0126
...
...
@@ -238,6 +238,11 @@ public class LiveLater implements Authorization {
List
<
GrabWelfares
>
list
=
JsonUtil
.
parseResponseToListBean
(
response
,
GrabWelfares
.
class
,
"grabWelfares"
);
Boolean
specifyAward
=
list
.
get
(
0
).
getSpecifyAward
();
Assert
.
assertTrue
(
specifyAward
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"指定中奖为null"
,
response
.
body
().
asString
()));
List
<
Map
<
String
,
Object
>>
evaLists
=
response
.
jsonPath
().
getList
(
"evaluationResources"
);
System
.
out
.
println
(
"evaLists: "
+
evaLists
);
Assert
.
assertEquals
(
evaLists
.
size
(),
1
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"用户参与测试数量错误"
,
response
.
body
().
asString
()));
String
evaTitle
=
(
String
)
evaLists
.
get
(
0
).
get
(
"resourceTitle"
);
Assert
.
assertEquals
(
evaTitle
,
"编辑后修改标题"
,
network
.
message
(
params
,
BasicConfig
.
MOBILE_getClueDetail
,
"用户参与测试标题错误"
,
response
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/anchor/LiveVisitors.java
View file @
e67c0126
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/customer/PersonalPage.java
View file @
e67c0126
...
...
@@ -73,6 +73,16 @@ public class PersonalPage implements Authorization {
Assert
.
assertEquals
(
sourceRecordId
,
LiveVisitors
.
resourceReceiveRecordId
,
network
.
message
(
params
,
BasicConfig
.
USER_resourceList
,
"资料领取记录id不正确"
,
response
.
body
().
asString
()));
String
liveId
=
resourceList
.
getLiveId
();
Assert
.
assertEquals
(
liveId
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()),
network
.
message
(
params
,
BasicConfig
.
USER_resourceList
,
"资料领取直播id不正确"
,
response
.
body
().
asString
()));
try
{
for
(
ResourceList
resourceList1
:
resourceLists
){
if
(
resourceList1
.
getLiveId
().
equals
(
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()))){
Assert
.
assertNotEquals
(
resourceList1
.
getRecordId
(),
LiveVisitors
.
freeForEvaReceiveRecordId
,
network
.
message
(
params
,
BasicConfig
.
USER_resourceList
,
"关联测试的资料未被过滤"
,
response
.
body
().
asString
()));
}
else
{
break
;}
}
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
params
,
BasicConfig
.
USER_resourceList
,
"获取数据失败"
,
response
.
body
().
asString
()));
}
companyName
=
resourceList
.
getCompanyName
();
// 获取领取资料的公司名称
}
...
...
src/test/java/com/kjj/cases/live/liveConfig/EvaluationConf.java
View file @
e67c0126
...
...
@@ -82,23 +82,23 @@ public class EvaluationConf implements Authorization {
System
.
out
.
println
(
response
.
body
().
asString
());
}
@Test
(
description
=
"删除权益"
,
priority
=
2
)
public
void
删除权益
()
{
for
(
int
resourceId
:
Arrays
.
asList
(
LiveMaterial
.
resourceId
,
LiveMaterial
.
termResourceId
,
LiveMaterial
.
freeResourceId
,
LiveMaterial
.
picResourceId
)){
System
.
out
.
println
(
resourceId
);
Map
<
String
,
Object
>
delResourceParam
=
new
HashMap
<>();
delResourceParam
.
put
(
"id"
,
resourceId
);
Response
delResourceRes
=
network
.
postResponse
(
delResourceParam
,
BasicConfig
.
MANAGER_delResource
);
try
{
boolean
data
=
delResourceRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
delResourceParam
,
BasicConfig
.
MANAGER_delResource
,
"删除权益失败"
,
delResourceRes
.
body
().
asString
()));
}
catch
(
NullPointerException
e
){
e
.
printStackTrace
();
Assert
.
fail
(
network
.
message
(
delResourceParam
,
BasicConfig
.
MANAGER_delResource
,
"获取数据失败"
,
delResourceRes
.
body
().
asString
()));
}
}
}
//
@Test(description = "删除权益", priority = 2)
//
public void 删除权益() {
//
for (int resourceId : Arrays.asList(LiveMaterial.resourceId, LiveMaterial.termResourceId, LiveMaterial.freeResourceId, LiveMaterial.picResourceId)){
//
System.out.println(resourceId);
//
Map<String, Object> delResourceParam = new HashMap<>();
//
delResourceParam.put("id", resourceId);
//
Response delResourceRes = network.postResponse(delResourceParam, BasicConfig.MANAGER_delResource);
//
try {
//
boolean data = delResourceRes.jsonPath().getBoolean("data");
//
System.out.println(data);
//
Assert.assertTrue(data, network.message(delResourceParam, BasicConfig.MANAGER_delResource, "删除权益失败", delResourceRes.body().asString()));
//
}catch (NullPointerException e){
//
e.printStackTrace();
//
Assert.fail(network.message(delResourceParam, BasicConfig.MANAGER_delResource, "获取数据失败", delResourceRes.body().asString()));
//
}
//
}
//
}
...
...
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
e67c0126
...
...
@@ -68,7 +68,7 @@ public class Lottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
connectSuccessParam
,
BasicConfig
.
USER_connectSuccess
,
"访客到场请求失败"
,
response
.
body
().
asString
()));
}
/*
@Test
(
description
=
"访客A抽奖查询抽奖活动弹层"
,
priority
=
5
)
public
void
访客
A
抽奖查询抽奖活动弹层
()
{
visitorAuth
();
...
...
@@ -1473,7 +1473,7 @@ public class Lottery implements Authorization {
throw
e
;
}
}
*/
}
...
...
src/test/java/com/kjj/cases/live/lotteryCode/LotteryCode.java
View file @
e67c0126
...
...
@@ -54,7 +54,6 @@ public class LotteryCode implements Authorization {
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
/*
@Test
(
description
=
"访客A获取直播所有的订阅消息模板"
,
priority
=
4
)
public
void
访客
A
获取直播所有的订阅消息模板
()
{
visitorAuth
();
...
...
@@ -243,7 +242,7 @@ public class LotteryCode implements Authorization {
System
.
out
.
println
(
type
);
Assert
.
assertTrue
(
type
==
3
,
network
.
message
(
tokenParam
,
BasicConfig
.
MOBILE_Token
,
"未获取到绑定结果"
,
tokenRes
.
body
().
asString
()));
}
*/
}
src/test/liveTestNG.xml
View file @
e67c0126
This diff is collapsed.
Click to expand it.
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