Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-autotest-live
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-autotest-live
Commits
2d5afed3
Commit
2d5afed3
authored
Nov 30, 2020
by
zhangyumeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取直播器启动协议
parent
d2cb9092
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
7 deletions
+119
-7
src/main/java/com/live/cases/fileManage/testDelCommonFolder.java
+2
-1
src/main/java/com/live/cases/largeClassLive/TestCourseLaunch.java
+49
-0
src/main/java/com/live/enums/ApiModele.java
+4
-0
src/main/java/com/live/utils/GetLiveCourseId.java
+36
-0
src/main/resources/apicase/api-file-b.json
+1
-2
src/main/resources/apicase/apollo.json
+14
-1
src/main/resources/config.properties
+2
-2
src/main/resources/parameter.json
+11
-1
No files found.
src/main/java/com/live/cases/fileManage/testDelCommonFolder.java
View file @
2d5afed3
...
...
@@ -7,6 +7,7 @@ import com.live.enums.RequestType;
import
com.live.enums.Terminal
;
import
com.xiaomai.utils.XMBaseTest
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -26,7 +27,7 @@ public class testDelCommonFolder extends XMBaseTest {
super
.
beforeTest
();
}
// @Test
@Test
(
enabled
=
false
)
public
void
testDelCommonFolderList
(){
GetFolderData
testCommonFolderList
=
new
GetFolderData
();
String
id
=
testCommonFolderList
.
getCommonFolderListFirstId
();
...
...
src/main/java/com/live/cases/largeClassLive/TestCourseLaunch.java
0 → 100644
View file @
2d5afed3
package
com
.
live
.
cases
.
largeClassLive
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.GetLiveCourseId
;
import
com.sun.org.apache.xerces.internal.xs.StringList
;
import
com.xiaomai.utils.XMBaseTest
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* title获取直播器启动协议
* by张雨朦
*/
public
class
TestCourseLaunch
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_B_Apollo
)
.
setApiName
(
"API_courseLaunch"
)
.
setLoginUser
(
"zhangyumeng_huantuo"
)
.
setTerminal
(
Terminal
.
B
);
super
.
beforeTest
();
}
@Test
public
void
courseLaunch
(){
GetLiveCourseId
liveCourseId
=
new
GetLiveCourseId
();
String
getLiveCourseId
=
liveCourseId
.
getLiveCourseId
();
List
StringList
=
new
ArrayList
();
StringList
.
add
(
getLiveCourseId
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"liveCourseId"
,
getLiveCourseId
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
}
}
src/main/java/com/live/enums/ApiModele.java
View file @
2d5afed3
...
...
@@ -23,4 +23,8 @@ public class ApiModele {
public
static
String
CloudClass_C_CheckAuthorize
=
"CloudClass_C_CheckAuthorize"
;
public
static
String
CloudClass_B_commonFolderList
=
"cloudClass_B_commonFolderList"
;
public
static
String
CloudClass_B_Apollo
=
"cloudclass_apollo_api"
;
}
src/main/java/com/live/utils/GetLiveCourseId.java
0 → 100644
View file @
2d5afed3
package
com
.
live
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* 获取大班直播课程id
* by 张雨朦
*/
public
class
GetLiveCourseId
extends
XMBaseTest
{
public
String
getLiveCourseId
(){
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_B_Apollo
)
.
setApiName
(
"API_getLargeClassLiveList"
)
.
setTerminal
(
Terminal
.
B
);
super
.
beforeDataRequest
();
JSONObject
jsonObject
=
new
JSONObject
();
//jsonObject.put("courseState","STARTING"); 获取欢拓课程列表,没有courseState参数,普通机构有这个参数
jsonObject
.
put
(
"current"
,
"1"
);
jsonObject
.
put
(
"size"
,
"10"
);
jsonObject
.
put
(
"instId"
,
dataApi
.
getLoginInfo
().
getInstId
());
dataApi
.
doRequest
(
RequestType
.
JSON
,
dataparams
,
jsonObject
.
toJSONString
(),
dataheadrs
).
assetsSuccess
(
true
);
JSONObject
responseRes
=
dataApi
.
getBodyInJSON
();
String
liveCourseID
=
responseRes
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"liveCourseId"
);
return
liveCourseID
;
}
}
src/main/resources/apicase/api-file-b.json
View file @
2d5afed3
...
...
@@ -83,4 +83,4 @@
"apiName"
:
"删除公共文件"
,
"desc"
:
"删除公共文件"
}
}
\ No newline at end of file
}
src/main/resources/apicase/apollo.json
View file @
2d5afed3
...
...
@@ -61,5 +61,17 @@
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"判断是否有备课本权限"
,
"desc"
:
"判断是否有备课本权限"
}
},
"API_courseLaunch"
:
{
"apiPath"
:
"/apollo/public/businessLive/courseLaunch"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"获取直播器启动协议"
,
"desc"
:
"获取直播器启动协议"
},
"API_getLargeClassLiveList"
:{
"apiPath"
:
"/apollo/public/businessLive/getLargeClassLiveList"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"获取大班直播课列表"
,
"desc"
:
"获取大班直播课列表"
}
}
\ No newline at end of file
src/main/resources/config.properties
View file @
2d5afed3
...
...
@@ -29,10 +29,10 @@ b_web_login_param = p=w&v=v5.4.0&userType=B
b_app_login_paran
=
p=iOS&xmversion=5.0&b=552595&userType=B&saasV=5.0&vn=5.4.3&deviceVersion=13.4.1&v=5.4.3
//cloudclass
api
//
B端创建课程
#
B端创建课程
cloudclass_createBigLiveCourse
=
/src/main/resources/apicase/api-b.json
//
c端校验直播课程和学员是否有观看的权限
#
c端校验直播课程和学员是否有观看的权限
cloudClass_B_commonFolderList
=
/src/main/resources/apicase/api-b.json
...
...
src/main/resources/parameter.json
View file @
2d5afed3
...
...
@@ -194,7 +194,6 @@
},
"zhangYuM_b"
:
{
"rc"
:
{
"机构id"
:
""
,
"instId"
:
"1289141540495237122"
,
"accountNo"
:
"15656960812"
,
"certificate"
:
"290112bfbde696fcb91284bba1e2655b"
,
...
...
@@ -213,6 +212,17 @@
"tid"
:
"1323235986786807809"
}
},
"zhangyumeng_huantuo"
:
{
"prod"
:
{
"instId"
:
"1266199405880258562"
,
"accountNo"
:
"15656960812"
,
"certificate"
:
"290112bfbde696fcb91284bba1e2655b"
,
"aid"
:
"1333246095048249346"
,
"uid"
:
"1323235986807779330"
,
"userType"
:
"B"
,
"tid"
:
"1323235986786807809"
}
},
"zhangy-app-c"
:
{
"prod"
:
{
"accountNo"
:
"15068165765"
,
...
...
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