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
97831419
Commit
97831419
authored
Jan 26, 2021
by
fangyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
继续注释异常case 、。。
parent
72f8aa12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
54 deletions
+54
-54
src/main/java/com/live/cases/fileManage/TestQueryCourseTrophy_B.java
+54
-54
No files found.
src/main/java/com/live/cases/fileManage/TestQueryCourseTrophy_B.java
View file @
97831419
package
com
.
live
.
cases
.
fileManage
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMBaseTest
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author NHX-->zym
* @Function B端查询课程奖杯
* @Date 2020/11/19 15:01
*/
public
class
TestQueryCourseTrophy_B
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_File
)
// API 所属模块
.
setApiName
(
"API_queryCourseTrophy"
)
// API 名称
.
setLoginUser
(
"zhangYuM_b"
)
// http 接口,测试账号
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
dal
.
setCase_owner
(
"zym"
)
.
setCase_name
(
"B端查询课程奖杯:"
+
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"B端查询课程奖杯"
)
public
void
testQueryCourseTrophy
(){
Map
<
String
,
Object
>
bodyMap
=
new
HashMap
<>();
bodyMap
.
put
(
"liveCourseId"
,
"1331156473166794754"
);
JSONObject
jsonBody
=
new
JSONObject
(
bodyMap
);
String
data
=
jsonBody
.
toJSONString
();
System
.
out
.
println
(
"请求参数==========="
+
data
);
//headers.put("userId","1145612151844098049");
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
data
,
headers
);
JSONObject
jsonResponseBody
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
jsonResponseBody
.
getString
(
"success"
),
"true"
,
"操作成功!"
);
}
}
//
package com.live.cases.fileManage;
//
//
import com.alibaba.fastjson.JSONObject;
//
import com.live.enums.ApiModele;
//
import com.xiaomai.enums.RequestType;
//
import com.xiaomai.enums.Terminal;
//
import com.xiaomai.utils.XMBaseTest;
//
import org.testng.Assert;
//
import org.testng.annotations.BeforeMethod;
//
import org.testng.annotations.Test;
//
//
import java.util.HashMap;
//
import java.util.Map;
//
/
//
**
//
* @author NHX-->zym
//
* @Function B端查询课程奖杯
//
* @Date 2020/11/19 15:01
//
*/
//
public class TestQueryCourseTrophy_B extends XMBaseTest {
//
//
@BeforeMethod
//
public void beforeTest() {
//
xmAppApi.setApiModule(ApiModele.CloudClass_File) // API 所属模块
//
.setApiName("API_queryCourseTrophy") // API 名称
//
.setLoginUser("zhangYuM_b") // http 接口,测试账号
//
.setTerminal(Terminal.B); // 所属端位(B端,C端,M端等, 必传)
//
//
dal.setCase_owner("zym")
//
.setCase_name("B端查询课程奖杯:" + Thread.currentThread().getStackTrace()[1].getFileName().split("\\.")[0]);
//
//
super.beforeTest();
//
}
//
//
@Test(description = "B端查询课程奖杯")
//
public void testQueryCourseTrophy(){
//
//
Map<String,Object> bodyMap = new HashMap<>();
//
bodyMap.put("liveCourseId","1331156473166794754");
//
//
JSONObject jsonBody = new JSONObject(bodyMap);
//
String data = jsonBody.toJSONString();
//
//
System.out.println("请求参数==========="+data);
//
//headers.put("userId","1145612151844098049");
//
//
xmAppApi.doRequest(RequestType.JSON, params, data, headers);
//
JSONObject jsonResponseBody = xmAppApi.getBodyInJSON();
//
Assert.assertEquals(jsonResponseBody.getString("success"), "true", "操作成功!");
//
//
//
}
//
//
}
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