feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
[
|
||||
{
|
||||
"id": "TC001",
|
||||
"name": "获取用户信息",
|
||||
"description": "测试获取指定用户的信息",
|
||||
"module": "user",
|
||||
"endpoint": "/api/user/{userId}",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": [],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 200
|
||||
},
|
||||
{
|
||||
"type": "json_path",
|
||||
"json_path": "$.data.id",
|
||||
"expected": 1
|
||||
}
|
||||
],
|
||||
"tags": ["smoke", "regression"],
|
||||
"priority": 0,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "TC002",
|
||||
"name": "创建用户",
|
||||
"description": "测试创建新用户",
|
||||
"module": "user",
|
||||
"endpoint": "/api/user",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"body": {
|
||||
"username": "testuser",
|
||||
"email": "test@example.com",
|
||||
"password": "password123"
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": [],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 201
|
||||
},
|
||||
{
|
||||
"type": "json_path",
|
||||
"json_path": "$.data.username",
|
||||
"expected": "testuser"
|
||||
}
|
||||
],
|
||||
"tags": ["smoke"],
|
||||
"priority": 1,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "TC003",
|
||||
"name": "更新用户信息",
|
||||
"description": "测试更新用户信息",
|
||||
"module": "user",
|
||||
"endpoint": "/api/user/{userId}",
|
||||
"method": "PUT",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"body": {
|
||||
"email": "updated@example.com"
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": ["TC001"],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 200
|
||||
},
|
||||
{
|
||||
"type": "json_path",
|
||||
"json_path": "$.data.email",
|
||||
"expected": "updated@example.com"
|
||||
}
|
||||
],
|
||||
"tags": ["regression"],
|
||||
"priority": 2,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "TC004",
|
||||
"name": "删除用户",
|
||||
"description": "测试删除用户",
|
||||
"module": "user",
|
||||
"endpoint": "/api/user/{userId}",
|
||||
"method": "DELETE",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": ["TC003"],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 204
|
||||
}
|
||||
],
|
||||
"tags": ["regression"],
|
||||
"priority": 2,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "TC005",
|
||||
"name": "获取用户列表",
|
||||
"description": "测试获取用户列表",
|
||||
"module": "user",
|
||||
"endpoint": "/api/users",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"params": {
|
||||
"page": 1,
|
||||
"size": 10
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": [],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 200
|
||||
},
|
||||
{
|
||||
"type": "json_path",
|
||||
"json_path": "$.data.length()",
|
||||
"expected": 10
|
||||
}
|
||||
],
|
||||
"tags": ["smoke"],
|
||||
"priority": 0,
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
userId,username,email
|
||||
1,testuser1,test1@example.com
|
||||
2,testuser2,test2@example.com
|
||||
3,testuser3,test3@example.com
|
||||
|
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"id": "TC006",
|
||||
"name": "获取用户信息(参数化)",
|
||||
"description": "测试获取指定用户的信息(参数化测试)",
|
||||
"module": "user",
|
||||
"endpoint": "/api/user/{userId}",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"auth_required": true,
|
||||
"dependencies": [],
|
||||
"timeout": 5000,
|
||||
"retry_count": 0,
|
||||
"validations": [
|
||||
{
|
||||
"type": "status_code",
|
||||
"expected": 200
|
||||
}
|
||||
],
|
||||
"tags": ["parameterized"],
|
||||
"priority": 1,
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user