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
84796c3c
Commit
84796c3c
authored
Mar 17, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
aa65d808
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
20 deletions
+14
-20
AdminAuthorization.java
src/test/java/com/kjj/cases/live/AdminAuthorization.java
+2
-2
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+2
-8
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+4
-4
BaseUtils.java
src/test/java/com/kjj/utils/BaseUtils.java
+6
-6
No files found.
src/test/java/com/kjj/cases/live/AdminAuthorization.java
View file @
84796c3c
...
...
@@ -17,7 +17,7 @@ public interface AdminAuthorization {
default
void
adminAuth
(){
// 创建用户 并传到network里
BasicConfig
.
AUTH_KEY
=
BaseUtils
.
createAuthKey
();
//
BasicConfig.AUTH_KEY = BaseUtils.createAuthKey();
network
.
agentCookies
.
put
(
"authKey"
,
AUTH_KEY
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
AUTH_KEY
);
...
...
@@ -28,7 +28,7 @@ public interface AdminAuthorization {
*/
default
void
agentAuth
(){
// 创建用户 并传到network里
BasicConfig
.
AUTH_KEY
=
BaseUtils
.
agentAuthKey
();
//
BasicConfig.AUTH_KEY = BaseUtils.agentAuthKey();
network
.
agentCookies
.
put
(
"authKey"
,
AUTH_KEY
);
System
.
out
.
println
(
"用户AUTH_KEY:"
+
AUTH_KEY
);
...
...
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
84796c3c
...
...
@@ -8,21 +8,13 @@ import com.kjj.utils.BaseUtils;
import
io.restassured.response.Response
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.*
;
public
class
SaveAndUpdate
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
adminAuth
();
}
public
String
liveID
;
@Test
(
description
=
"创建直播"
,
priority
=
1
)
public
void
创建直播
()
{
...
...
@@ -36,6 +28,8 @@ public class SaveAndUpdate implements AdminAuthorization {
saveAndUpdateParam
.
put
(
"title"
,
"自动化直播"
);
saveAndUpdateParam
.
put
(
"mpShareTitle"
,
"自动化直播"
);
saveAndUpdateParam
.
put
(
"companyId"
,
101
);
saveAndUpdateParam
.
put
(
"agentInviteAuthType"
,
1
);
saveAndUpdateParam
.
put
(
"agentInviteAuthLimitNum"
,
1
);
long
noticeTime
=
DateUtils
.
addHours
(
new
Date
(),
2
).
getTime
();
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
84796c3c
...
...
@@ -4,7 +4,7 @@ public class BasicConfig {
public
static
int
apiCount
;
//接口数量统计
// 是否开启钉钉机器人推送
public
static
final
boolean
isPushReport
=
tru
e
;
//true
public
static
final
boolean
isPushReport
=
fals
e
;
//true
// 代理人微信昵称
public
static
final
String
WECHAT_NAME
=
"嘿保险"
;
//true
...
...
@@ -13,12 +13,12 @@ public class BasicConfig {
public
static
final
String
OPEN_ID
=
"osi5w5ggFiEXk0tPJH9b0KO_XU08"
;
// 直播用户 authkey
public
static
String
AUTH_KEY
=
null
;
public
static
String
AUTH_KEY
=
"LEH7epeHVDJWzhZ6DiexTHnsxqTYbFAJqyMsZZMjY2ByyE2firpRpwm9mdHVU19iqNmyyDTwuCHEYT2URmtEUV7LRD7nU"
;
// 代理人 TKU
//
基础线
代理人 TKU
public
static
String
AGENT_TKU
=
"T3gM31f18jCFEcfoYxvVk1LsF5T1YkcBNDbUaryi3TgvwatuP6mroJjZ2k7iCHjC9Srujh7k311i3vFuZm"
;
// 访客 TKU
//
基础线
访客 TKU
public
static
String
VISITOR_TKU
=
"T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfHcRNmyhTEzEbfmwrGFy5doVEinb1k3SVwreYQE"
;
// 访客的sids
...
...
src/test/java/com/kjj/utils/BaseUtils.java
View file @
84796c3c
...
...
@@ -12,12 +12,12 @@ import static com.kjj.config.BasicConfig.*;
public
class
BaseUtils
{
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
public
static
String
createAuthKey
(){
return
"LEH7epeHVDJWzhZ6DiexTHnsxraeviLJA9bNdknyzwR7cXT557KHZA1Q7zWnN9N2E3vHcFrt8S3xhGApKa3NmE7oaxyXz"
;
}
public
static
String
agentAuthKey
(){
return
"LEH7epeHVDJWzhZ6DiexTHnsxs8JtX5mzCVwq1X5TSe6JEJMzL51umD812fWb8P5rLt5mw9SfPzLp6uwthsFnXAhKCYLq"
;
}
//
public static String createAuthKey(){
//
return "LEH7epeHVDJWzhZ6DiexTHnsxraeviLJA9bNdknyzwR7cXT557KHZA1Q7zWnN9N2E3vHcFrt8S3xhGApKa3NmE7oaxyXz";
//
}
//
public static String agentAuthKey(){
//
return "LEH7epeHVDJWzhZ6DiexTHnsxs8JtX5mzCVwq1X5TSe6JEJMzL51umD812fWb8P5rLt5mw9SfPzLp6uwthsFnXAhKCYLq";
//
}
/**
* 登录管理后台
...
...
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