Commit cf36b632 by zhangying

review

parent 1f1079e8
...@@ -5,6 +5,7 @@ import com.live.enums.ApiModele; ...@@ -5,6 +5,7 @@ import com.live.enums.ApiModele;
import com.live.enums.RequestType; import com.live.enums.RequestType;
import com.live.enums.Terminal; import com.live.enums.Terminal;
import com.live.utils.XMBaseTest; import com.live.utils.XMBaseTest;
import com.live.xmutils.GetLiveCourseData;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test; import org.testng.annotations.Test;
...@@ -24,11 +25,16 @@ public class TestCourseLaunch extends XMBaseTest { ...@@ -24,11 +25,16 @@ public class TestCourseLaunch extends XMBaseTest {
super.beforeTest(); super.beforeTest();
} }
@Test @Test(description = "启动欢拓直播客户端")
public void testCourseLaunch(){ public void testCourseLaunch() throws InterruptedException {
GetLiveCourseData getLiveCourseData = new GetLiveCourseData();
JSONObject getLargeCourseData = getLiveCourseData.createLargeClassLive();
String liveCourseId = getLargeCourseData.getString("result");
System.out.println("liveCourseId ="+liveCourseId);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("liveCourseId","1333692400423833602"); jsonObject.put("liveCourseId",liveCourseId);
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true); xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true);
JSONObject jsonbody = xmAppApi.getBodyInJSON(); JSONObject jsonbody = xmAppApi.getBodyInJSON();
......
...@@ -94,7 +94,7 @@ public class GetLiveCourseData extends XMBaseTest { ...@@ -94,7 +94,7 @@ public class GetLiveCourseData extends XMBaseTest {
Map bodyMap = new HashMap(); Map bodyMap = new HashMap();
bodyMap.put("current", 1); bodyMap.put("current", 1);
bodyMap.put("instId", "1235115978015883266"); bodyMap.put("instId", xmAppApi.getLoginInfo().getInstId());
bodyMap.put("size", 10); bodyMap.put("size", 10);
bodyMap.put("courseState", "STARTING"); bodyMap.put("courseState", "STARTING");
String bodydata = JSONObject.toJSONString(bodyMap); String bodydata = JSONObject.toJSONString(bodyMap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment