Commit 1f1079e8 by zhangying

补充启动欢拓的接口

parent 7889c95b
package com.live.cases.saasTeacher;
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;
/**
* @author zhangying
* @date 2021/3/5 4:40 下午
*/
public class TestCourseLaunch extends XMBaseTest {
@BeforeMethod
public void beforeTest() {
xmAppApi.setApiModule(ApiModele.CloudClass_apollo) // API 所属模块 必传 读取配置文件config.properties配置的api地址
.setApiName("API_courseLaunch") // API 名称 必传
.setLoginUser("zhangy-T") // http 接口,测试账号 必传
.setTerminal(Terminal.B); // 所属端位(B端,C端,M端等, 必传)
dal.setCase_owner("张莹");
super.beforeTest();
}
@Test
public void testCourseLaunch(){
JSONObject jsonObject = new JSONObject();
jsonObject.put("liveCourseId","1333692400423833602");
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true);
JSONObject jsonbody = xmAppApi.getBodyInJSON();
System.out.println("jsonbody =="+jsonbody);
Assert.assertEquals("true",jsonbody.getString("success"));
Assert.assertNotNull(jsonbody.getJSONObject("result").getString("protocol"));
}
}
......@@ -62,4 +62,9 @@
<package name="com.live.cases.myClassAPP"></package>
</packages>
</test>
<test name="saasTeacher" preserve-order="true" verbose="3">
<packages>
<package name="com.live.cases.saasTeacher"></package>
</packages>
</test>
</suite>
\ No newline at end of file
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