Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-sportstest
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-sportstest
Commits
24786996
Commit
24786996
authored
Jul 15, 2024
by
yangfangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充会员相关
parent
c55f154e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
src/main/java/com/xiaomai/cases/polar/member/TestFindDetailById.java
+19
-9
No files found.
src/main/java/com/xiaomai/cases/polar/member/TestFindDetailById.java
View file @
24786996
...
...
@@ -9,6 +9,7 @@ import com.xiaomai.utils.XMBaseTest;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.DataProvider
;
import
org.testng.annotations.Test
;
public
class
TestFindDetailById
extends
XMBaseTest
{
...
...
@@ -26,12 +27,20 @@ public class TestFindDetailById extends XMBaseTest {
super
.
beforeTest
();
}
@DataProvider
public
Object
[][]
dataProvider
(){
return
new
Object
[][]{
{
"NORMAL"
,
"NORMAL"
},
{
"HISTORY"
,
"HISTORY"
}
};
}
@Test
(
description
=
"获取会员详情以及更多资料"
)
public
void
testFindDetailById
(){
//编辑会员资料前调用的会员详情,非点击会员之后的会员详情findStudioMemberDetail,点击之后的正式会员详情和流失会员详情已在TestForceUpdate中覆盖,这里就不再冗余了
@Test
(
description
=
"编辑会员资料调用的会员详情"
,
dataProvider
=
"dataProvider"
)
public
void
testFindDetailById
(
String
searchType
,
String
status
){
//获取正式会员列表
JSONObject
memberResult
=
tools
.
search
(
"NORMAL"
,
"NORMAL"
);
//获取正式
/流失
会员列表
JSONObject
memberResult
=
tools
.
search
(
searchType
,
status
);
String
id
=
memberResult
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
JSONObject
jsonObject
=
new
JSONObject
();
...
...
@@ -44,14 +53,15 @@ public class TestFindDetailById extends XMBaseTest {
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
jsonObject
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
String
success
=
response
.
getString
(
"success"
);
Assert
.
assertEquals
(
success
,
"true"
,
"获取会员详情以及更多资料失败"
);
Assert
.
assertEquals
(
success
,
"true"
,
"获取
正式/流失
会员详情以及更多资料失败"
);
}
@Test
(
description
=
"获取会员详情以及更多资料-会员id不能为空"
)
public
void
testFindDetailById_1
(){
//获取正式会员列表
JSONObject
memberResult
=
tools
.
search
(
"NORMAL"
,
"NORMAL"
);
@Test
(
description
=
"编辑会员资料调用的会员详情-会员id不能为空"
,
dataProvider
=
"dataProvider"
)
public
void
testFindDetailById_1
(
String
searchType
,
String
status
){
//获取正式/流失会员列表
JSONObject
memberResult
=
tools
.
search
(
searchType
,
status
);
String
id
=
memberResult
.
getJSONObject
(
"result"
).
getJSONArray
(
"records"
).
getJSONObject
(
0
).
getString
(
"id"
);
JSONObject
jsonObject1
=
new
JSONObject
();
...
...
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