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
1ba6576d
Commit
1ba6576d
authored
Feb 25, 2021
by
zhangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增3个case
parent
f3d66f43
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
163 additions
and
1 deletions
+163
-1
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetCourseDay.java
+56
-0
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetOnlyOneClassLiveList.java
+49
-0
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetUserMusicalPlayerAdminList.java
+44
-0
src/main/resources/apicase/apollo.json
+14
-1
No files found.
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetCourseDay.java
0 → 100644
View file @
1ba6576d
package
com
.
live
.
cases
.
liveClientT
.
musicPlay
;
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
java.util.ArrayList
;
import
java.util.List
;
/**
* @author zhangying
* @date 2021/2/25 16:50
*/
public
class
TestGetCourseDay
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_apollo
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getCourseDay"
)
// API 名称 必传
.
setLoginUser
(
"zhangy-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"张莹"
);
super
.
beforeTest
();
}
/**
* 测试乐器陪练课获取当日课表
*/
@Test
public
void
testGetCourseDay
()
{
List
arrayList
=
new
ArrayList
();
arrayList
.
add
(
"SMALL_CLASS_ONLY_ONE"
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"tenantId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"liveType"
,
arrayList
);
jsonObject
.
put
(
"startTime"
,
"1614182400000"
);
jsonObject
.
put
(
"endTime"
,
"1614527999000"
);
jsonObject
.
put
(
"teacherId"
,
xmAppApi
.
getLoginInfo
().
getTid
());
System
.
out
.
println
(
"jsonObject == "
+
jsonObject
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
jsonBody
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
"true"
,
jsonBody
.
getString
(
"success"
));
Assert
.
assertEquals
(
"操作成功!"
,
jsonBody
.
getString
(
"message"
));
}
}
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetOnlyOneClassLiveList.java
0 → 100644
View file @
1ba6576d
package
com
.
live
.
cases
.
liveClientT
.
musicPlay
;
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/2/25 16:26
*/
public
class
TestGetOnlyOneClassLiveList
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_apollo
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getOnlyOneClassLiveList"
)
// API 名称 必传
.
setLoginUser
(
"zhangy-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"张莹"
);
super
.
beforeTest
();
}
/**
* 测试乐器陪练课账户信息
*/
@Test
public
void
testGetOnlyOneClassLiveList
()
{
String
userId
=
"1298871716164775938"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"channel"
,
"XIAOMAI"
);
jsonObject
.
put
(
"current"
,
1
);
jsonObject
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
jsonObject
.
put
(
"size"
,
20
);
jsonObject
.
put
(
"startTime"
,
"1614182400000"
);
jsonObject
.
put
(
"teacherId"
,
xmAppApi
.
getLoginInfo
().
getTid
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
jsonBody
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
"true"
,
jsonBody
.
getString
(
"success"
));
Assert
.
assertEquals
(
"操作成功!"
,
jsonBody
.
getString
(
"message"
));
}
}
src/main/java/com/live/cases/liveClientT/musicPlay/TestGetUserMusicalPlayerAdminList.java
0 → 100644
View file @
1ba6576d
package
com
.
live
.
cases
.
liveClientT
.
musicPlay
;
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/2/25 16:11
*/
public
class
TestGetUserMusicalPlayerAdminList
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_apollo
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_getUserMusicalPlayerAdminList"
)
// API 名称 必传
.
setLoginUser
(
"zhangy-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"张莹"
);
super
.
beforeTest
();
}
/**
* 测试乐器陪练课账户信息
*/
@Test
public
void
testGetUserMusicalPlayerAdminList
()
{
String
userId
=
"1298871716164775938"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
userId
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
jsonBody
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
"true"
,
jsonBody
.
getString
(
"success"
));
Assert
.
assertEquals
(
"操作成功!"
,
jsonBody
.
getString
(
"message"
));
}
}
src/main/resources/apicase/apollo.json
View file @
1ba6576d
...
...
@@ -183,6 +183,18 @@
"apiPath"
:
"/apollo/anon/customerLive/authenticateMqtt"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"客户端MQTT授权"
,
"desc"
:
"客户端MQTT授权"
"desc"
:
"客户端MQTT授权"
,
},
"API_getUserMusicalPlayerAdminList"
:
{
"apiPath"
:
"/apollo/public/apollo/getUserMusicalPlayerAdminList"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"乐器陪练课账户信息"
,
"desc"
:
"乐器陪练课账户信息"
},
"API_getCourseDay"
:
{
"apiPath"
:
"/apollo/public/businessLive/getCourseDay"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"获取当日课表"
,
"desc"
:
"获取当日课表"
}
}
\ No newline at end of file
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