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
4b1df287
Commit
4b1df287
authored
Mar 08, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8102140c
af060025
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
215 additions
and
1042 deletions
+215
-1042
LiveMaterial.java
src/test/java/com/kjj/cases/live/LiveMaterial.java
+4
-6
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+23
-15
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+3
-1
liveTestNG.xml
src/test/liveTestNG.xml
+5
-5
report.html
test-output/report.html
+180
-1015
No files found.
src/test/java/com/kjj/cases/live/LiveMaterial.java
View file @
4b1df287
...
...
@@ -366,20 +366,18 @@ public class LiveMaterial implements AdminAuthorization {
Map
<
String
,
Object
>
testParam
=
new
HashMap
<>();
testParam
.
put
(
"companyId"
,
101
);
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
(
"resourceImg"
,
"https://yun.dui88.com/kjy/image/20210306/1615033315608.jpeg"
);
testParam
.
put
(
"resourceTitle"
,
"秒薪测试"
);
testParam
.
put
(
"saleButtonTitle"
,
"saleButtonTitle"
);
testParam
.
put
(
"testType"
,
1
);
testParam
.
put
(
"tradeIntroducePictures"
,
"https://yun.dui88.com/kjy/image/20210306/1615040918512.jpeg"
);
Response
testRes
=
network
.
postResponse
(
testParam
,
BasicConfig
.
MANAGER_FREE
);
Response
testRes
=
network
.
postResponse
(
testParam
,
BasicConfig
.
MANAGER_TEST
);
Object
data15
=
testRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data15
);
Assert
.
assertNotNull
(
data15
,
network
.
message
(
testParam
,
BasicConfig
.
MANAGER_
FREE
,
"新增免费资料
失败"
,
testRes
.
body
().
asString
()));
Assert
.
assertNotNull
(
data15
,
network
.
message
(
testParam
,
BasicConfig
.
MANAGER_
TEST
,
"新增秒薪
失败"
,
testRes
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
4b1df287
...
...
@@ -51,6 +51,18 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertNotNull
(
liveID
,
network
.
message
(
saveAndUpdateParam
,
BasicConfig
.
MANAGER_SAVEANDUPDATE
,
"新增直播失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"查询直播配置"
,
priority
=
2
)
public
void
查询直播配置
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"liveId"
,
liveID
);
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
MANAGER_GETCONFDETAIL
);
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_GETCONFDETAIL
,
"查询配置失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"单场红包配置"
,
priority
=
3
)
public
void
单场红包配置
()
{
...
...
@@ -78,23 +90,19 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertTrue
(
data1
,
network
.
message
(
saveOrUpdateShowAmountParam
,
BasicConfig
.
MANAGER_SAVEORUPDATESHOWEAMOUNT
,
"展示红包配置失败"
,
saveOrUpdateShowAmountRes
.
body
().
asString
()));
}
@Test
(
description
=
"互动问题"
,
priority
=
5
)
@Test
(
description
=
"互动问题"
,
priority
=
7
)
public
void
互动问题
()
{
Map
<
String
,
Object
>
saveOrUpdateParam
=
new
HashMap
<>();
saveOrUpdateParam
.
put
(
"liveId"
,
liveID
);
List
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
290L
);
ids
.
add
(
291L
);
ids
.
add
(
292L
);
ids
.
add
(
293L
);
saveOrUpdateParam
.
put
(
"ids"
,
ids
);
Response
saveOrUpdateRes
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE
);
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"liveId"
,
liveID
);
param
.
put
(
"ids"
,
Arrays
.
asList
(
293
,
294
));
Response
saveOrUpdateRes
=
network
.
postResponse
(
param
,
BasicConfig
.
MANAGER_SAVEORUPDATE
);
boolean
data2
=
saveOrUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assertTrue
(
data2
,
network
.
message
(
saveOrUpdateP
aram
,
BasicConfig
.
MANAGER_SAVEORUPDATE
,
"互动问题配置失败"
,
saveOrUpdateRes
.
body
().
asString
()));
Assert
.
assertTrue
(
data2
,
network
.
message
(
p
aram
,
BasicConfig
.
MANAGER_SAVEORUPDATE
,
"互动问题配置失败"
,
saveOrUpdateRes
.
body
().
asString
()));
}
@Test
(
description
=
"投票"
,
priority
=
6
)
@Test
(
description
=
"投票"
,
priority
=
20
)
public
void
投票
()
{
Map
<
String
,
Object
>
saveOrUpdate2Param
=
new
HashMap
<>();
...
...
@@ -110,8 +118,8 @@ public class SaveAndUpdate implements AdminAuthorization {
Assert
.
assertTrue
(
data3
,
network
.
message
(
saveOrUpdate2Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE2
,
"投票配置失败"
,
saveOrUpdate2Res
.
body
().
asString
()));
}
@Test
(
description
=
"
产品资料"
,
priority
=
7
)
public
void
产品资料
()
{
@Test
(
description
=
"
直播间权益"
,
priority
=
5
)
public
void
直播间权益
()
{
Map
<
String
,
Object
>
saveOrUpdate3Param
=
new
HashMap
<>();
saveOrUpdate3Param
.
put
(
"liveId"
,
liveID
);
...
...
@@ -120,7 +128,7 @@ public class SaveAndUpdate implements AdminAuthorization {
ids2
.
add
(
356L
);
ids2
.
add
(
357L
);
ids2
.
add
(
358L
);
ids2
.
add
(
359L
);
//
ids2.add(359L);
saveOrUpdate3Param
.
put
(
"ids"
,
ids2
);
Response
saveOrUpdate3Res
=
network
.
postResponse
(
saveOrUpdate3Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE3
);
boolean
data4
=
saveOrUpdate3Res
.
jsonPath
().
getBoolean
(
"data"
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
4b1df287
...
...
@@ -4,7 +4,7 @@ public class BasicConfig {
public
static
int
apiCount
;
//接口数量统计
// 是否开启钉钉机器人推送
public
static
final
boolean
isPushReport
=
fals
e
;
//true
public
static
final
boolean
isPushReport
=
tru
e
;
//true
// 代理人微信昵称
public
static
final
String
WECHAT_NAME
=
"客集集-梦晨"
;
//true
...
...
@@ -106,6 +106,8 @@ public class BasicConfig {
public
static
final
String
MANAGER_FREE
=
MANAGER_HOST
+
"/kjy/manager/live/resource/saveOrUpdateFree"
;
public
static
final
String
MANAGER_TEST
=
MANAGER_HOST
+
"/kjy/manager/live/resource/saveOrUpdateTest"
;
// *************** 素材ID ***************
public
static
final
String
ARTICLE_CONTENTID
=
"Kj21NjM4NDc"
;
...
...
src/test/liveTestNG.xml
View file @
4b1df287
...
...
@@ -7,11 +7,11 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"直播素材"
>
<classes
>
<class
name=
"com.kjj.cases.live.LiveMaterial"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="直播素材">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.LiveMaterial"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
</suite>
test-output/report.html
View file @
4b1df287
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