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
56f2f1db
Commit
56f2f1db
authored
Mar 05, 2021
by
zhangying
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
667f052a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
39 deletions
+51
-39
src/main/java/com/live/cases/liveClientT/cloundClass/TestCourseLaunch.java
+51
-39
No files found.
src/main/java/com/live/cases/liveClientT/cloundClass/TestCourseLaunch.java
View file @
56f2f1db
//package com.live.cases.apollo;
//
//import com.alibaba.fastjson.JSONObject;
//import com.live.enums.ApiModele;
//import com.live.enums.RequestType;
//import com.live.enums.Terminal;
//import com.live.utils.XMBaseTest;
//import org.testng.annotations.BeforeMethod;
//import org.testng.annotations.Test;
//
//
///**
// * title获取直播器启动协议
// * by张雨朦
// */
//
//public class TestCourseLaunch extends XMBaseTest {
//
// @BeforeMethod
// public void beforeTest(){
// xmAppApi.setApiModule(ApiModele.CloudClass_apollo)
// .setApiName("API_courseLaunch")
// .setLoginUser("zhangyumeng_huantuo")
// .setTerminal(Terminal.B);
// super.beforeTest();
// }
//
// @Test
// public void courseLaunch(){
//
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("liveCourseId","1333692400423833602");
//
// xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true);
// JSONObject responseRes = xmAppApi.getBodyInJSON();
//
// }
//
//}
package
com
.
live
.
cases
.
liveClientT
.
cloundClass
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
static
org
.
testng
.
Assert
.
assertTrue
;
/**
* title获取直播器启动协议
* by张雨朦
*/
public
class
TestCourseLaunch
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_apollo
)
.
setApiName
(
"API_courseLaunch"
)
.
setLoginUser
(
"zhangyumeng_huantuo"
)
//欢拓的账号测试
.
setTerminal
(
Terminal
.
B
);
super
.
beforeTest
();
}
@Test
public
void
courseLaunch
(){
String
protocol
=
"huantuo://start#eyJiaWQiOiI0MzU5NjUiLCJldCI6MTYxNzQ0NTY5NSwiZXh0Ijp7ImNvdXJzZV9pZCI6MTQ0MjU3OX0sInNpZ24iOiI1ZTE5Zjk3YzRkZDlmNTk3YTJiNTk4NmI0OWY2OWRkZiJ9"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"liveCourseId"
,
"1333692400423833602"
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
responseRes
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"responseRes =="
+
responseRes
);
// Assert.assertTrue(responseRes.getJSONObject("result").values().contains("protocol"));
Assert
.
assertEquals
(
"true"
,
responseRes
.
getString
(
"success"
));
Assert
.
assertEquals
(
"操作成功!"
,
responseRes
.
getString
(
"message"
));
Assert
.
assertEquals
(
"200"
,
responseRes
.
getString
(
"code"
));
// Assert.assertEquals( responseRes.getJSONObject("result").getString("protocol"),protocol);
}
}
zhangying
@zhangying
mentioned in commit
e3ceaa4d
Mar 05, 2021
mentioned in commit
e3ceaa4d
mentioned in commit e3ceaa4d9d02d318bdc4329c810966a2d4b9657e
Toggle commit list
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