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
f335cb62
Commit
f335cb62
authored
Mar 03, 2021
by
zhangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
review
parent
cbe68e28
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
48 deletions
+47
-48
src/main/java/com/live/cases/liveClientT/cloundClass/TestGetCourseList.java
+9
-6
src/main/java/com/live/cases/liveClientT/cloundClass/TestQueryLiveAccount.java
+1
-1
src/main/java/com/live/cases/liveClientT/cloundClass/TestQueryStudentVisitData.java
+0
-39
src/main/java/com/live/xmutils/GetDayTime.java
+29
-0
src/main/resources/apicase/customerLive.json
+2
-2
testng.xml
+6
-0
No files found.
src/main/java/com/live/cases/liveClientT/cloundClass/TestGetCourseList.java
View file @
f335cb62
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.live.enums.ApiModele
;
import
com.live.enums.ApiModele
;
import
com.live.enums.Terminal
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetDayTime
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
...
@@ -32,18 +33,20 @@ public class TestGetCourseList extends XMBaseTest {
...
@@ -32,18 +33,20 @@ public class TestGetCourseList extends XMBaseTest {
}
}
/**
/**
* 测试
资料云盘-新增保存文件夹
* 测试
直播客户端查询课表
*/
*/
@Test
@Test
public
void
testGetCourseList
()
{
public
void
testGetCourseList
()
{
GetDayTime
getDayTime
=
new
GetDayTime
();
long
zeroTime
=
getDayTime
.
getDayZeroTime
();
Map
bodyMap
=
new
HashMap
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"adminId"
,
"1235115979394306049"
);
bodyMap
.
put
(
"adminId"
,
xmAppApi
.
getLoginInfo
().
getAid
()
);
bodyMap
.
put
(
"channel"
,
"XIAOMAI"
);
bodyMap
.
put
(
"channel"
,
"XIAOMAI"
);
bodyMap
.
put
(
"endTime"
,
System
.
currentTimeMillis
()
+
30
*
60
*
1000
);
bodyMap
.
put
(
"endTime"
,
zeroTime
+
24
*
60
*
60
*
1000
-
1000
);
bodyMap
.
put
(
"instId"
,
"1235115978015883266"
);
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
()
);
bodyMap
.
put
(
"startTime"
,
System
.
currentTimeMillis
()
+
60
*
1000
);
bodyMap
.
put
(
"startTime"
,
zeroTime
);
bodyMap
.
put
(
"teacherId"
,
"1235115979473997826"
);
bodyMap
.
put
(
"teacherId"
,
xmAppApi
.
getLoginInfo
().
getTid
()
);
String
bodydata
=
JSONObject
.
toJSONString
(
bodyMap
);
String
bodydata
=
JSONObject
.
toJSONString
(
bodyMap
);
...
...
src/main/java/com/live/cases/liveClientT/cloundClass/TestQueryLiveAccount.java
View file @
f335cb62
...
@@ -38,7 +38,7 @@ public class TestQueryLiveAccount extends XMBaseTest {
...
@@ -38,7 +38,7 @@ public class TestQueryLiveAccount extends XMBaseTest {
public
void
testQueryLiveAccount
()
{
public
void
testQueryLiveAccount
()
{
Map
bodyMap
=
new
HashMap
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"instId"
,
"1235115978015883266"
);
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
()
);
String
bodydata
=
JSONObject
.
toJSONString
(
bodyMap
);
String
bodydata
=
JSONObject
.
toJSONString
(
bodyMap
);
...
...
src/main/java/com/live/cases/liveClientT/cloundClass/TestQueryStudentVisitData.java
deleted
100644 → 0
View file @
cbe68e28
//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.xmutils.GetLiveCourseId;
//import com.live.utils.XMBaseTest;
//import org.testng.Assert;
//import org.testng.annotations.BeforeMethod;
//
//public class TestQueryStudentVisitData extends XMBaseTest {
// GetLiveCourseId tools = new GetLiveCourseId();
//
// @BeforeMethod
// public void beforeTest(){
// xmAppApi.setApiModule(ApiModele.CloudClass_B)
// .setApiName("API_queryStudentVisitData")
// .setLoginUser("zhangYuM_b")
// .setTerminal(Terminal.B);
// super.beforeTest();
// }
//
// //@Test
// 已重写
// public void queryStudentVisitData() {
//
// String id = tools.createCourse();
//
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("liveCourseId","1334373001216823298");
//
//
// xmAppApi.doRequest(RequestType.JSON, params, jsonObject.toJSONString(), headers);
//
// JSONObject responseRes = xmAppApi.getBodyInJSON();
// Assert.assertEquals("true",responseRes.getString("success"));
// }
//}
src/main/java/com/live/xmutils/GetDayTime.java
0 → 100644
View file @
f335cb62
package
com
.
live
.
xmutils
;
import
java.util.TimeZone
;
/**
* @author zhangying
* @date 2021/3/3 11:00 上午
*/
public
class
GetDayTime
{
// long current = System.currentTimeMillis();//当前时间毫秒数
// long zero = current/(1000*3600*24)*(1000*3600*24) - TimeZone.getDefault().getRawOffset();//今天零点零分零秒的毫秒数
//
// long twelve=zero+24*60*60*1000-1;//今天23点59分59秒的毫秒数
// long yesterday=System.currentTimeMillis()-24*60*60*1000;//昨天的这一时间的毫秒数
// System.out.println(new Timestamp(current));//当前时间
// System.out.println(new Timestamp(yesterday));//昨天这一时间点
// System.out.println(new Timestamp(zero));//今天零点零分零秒
// System.out.println(new Timestamp(twelve));//今天23点59分59秒
public
long
getDayZeroTime
()
{
long
now
=
System
.
currentTimeMillis
()
/
1000
l
;
long
daySecond
=
60
*
60
*
24
;
long
getDayZeroTime
=
(
now
-
(
now
+
8
*
3600
)
%
daySecond
)
*
1000
;
return
getDayZeroTime
;
}
}
src/main/resources/apicase/customerLive.json
View file @
f335cb62
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
{
{
"apiPath"
:
"/apollo/public/customerLive/getStudentCourseDay"
,
"apiPath"
:
"/apollo/public/customerLive/getStudentCourseDay"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiContentType"
:
"application/json;charset=utf-8"
,
"apiName"
:
"
直播C端(每课学堂)课表
"
,
"apiName"
:
"
查询C端绑定学员有课的日期
"
,
"desc"
:
"
直播C端(每课学堂)课表
"
"desc"
:
"
查询C端绑定学员有课的日期
"
},
},
"API_getStudentInstLinkageList"
:
"API_getStudentInstLinkageList"
:
{
{
...
...
testng.xml
View file @
f335cb62
...
@@ -57,4 +57,9 @@
...
@@ -57,4 +57,9 @@
<package
name=
"com.live.cases.seriesCourse"
></package>
<package
name=
"com.live.cases.seriesCourse"
></package>
</packages>
</packages>
</test>
</test>
<test
name=
"myClassAPP"
preserve-order=
"true"
verbose=
"3"
>
<packages>
<package
name=
"com.live.cases.myClassAPP"
></package>
</packages>
</test>
</suite>
</suite>
\ 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