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
2d7e6f3f
Commit
2d7e6f3f
authored
Apr 13, 2024
by
xyy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信管理case
parent
6ac63db1
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
397 additions
and
0 deletions
+397
-0
src/main/java/com/xiaomai/cases/polar/config/TestBatchModifyStudioConfig.java
+60
-0
src/main/java/com/xiaomai/cases/polar/config/TestCurrentUser.java
+4
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetFailTenantSmsRecordDetail.java
+48
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargePage.java
+52
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsType.java
+44
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioMessageConfigs.java
+47
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioSmsInfo.java
+48
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordDetail.java
+45
-0
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordPage.java
+49
-0
No files found.
src/main/java/com/xiaomai/cases/polar/config/TestBatchModifyStudioConfig.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMBaseTest
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description: 批量修改场馆配置
* @Version: 1.0
*/
public
class
TestBatchModifyStudioConfig
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_batchModifyStudioConfig"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"批量修改场馆配置"
)
public
void
testBatchModifyStudioConfig
(){
JSONObject
object
=
new
JSONObject
();
//构建configListRequest
JSONArray
configListRequest
=
new
JSONArray
();
JSONObject
smsObject
=
new
JSONObject
();
smsObject
.
put
(
"msgType"
,
"SMS"
);
smsObject
.
put
(
"configValue"
,
"TRUE"
);
JSONObject
wechatObject
=
new
JSONObject
();
wechatObject
.
put
(
"msgType"
,
"WECHAT"
);
wechatObject
.
put
(
"configValue"
,
"TRUE"
);
configListRequest
.
add
(
smsObject
);
configListRequest
.
add
(
wechatObject
);
//构建messageConfigTypes
JSONArray
messageConfigTypes
=
new
JSONArray
();
messageConfigTypes
.
add
(
"ALL"
);
object
.
put
(
"configListRequest"
,
configListRequest
);
object
.
put
(
"messageConfigTypes"
,
messageConfigTypes
);
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestCurrentUser.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
public
class
TestCurrentUser
{
}
src/main/java/com/xiaomai/cases/polar/config/TestGetFailTenantSmsRecordDetail.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取异常短信详情
* @Version: 1.0
*/
public
class
TestGetFailTenantSmsRecordDetail
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getFailTenantSmsRecordDetail"
)
.
setLoginUser
(
LoginAccount
.
ZYX_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取异常短信详情"
)
public
void
testGetFailTenantSmsRecordDetail
(){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"recordId"
,
0
);
object
.
put
(
"current"
,
0
);
object
.
put
(
"size"
,
20
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsRechargePage.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取充值记录
* @Version: 1.0
*/
public
class
TestGetSmsRechargePage
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getSmsRechargePage"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取充值记录"
)
public
void
testGetSmsRechargePage
(){
JSONObject
object
=
new
JSONObject
();
JSONArray
studioIds
=
new
JSONArray
();
studioIds
.
add
(
xmAppApi
.
getLoginInfo
().
getStudioId
());
object
.
put
(
"current"
,
0
);
object
.
put
(
"size"
,
20
);
object
.
put
(
"studioIds"
,
studioIds
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetSmsType.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取短信类型枚举值
* @Version: 1.0
*/
public
class
TestGetSmsType
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getSmsType"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取短信类型枚举值"
)
public
void
testGetSmsType
(){
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
""
,
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioMessageConfigs.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description: 获取场馆消息配置
* @Version: 1.0
*/
public
class
TestGetStudioMessageConfigs
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getStudioMessageConfigs"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取场馆消息配置"
)
public
void
testGetStudioMessageConfigs
(){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"brandId"
,
xmAppApi
.
getLoginInfo
().
getBrandId
());
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>
0
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetStudioSmsInfo.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取场馆短信条数
* @Version: 1.0
*/
public
class
TestGetStudioSmsInfo
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getStudioSmsInfo"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取场馆短信条数"
)
public
void
testGetStudioSmsInfo
(){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.remain"
));
Assert
.
assertTrue
(
total
>=
0
);
}
}
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordDetail.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取某条短信记录详情
* @Version: 1.0
*/
public
class
TestGetTenantSmsRecordDetail
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getTenantSmsRecordDetail"
)
.
setLoginUser
(
LoginAccount
.
ZYX_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取某条短信记录详情"
)
public
void
testGetTenantSmsRecordDetail
(){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"recordId"
,
0
);
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
Assert
.
assertTrue
(
response
.
getJSONArray
(
"result"
).
size
()
>=
0
);
}
}
\ No newline at end of file
src/main/java/com/xiaomai/cases/polar/config/TestGetTenantSmsRecordPage.java
0 → 100644
View file @
2d7e6f3f
package
com
.
xiaomai
.
cases
.
polar
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.xiaomai.enums.ApiModule
;
import
com.xiaomai.enums.LoginAccount
;
import
com.xiaomai.enums.RequestType
;
import
com.xiaomai.enums.Terminal
;
import
com.xiaomai.utils.XMJSONPath
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeMethod
;
import
org.testng.annotations.Test
;
import
com.xiaomai.utils.XMBaseTest
;
/**
* @Author: xyy
* @CreateTime: 2024-04-13 11:48
* @Description:获取短信发送记录
* @Version: 1.0
*/
public
class
TestGetTenantSmsRecordPage
extends
XMBaseTest
{
@BeforeMethod
public
void
beforeTest
(){
xmAppApi
.
setApiModule
(
ApiModule
.
Polar_Config
)
.
setApiName
(
"API_getTenantSmsRecordPage"
)
.
setLoginUser
(
LoginAccount
.
YFF_DEV
)
.
setTerminal
(
Terminal
.
B
);
dal
.
setCase_owner
(
"xyy"
)
.
setCase_name
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getFileName
().
split
(
"\\."
)[
0
]);
super
.
beforeTest
();
}
@Test
(
description
=
"获取短信发送记录"
)
public
void
testGetTenantSmsRecordPage
(){
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"current"
,
0
);
object
.
put
(
"size"
,
20
);
object
.
put
(
"msgTypes"
,
null
);
object
.
put
(
"studioId"
,
xmAppApi
.
getLoginInfo
().
getStudioId
());
xmAppApi
.
doRequest
(
RequestType
.
JSON
,
params
,
object
.
toJSONString
(),
headers
).
assetsSuccess
(
true
);
JSONObject
response
=
xmAppApi
.
getBodyInJSON
();
Assert
.
assertEquals
(
XMJSONPath
.
readPath
(
response
,
"$.message"
),
"操作成功!"
);
int
total
=
Integer
.
parseInt
(
XMJSONPath
.
readPath
(
response
,
"$.result.total"
));
Assert
.
assertTrue
(
total
>=
0
);
}
}
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