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
07383f9d
Commit
07383f9d
authored
Aug 05, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序分享增加短链
parent
7965fb6c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
Agent.java
src/test/java/com/kjj/cases/live/agent/Agent.java
+19
-0
SaveLive.java
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
+1
-1
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+1
-1
No files found.
src/test/java/com/kjj/cases/live/agent/Agent.java
View file @
07383f9d
...
@@ -8,6 +8,7 @@ import com.kjj.cases.admin.Authorization;
...
@@ -8,6 +8,7 @@ import com.kjj.cases.admin.Authorization;
import
com.kjj.config.BasicConfig
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.constants.LiveConstants
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.JsonUtil
;
import
com.kjj.utils.ThreadSleepUtils
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.apache.commons.lang3.RandomUtils
;
import
org.testng.Assert
;
import
org.testng.Assert
;
...
@@ -440,6 +441,24 @@ public class Agent implements Authorization {
...
@@ -440,6 +441,24 @@ public class Agent implements Authorization {
}
}
@Test
(
description
=
"获取小程序短链"
,
priority
=
28
)
public
void
获取小程序短链
()
{
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
ENCODE_LIVE_ID
.
getKey
()));
params
.
put
(
"shortType"
,
2
);
Response
response
=
null
;
for
(
int
i
=
0
;
i
<
10
;
i
++)
{
response
=
network
.
postResponse
(
params
,
MOBILE_getShortUrl
);
String
data
=
response
.
jsonPath
().
getString
(
"data"
);
System
.
out
.
println
(
data
);
if
(
data
!=
null
)
return
;
}
Assert
.
fail
(
network
.
message
(
params
,
BasicConfig
.
MOBILE_getShortUrl
,
"获取小程序短链失败"
,
response
.
body
().
asString
()));
}
}
}
...
...
src/test/java/com/kjj/cases/live/liveConfig/SaveLive.java
View file @
07383f9d
...
@@ -49,7 +49,7 @@ public class SaveLive implements Authorization {
...
@@ -49,7 +49,7 @@ public class SaveLive implements Authorization {
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
Params
.
put
(
"noticeTime"
,
noticeTime
);
Params
.
put
(
"noticeTime"
,
noticeTime
);
Params
.
put
(
"broadcastTime"
,
broadcastTime
);
Params
.
put
(
"broadcastTime"
,
broadcastTime
);
Params
.
put
(
"shareContent"
,
"自动化直播"
);
Params
.
put
(
"shareContent"
,
"自动化直播
#{shortLink}
"
);
Params
.
put
(
"shelfStatus"
,
2
);
Params
.
put
(
"shelfStatus"
,
2
);
Params
.
put
(
"secondPoster"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg"
);
Params
.
put
(
"secondPoster"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg"
);
Params
.
put
(
"regionType"
,
2
);
Params
.
put
(
"regionType"
,
2
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
07383f9d
...
@@ -470,7 +470,7 @@ public class BasicConfig {
...
@@ -470,7 +470,7 @@ public class BasicConfig {
public
static
final
String
MOBILE_pasterOn
=
MOBILE_HOST
+
"/conf/live/push/pasterOn"
;
public
static
final
String
MOBILE_pasterOn
=
MOBILE_HOST
+
"/conf/live/push/pasterOn"
;
public
static
final
String
MOBILE_pasterInfo
=
MOBILE_HOST
+
"/clue/paster/info"
;
public
static
final
String
MOBILE_pasterInfo
=
MOBILE_HOST
+
"/clue/paster/info"
;
public
static
final
String
MOBILE_pasterOff
=
MOBILE_HOST
+
"/conf/live/push/pasterOff"
;
public
static
final
String
MOBILE_pasterOff
=
MOBILE_HOST
+
"/conf/live/push/pasterOff"
;
public
static
final
String
MOBILE_getShortUrl
=
MOBILE_HOST
+
"/kjy/live/share/short/getShortUrl"
;
//投票
//投票
...
...
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