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
a4b781d8
Commit
a4b781d8
authored
Apr 07, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a04efa8d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
309 additions
and
41 deletions
+309
-41
Video.java
src/test/java/com/kjj/cases/basics/Video.java
+0
-5
AdminAuthorization.java
src/test/java/com/kjj/cases/live/AdminAuthorization.java
+13
-2
DesignatedWinner.java
src/test/java/com/kjj/cases/live/DesignatedWinner.java
+69
-13
User.java
src/test/java/com/kjj/cases/live/User.java
+210
-10
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+12
-0
liveTestNG.xml
src/test/liveTestNG.xml
+5
-11
No files found.
src/test/java/com/kjj/cases/basics/Video.java
deleted
100644 → 0
View file @
a04efa8d
package
com
.
kjj
.
cases
.
basics
;
public
class
Video
{
}
src/test/java/com/kjj/cases/live/AdminAuthorization.java
View file @
a4b781d8
...
...
@@ -24,14 +24,25 @@ public interface AdminAuthorization {
// 创建用户 并传到network里
network
.
agentCookies
.
put
(
"authKey"
,
AUTH_KEY
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
AUTH_KEY
);
}
/**
* 访客授权
* 访客
(嘿保险)
授权
*/
}
default
void
visitorAuth
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY
);
}
/**
* 访客(🍗)授权
*/
default
void
visitorAuth2
()
{
network
.
agentCookies
.
put
(
"authKey"
,
VISITORKEY1
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
VISITORKEY1
);
}
}
src/test/java/com/kjj/cases/live/DesignatedWinner.java
View file @
a4b781d8
...
...
@@ -14,7 +14,20 @@ public class DesignatedWinner implements AdminAuthorization{
agentAuth
();
}
@Test
(
description
=
"查询指定中奖配置"
,
priority
=
1
)
@Test
(
description
=
"获取直播状态"
,
priority
=
1
)
public
void
获取直播状态
()
{
Map
<
String
,
Object
>
astatusParam
=
new
HashMap
<>();
astatusParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
astatusRes
=
network
.
getResponse
(
astatusParam
,
BasicConfig
.
MOBILE_status
);
Map
<
String
,
Object
>
data
=
astatusRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
int
liveStatus
=
(
int
)
data
.
get
(
"liveStatus"
);
boolean
lotteryFlag
=
(
boolean
)
data
.
get
(
"lotteryFlag"
);
Assert
.
assertEquals
(
liveStatus
,
1
,
network
.
message
(
astatusParam
,
BasicConfig
.
MOBILE_status
,
"直播状态查询失败"
,
astatusRes
.
body
().
asString
()));
Assert
.
assertTrue
(
lotteryFlag
,
network
.
message
(
astatusParam
,
BasicConfig
.
MOBILE_status
,
"抽奖标记为false"
,
astatusRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询指定中奖配置"
,
priority
=
2
)
public
void
查询指定中奖配置
()
{
Map
<
String
,
Object
>
awardConfParam
=
new
HashMap
<>();
awardConfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
...
...
@@ -23,20 +36,63 @@ public class DesignatedWinner implements AdminAuthorization{
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
awardConfParam
,
BasicConfig
.
MOBILE_AgentSpecifyAwardConf
,
"中奖配置查询失败"
,
awardConfRes
.
body
().
asString
()));
}
@Test
(
description
=
"查询指定中奖用户列表"
,
priority
=
3
)
public
void
查询指定中奖用户列表
()
{
Map
<
String
,
Object
>
UserSelectListfParam
=
new
HashMap
<>();
UserSelectListfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
UserSelectListRes
=
network
.
getResponse
(
UserSelectListfParam
,
BasicConfig
.
MOBILE_SpecifyAwardUserSelectList
);
Object
data
=
UserSelectListRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
UserSelectListfParam
,
BasicConfig
.
MOBILE_SpecifyAwardUserSelectList
,
"查询指定中奖用户失败"
,
UserSelectListRes
.
body
().
asString
()));
}
@Test
(
description
=
"代理人指定访客中奖表单提交"
,
priority
=
4
)
public
void
代理人指定访客中奖表单提交
()
{
Map
<
String
,
Object
>
SubmitParam
=
new
HashMap
<>();
SubmitParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
SubmitParam
.
put
(
"visitorId"
,
"Kj22NzI2Mw"
);
Response
SubmitRes
=
network
.
postResponse
(
SubmitParam
,
BasicConfig
.
MOBILE_AgentSpecifyAwardSubmit
);
Object
data
=
SubmitRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
SubmitParam
,
BasicConfig
.
MOBILE_AgentSpecifyAwardSubmit
,
"代理人指定中奖提交失败"
,
SubmitRes
.
body
().
asString
()));
}
// @Test(description = "代理人指定访客中奖表单提交", priority = 2)
// public void 代理人指定访客中奖表单提交() {
// Map<String, Object> SubmitParam = new HashMap<>();
// SubmitParam.put("liveId",LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
// SubmitParam.put("visitorId","Kj21NDE0NTU");
//
// Response SubmitRes = network.getResponse(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit);
// Object data = SubmitRes.jsonPath().getJsonObject("data");
// System.out.println(data);
// Assert.assertNotNull(data, network.message(SubmitParam, BasicConfig.MOBILE_AgentSpecifyAwardSubmit, "代理人指定中奖失败", SubmitRes.body().asString()));
//
// }
@Test
(
description
=
"被代理人指定中奖的用户列表"
,
priority
=
5
)
public
void
被代理人指定中奖的用户列表
()
{
Map
<
String
,
Object
>
AwardUserListParam
=
new
HashMap
<>();
AwardUserListParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
AwardUserListRes
=
network
.
getResponse
(
AwardUserListParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardUserList
);
Object
data
=
AwardUserListRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardUserListParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardUserList
,
"查询指定中奖用户列表失败"
,
AwardUserListRes
.
body
().
asString
()));
}
@Test
(
description
=
"代理人指定中奖信息查询"
,
priority
=
6
)
public
void
代理人指定中奖信息查询
()
{
Map
<
String
,
Object
>
AwardInfoParam
=
new
HashMap
<>();
AwardInfoParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
AAwardInfoRes
=
network
.
getResponse
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
);
Object
data
=
AAwardInfoRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardInfoParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardInfo
,
"查询指定中奖信息失败"
,
AAwardInfoRes
.
body
().
asString
()));
}
@Test
(
description
=
"代理人指定中奖配置查询"
,
priority
=
7
)
public
void
代理人指定中奖配置查询
()
{
Map
<
String
,
Object
>
AwardConfParam
=
new
HashMap
<>();
AwardConfParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
Response
AwardConfRes
=
network
.
getResponse
(
AwardConfParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardConf
);
Object
data
=
AwardConfRes
.
jsonPath
().
getJsonObject
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertNotNull
(
data
,
network
.
message
(
AwardConfParam
,
BasicConfig
.
MOBILE_agentSpecifyAwardConf
,
"代理人指定中奖配置查询失败"
,
AwardConfRes
.
body
().
asString
()));
}
...
...
src/test/java/com/kjj/cases/live/User.java
View file @
a4b781d8
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
a4b781d8
...
...
@@ -14,6 +14,8 @@ public class BasicConfig {
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKorVWS9R85xTeuUZzyc2boHSYWYU56ttSUbcAb9ngEb3LJBB3qZ7a9eCkEoPV5yu"
;
//直播访客 (嘿 保险)
public
static
String
VISITORKEY
=
"LEH7epeHVDJWzhZ6DiexTHnfZY2NrKnNHmHY52FxaDfigK3U4NQpLsQrodQUPUXwmumQ1kr3xsfZoGw7cEswYryWfUtMW"
;
//直播访客 (🍗)
public
static
String
VISITORKEY1
=
"LEH7epeHVDJWzhZ6DiexTHnsYWTEo46qxbPUiJ1xnTqmCJPHLGsoTuy5C2psyH1j5t5ppr3BNQLrBXrBmsmJUDJcXSivb"
;
// 基础线代理人 TKU
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm"
;
// 基础线访客 TKU
...
...
@@ -36,6 +38,7 @@ public class BasicConfig {
//手机端地址
public
static
final
String
MOBILE_HOST
=
"https://live.duibatest.com.cn"
;
public
static
final
String
MOBILE_HOST1
=
"https://kjj.m.duibatest.com.cn"
;
// *************** 主播端 ***************
public
static
final
String
ANCHOR_OPEN
=
MOBILE_HOST
+
"/conf/live/open"
;
...
...
@@ -52,6 +55,7 @@ public class BasicConfig {
public
static
final
String
USER_END
=
MOBILE_HOST
+
"/kjy/live/assist/lottery/end"
;
public
static
final
String
USER_savePoster
=
MOBILE_HOST
+
"/kjy/live/user/share/savePoster"
;
public
static
final
String
USER_myCount
=
MOBILE_HOST
+
"/kjy/live/user/lottery/myCount"
;
public
static
final
String
USER_wxIdAllList
=
MOBILE_HOST1
+
"/kjy/mp/msg/config/live/user/wxIdAllList"
;
// *************** 直播管理端 ***************
public
static
final
String
MANAGER_SAVEANDUPDATE
=
MANAGER_HOST
+
"/kjy/manager/live/pre/conf/saveAndUpdate"
;
...
...
@@ -104,6 +108,14 @@ public class BasicConfig {
public
static
final
String
MOBILE_GETSHARESIGN
=
MOBILE_HOST
+
"/kjy/live/getShareSign"
;
public
static
final
String
MOBILE_binding
=
MOBILE_HOST
+
"/clue/invitation/binding"
;
public
static
final
String
MOBILE_AgentSpecifyAwardConf
=
MOBILE_HOST
+
"/kjy/live/agent/agentSpecifyAwardConf"
;
public
static
final
String
MOBILE_Token
=
MOBILE_HOST
+
"/clue/invitation/token"
;
public
static
final
String
MOBILE_Code
=
MOBILE_HOST
+
"/clue/invitation/code"
;
public
static
final
String
MOBILE_MyLotteryCode
=
MOBILE_HOST
+
"/kjy/live/lottery/myLotteryCode"
;
public
static
final
String
MOBILE_SpecifyAwardUserSelectList
=
MOBILE_HOST
+
"/kjy/live/agent/specifyAwardUserSelectList"
;
public
static
final
String
MOBILE_status
=
MOBILE_HOST
+
"/index/status"
;
public
static
final
String
MOBILE_agentSpecifyAwardUserList
=
MOBILE_HOST
+
"/kjy/live/agent/agentSpecifyAwardUserList"
;
public
static
final
String
MOBILE_agentSpecifyAwardInfo
=
MOBILE_HOST
+
"/kjy/live/agent/agentSpecifyAwardInfo"
;
public
static
final
String
MOBILE_agentSpecifyAwardConf
=
MOBILE_HOST
+
"/kjy/live/agent/agentSpecifyAwardConf"
;
//***************直播素材*****************
public
static
final
String
MANAGER_SAVEORUPDATE6
=
MANAGER_HOST
+
"/kjy/manager/conf/base/welfare/saveOrUpdate"
;
...
...
src/test/liveTestNG.xml
View file @
a4b781d8
...
...
@@ -32,15 +32,14 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"
助播-开启直播
"
>
<test
preserve-order=
"true"
name=
"
指定中奖
"
>
<classes>
<class
name=
"com.kjj.cases.live.
OpenLive
"
/>
<class
name=
"com.kjj.cases.live.
DesignatedWinner
"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"指定中奖"
>
<test
preserve-order=
"true"
name=
"助播-开启直播"
>
<classes>
<class
name=
"com.kjj.cases.live.DesignatedWinner
"
/>
<class
name=
"com.kjj.cases.live.OpenLive
"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"访客领取资料"
>
...
...
@@ -54,15 +53,10 @@
</classes>
</test>
<test
preserve-order=
"true"
name=
"助播-结束直播"
>
<classes>
<class
name=
"com.kjj.cases.live.CloseLive"
/>
</classes>
</test>
</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