08ea5fbe98
添加用户管理视图、API和状态管理文件
155 lines
3.2 KiB
JSON
155 lines
3.2 KiB
JSON
[
|
|
{
|
|
"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
|
|
}
|
|
]
|