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
f6f168d9
Commit
f6f168d9
authored
Apr 26, 2021
by
fanyuanmeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
8f3ce189
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
15 deletions
+50
-15
src/main/java/com/live/cases/videoCourse/TestCreateLesson.java
+2
-0
src/main/java/com/live/cases/videoCourse/TestLessonScheduleListPage.java
+14
-4
src/main/java/com/live/xmutils/GetVideoClassData.java
+24
-1
src/main/resources/parameter.json
+10
-10
No files found.
src/main/java/com/live/cases/videoCourse/TestCreateLesson.java
View file @
f6f168d9
...
...
@@ -86,6 +86,8 @@ public class TestCreateLesson extends XMBaseTest {
Assert
.
assertEquals
(
jsonBody
.
getString
(
"result"
),
id
);
getVideoClassData
.
removeLessonSchedule
(
id
);
}
...
...
src/main/java/com/live/cases/videoCourse/TestLessonScheduleListPage.java
View file @
f6f168d9
...
...
@@ -4,6 +4,7 @@ import com.live.enums.ApiModele;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetVideoClassData
;
import
org.json.JSONObject
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
...
...
@@ -53,14 +54,23 @@ public class TestLessonScheduleListPage extends XMBaseTest {
//按条件查询
@Test
public
void
testLessonScheduleListPageOrder
(){
GetVideoClassData
getVideoClassData
=
new
GetVideoClassData
();
com
.
alibaba
.
fastjson
.
JSONObject
jsonObject0
=
getVideoClassData
.
VideoClassData
();
String
scheduleName
=
jsonObject0
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"scheduleName"
);
String
teacherId
=
jsonObject0
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"teacherId"
);
String
beginTime
=
jsonObject0
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"beginTime"
);
String
endTime
=
jsonObject0
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"endTime"
);
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"current"
,
1
);
bodyMap
.
put
(
"instId"
,
xmAppApi
.
getLoginInfo
().
getInstId
());
bodyMap
.
put
(
"size"
,
10
);
bodyMap
.
put
(
"beginTime"
,
"1612627200000"
);
bodyMap
.
put
(
"endTime"
,
"1612713599999"
);
bodyMap
.
put
(
"teacherId"
,
"1303609085537103873"
);
bodyMap
.
put
(
"scheduleName"
,
"小王老师视频课接口测试"
);
bodyMap
.
put
(
"beginTime"
,
beginTime
);
bodyMap
.
put
(
"endTime"
,
endTime
);
bodyMap
.
put
(
"teacherId"
,
teacherId
);
bodyMap
.
put
(
"scheduleName"
,
scheduleName
);
JSONObject
jsonObject
=
new
JSONObject
(
bodyMap
);
...
...
src/main/java/com/live/xmutils/GetVideoClassData.java
View file @
f6f168d9
...
...
@@ -136,7 +136,7 @@ public class GetVideoClassData extends XMBaseTest {
}
//添加视频课学员
//添加视频课学员
public
String
addLessonScheduleStu
()
throws
InterruptedException
{
String
scheduleId
=
createVideoClass
();
...
...
@@ -169,6 +169,29 @@ public class GetVideoClassData extends XMBaseTest {
return
scheduleId
;
}
//删除视频课
public
void
removeLessonSchedule
(
String
scheduleId
){
dataApi
.
setApiModule
(
ApiModele
.
CloudClass_Video
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_removeLessonSchedule"
)
// API 名称 必传
.
setLoginUser
(
"fym-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeDataRequest
();
Map
bodyMap
=
new
HashMap
();
bodyMap
.
put
(
"scheduleId"
,
scheduleId
);
org
.
json
.
JSONObject
jsonObject
=
new
org
.
json
.
JSONObject
(
bodyMap
);
String
bodyData
=
jsonObject
.
toString
();
dataApi
.
doRequest
(
RequestType
.
JSON
,
params
,
bodyData
,
headers
);
System
.
out
.
println
(
dataApi
);
JSONObject
jsonBody0
=
dataApi
.
getBodyInJSON
();
System
.
out
.
println
(
jsonBody0
);
}
...
...
src/main/resources/parameter.json
View file @
f6f168d9
...
...
@@ -312,22 +312,22 @@
"gary"
:
{
"instId"
:
"1301797436402806785"
,
"instName"
:
""
,
"accountNo"
:
"1
9941192167
"
,
"certificate"
:
"
bb426cdfa72944e46068858aca0509ea
"
,
"aid"
:
"1303
609085537103873
"
,
"uid"
:
"
1303609085558075394
"
,
"accountNo"
:
"1
7130047572
"
,
"certificate"
:
"
96d0b7696590408b67e74d38b2e082c4
"
,
"aid"
:
"1303
157838454161409
"
,
"uid"
:
"
895491980614696960
"
,
"userType"
:
"B"
,
"tid"
:
"1303
609085537103873
"
"tid"
:
"1303
157838454161409
"
},
"prod"
:
{
"instId"
:
"1301797436402806785"
,
"instName"
:
""
,
"accountNo"
:
"1
9941192167
"
,
"certificate"
:
"
bb426cdfa72944e46068858aca0509ea
"
,
"aid"
:
"1303
609085537103873
"
,
"uid"
:
"
1303609085558075394
"
,
"accountNo"
:
"1
7130047572
"
,
"certificate"
:
"
96d0b7696590408b67e74d38b2e082c4
"
,
"aid"
:
"1303
157838454161409
"
,
"uid"
:
"
895491980614696960
"
,
"userType"
:
"B"
,
"tid"
:
"1303
609085537103873
"
"tid"
:
"1303
157838454161409
"
}
}
...
...
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