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
34c81d07
Commit
34c81d07
authored
Jul 05, 2024
by
xyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix case
parent
6492c7d1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
3 deletions
+38
-3
src/main/java/com/xiaomai/cases/polar/config/TestBatchModifyStudioConfig.java
+1
-0
src/main/java/com/xiaomai/cases/polar/config/TestCurrentUser.java
+9
-1
src/main/java/com/xiaomai/cases/polar/config/TestGetFailTenantSmsRecordDetail.java
+2
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargeOrderStatus.java
+2
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargePage.java
+2
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsType.java
+8
-1
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioMessageConfigs.java
+1
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioSmsInfo.java
+2
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSuitList.java
+3
-1
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordDetail.java
+4
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordPage.java
+2
-0
src/main/java/com/xiaomai/cases/polar/config/TestSmsRecharge.java
+2
-0
No files found.
src/main/java/com/xiaomai/cases/polar/config/TestBatchModifyStudioConfig.java
View file @
34c81d07
...
@@ -55,6 +55,7 @@ public class TestBatchModifyStudioConfig extends XMBaseTest {
...
@@ -55,6 +55,7 @@ public class TestBatchModifyStudioConfig extends XMBaseTest {
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
...
...
src/main/java/com/xiaomai/cases/polar/config/TestCurrentUser.java
View file @
34c81d07
...
@@ -30,10 +30,18 @@ public class TestCurrentUser extends XMBaseTest {
...
@@ -30,10 +30,18 @@ public class TestCurrentUser extends XMBaseTest {
super
.
beforeTest
();
super
.
beforeTest
();
}
}
/**
* 进入每个乐动模块都会获取该接口,判断该馆的权限及配置
*/
@Test
(
description
=
"获取当前使用者"
)
@Test
(
description
=
"获取当前使用者"
)
public
void
testCurrentUser
(){
public
void
testCurrentUser
(){
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
"{}"
,
headers
).
assetsSuccess
(
true
);
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertTrue
(
response
.
getJSONObject
(
"result"
).
getJSONArray
(
"permissions"
).
size
()
>=
0
);
Assert
.
assertTrue
(
response
.
getJSONObject
(
"result"
).
getJSONArray
(
"permissions"
).
size
()
>=
0
);
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetFailTenantSmsRecordDetail.java
View file @
34c81d07
...
@@ -39,9 +39,11 @@ public class TestGetFailTenantSmsRecordDetail extends XMBaseTest {
...
@@ -39,9 +39,11 @@ public class TestGetFailTenantSmsRecordDetail extends XMBaseTest {
object
.
put
(
"current"
,
0
);
object
.
put
(
"current"
,
0
);
object
.
put
(
"size"
,
20
);
object
.
put
(
"size"
,
20
);
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//获取异常短信为空或者有值
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
Assert
.
assertTrue
(
total
>=
0
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargeOrderStatus.java
View file @
34c81d07
...
@@ -34,6 +34,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
...
@@ -34,6 +34,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
@Test
(
description
=
"短信充值失败"
)
@Test
(
description
=
"短信充值失败"
)
public
void
testGetSmsRechargeOrderStatus
(){
public
void
testGetSmsRechargeOrderStatus
(){
//随机生成订单id
String
orderId
=
RandomStringUtil
.
randomNumber
(
3
,
""
);
String
orderId
=
RandomStringUtil
.
randomNumber
(
3
,
""
);
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
...
@@ -42,6 +43,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
...
@@ -42,6 +43,7 @@ public class TestGetSmsRechargeOrderStatus extends XMBaseTest {
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
false
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
false
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"充值订单不存在"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"充值订单不存在"
);
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargePage.java
View file @
34c81d07
...
@@ -42,9 +42,11 @@ public class TestGetSmsRechargePage extends XMBaseTest {
...
@@ -42,9 +42,11 @@ public class TestGetSmsRechargePage extends XMBaseTest {
object
.
put
(
"size"
,
20
);
object
.
put
(
"size"
,
20
);
object
.
put
(
"studioIds"
,
studioIds
);
object
.
put
(
"studioIds"
,
studioIds
);
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//验收充值记录为空或者有值
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
Assert
.
assertTrue
(
total
>=
0
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsType.java
View file @
34c81d07
...
@@ -34,9 +34,16 @@ public class TestGetSmsType extends XMBaseTest {
...
@@ -34,9 +34,16 @@ public class TestGetSmsType extends XMBaseTest {
@Test
(
description
=
"获取短信类型枚举值"
)
@Test
(
description
=
"获取短信类型枚举值"
)
public
void
testGetSmsType
(){
public
void
testGetSmsType
(){
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
""
,
headers
).
assetsSuccess
(
true
);
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//检验短信类型有值
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
}
}
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioMessageConfigs.java
View file @
34c81d07
...
@@ -42,6 +42,7 @@ public class TestGetStudioMessageConfigs extends XMBaseTest {
...
@@ -42,6 +42,7 @@ public class TestGetStudioMessageConfigs extends XMBaseTest {
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//检验场馆配置有值
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
}
}
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioSmsInfo.java
View file @
34c81d07
...
@@ -39,9 +39,11 @@ public class TestGetStudioSmsInfo extends XMBaseTest {
...
@@ -39,9 +39,11 @@ public class TestGetStudioSmsInfo extends XMBaseTest {
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//检验条数=0或者有充值条数
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.remain"
));
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.remain"
));
Assert
.
assertTrue
(
total
>=
0
);
Assert
.
assertTrue
(
total
>=
0
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestGetSuitList.java
View file @
34c81d07
...
@@ -38,9 +38,11 @@ public class TestGetSuitList extends XMBaseTest {
...
@@ -38,9 +38,11 @@ public class TestGetSuitList extends XMBaseTest {
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
//获取4个短信套餐
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
==
4
);
}
}
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordDetail.java
View file @
34c81d07
...
@@ -34,13 +34,16 @@ public class TestGetTenantSmsRecordDetail extends XMBaseTest {
...
@@ -34,13 +34,16 @@ public class TestGetTenantSmsRecordDetail extends XMBaseTest {
@Test
(
description
=
"获取某条短信记录详情"
)
@Test
(
description
=
"获取某条短信记录详情"
)
public
void
testGetTenantSmsRecordDetail
(){
public
void
testGetTenantSmsRecordDetail
(){
//随机生成一条记录id
String
recordId
=
RandomStringUtil
.
randomNumber
(
3
,
""
);
String
recordId
=
RandomStringUtil
.
randomNumber
(
3
,
""
);
JSONObject
object
=
new
JSONObject
();
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"recordId"
,
recordId
);
object
.
put
(
"recordId"
,
recordId
);
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
false
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
false
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
//因未充值,检验失败
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"校验失败"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"校验失败"
);
}
}
}
}
\ No newline at end of file
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordPage.java
View file @
34c81d07
...
@@ -43,9 +43,11 @@ public class TestGetTenantSmsRecordPage extends XMBaseTest {
...
@@ -43,9 +43,11 @@ public class TestGetTenantSmsRecordPage extends XMBaseTest {
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
object
.
put
(
"operatorId"
,
xmAppApi
.
getLoginInfo
().
getAdminId
());
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
//发送记录为空或者有值
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
Assert
.
assertTrue
(
total
>=
0
);
}
}
...
...
src/main/java/com/xiaomai/cases/polar/config/TestSmsRecharge.java
View file @
34c81d07
...
@@ -39,6 +39,7 @@ public class TestSmsRecharge extends XMBaseTest {
...
@@ -39,6 +39,7 @@ public class TestSmsRecharge extends XMBaseTest {
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"suitType"
,
"SUIT_ONE"
);
object
.
put
(
"suitType"
,
"SUIT_ONE"
);
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
...
@@ -53,6 +54,7 @@ public class TestSmsRecharge extends XMBaseTest {
...
@@ -53,6 +54,7 @@ public class TestSmsRecharge extends XMBaseTest {
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"suitType"
,
"SUIT_ONE"
);
object
.
put
(
"suitType"
,
"SUIT_ONE"
);
//调用请求
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
...
...
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