88 lines
1.9 KiB
JSON
88 lines
1.9 KiB
JSON
{
|
|
"name": "Department Tree API 테스트",
|
|
"description": "부서 트리 조회 테스트",
|
|
"version": "1.0",
|
|
"config": {
|
|
"baseUrl": "",
|
|
"timeout": 30000,
|
|
"stopOnFailure": true
|
|
},
|
|
"variables": {
|
|
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
|
|
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}"
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": "login",
|
|
"name": "로그인",
|
|
"method": "POST",
|
|
"endpoint": "/login",
|
|
"body": {
|
|
"user_id": "{{user_id}}",
|
|
"user_pwd": "{{user_pwd}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.message": "로그인 성공",
|
|
"$.access_token": "@isString"
|
|
}
|
|
},
|
|
"extract": {
|
|
"token": "$.access_token"
|
|
}
|
|
},
|
|
{
|
|
"id": "get_tree",
|
|
"name": "부서 트리 조회",
|
|
"method": "GET",
|
|
"endpoint": "/departments/tree",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data": "@isArray"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "get_tree_with_users",
|
|
"name": "부서 트리 조회 (사용자 포함)",
|
|
"method": "GET",
|
|
"endpoint": "/departments/tree",
|
|
"query": {
|
|
"with_users": true
|
|
},
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data": "@isArray"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "list_departments",
|
|
"name": "부서 목록 조회",
|
|
"method": "GET",
|
|
"endpoint": "/departments",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data": "@isArray"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|