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
45f1fc3b
Commit
45f1fc3b
authored
Feb 07, 2021
by
zhangying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资料云盘-员工文件列表接口
parent
c507bff1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
9 deletions
+52
-9
src/main/java/com/live/cases/fileManage/commonFolder/TestSaveFolder.java
+0
-6
src/main/java/com/live/cases/fileManage/employeeFolder/TestEmployeeFolderList1.java
+52
-0
src/main/java/com/live/xmutils/baseapi/ApiBaseTestFile.java
+0
-3
No files found.
src/main/java/com/live/cases/fileManage/commonFolder/TestSaveFolder.java
View file @
45f1fc3b
...
@@ -7,16 +7,10 @@ import com.live.enums.RequestType;
...
@@ -7,16 +7,10 @@ import com.live.enums.RequestType;
import
com.live.enums.Terminal
;
import
com.live.enums.Terminal
;
import
com.live.utils.RandomStringUtil
;
import
com.live.utils.RandomStringUtil
;
import
com.live.utils.XMBaseTest
;
import
com.live.utils.XMBaseTest
;
import
com.live.xmutils.GetFolderData
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.util.HashMap
;
import
java.util.Map
;
import
static
io
.
restassured
.
RestAssured
.
given
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
/**
/**
* Created by zhangying on 2020/11/16
* Created by zhangying on 2020/11/16
...
...
src/main/java/com/live/cases/fileManage/employeeFolder/TestEmployeeFolderList1.java
0 → 100644
View file @
45f1fc3b
package
com
.
live
.
cases
.
fileManage
.
employeeFolder
;
import
com.alibaba.fastjson.JSONObject
;
import
com.live.enums.ApiModele
;
import
com.live.enums.RequestType
;
import
com.live.enums.Terminal
;
import
com.live.utils.RandomStringUtil
;
import
com.live.utils.XMBaseTest
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
/**
* Created by zhangying on 2021/02/07
*/
public
class
TestEmployeeFolderList1
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
()
{
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_File
)
// API 所属模块 必传 读取配置文件config.properties配置的api地址
.
setApiName
(
"API_employeeFolderList"
)
// API 名称 必传
.
setLoginUser
(
"zhangy-b"
)
// http 接口,测试账号 必传
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeTest
();
}
/**
* 测试资料云盘-员工文件列表
*/
@Test
public
void
testEmployeeFolderList1
()
{
String
name
=
"测试文件夹新增"
+
RandomStringUtil
.
randomString
(
6
);
//云盘文件名称
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"current"
,
"1"
);
jsonObject
.
put
(
"disk"
,
"EMPLOYEE"
);
jsonObject
.
put
(
"folderIdType"
,
"FOLDER"
);
jsonObject
.
put
(
"instId"
,
"1235115978015883266"
);
jsonObject
.
put
(
"searchName"
,
"测试文件夹新增"
);
jsonObject
.
put
(
"size"
,
"10"
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
);
JSONObject
jsonBody
=
xmAppApi
.
getBodyInJSON
();
System
.
out
.
println
(
"jsonBody = "
+
jsonBody
);
Assert
.
assertEquals
(
"true"
,
jsonBody
.
getString
(
"success"
));
Assert
.
assertEquals
(
"1"
,
jsonBody
.
getJSONObject
(
"result"
).
getString
(
"total"
));
Assert
.
assertEquals
(
jsonBody
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"folderName"
),
"测试文件夹新增kl4SLg"
);
}
}
src/main/java/com/live/xmutils/baseapi/ApiBaseTestFile.java
View file @
45f1fc3b
...
@@ -33,11 +33,8 @@ public abstract class ApiBaseTestFile extends BaseTest {
...
@@ -33,11 +33,8 @@ public abstract class ApiBaseTestFile extends BaseTest {
//设置测试信息:env、Apimodule、Apiname、接口账号信息、端口位
//设置测试信息:env、Apimodule、Apiname、接口账号信息、端口位
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_File
)
// API 所属模块
xmAppApi
.
setApiModule
(
ApiModele
.
CloudClass_File
)
// API 所属模块
.
setApiName
(
getApiName
())
// API 名称
.
setApiName
(
getApiName
())
// API 名称
// .setEnv("prod") // 运行环境
.
setLoginUser
(
"zhangy-b"
)
// 测试账号
.
setLoginUser
(
"zhangy-b"
)
// 测试账号
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
.
setTerminal
(
Terminal
.
B
);
// 所属端位(B端,C端,M端等, 必传)
super
.
beforeTest
();
super
.
beforeTest
();
}
}
...
...
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