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
e3ceaa4d
Commit
e3ceaa4d
authored
Mar 05, 2021
by
zhangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "review"
This reverts commit
56f2f1db
parent
56f2f1db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
51 deletions
+39
-51
src/main/java/com/live/cases/liveClientT/cloundClass/TestCourseLaunch.java
+39
-51
No files found.
src/main/java/com/live/cases/liveClientT/cloundClass/TestCourseLaunch.java
View file @
e3ceaa4d
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);
}
}
//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();
//
// }
//
//}
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