169 lines
3.9 KiB
JSON
169 lines
3.9 KiB
JSON
{
|
|
"name": "ItemMaster Page API CRUD Flow Test",
|
|
"description": "품목기준관리 페이지(Page) API 전체 CRUD 플로우 테스트 - 로그인, 목록조회, 생성, 수정, 삭제",
|
|
"version": "1.0",
|
|
"config": {
|
|
"baseUrl": "",
|
|
"timeout": 30000,
|
|
"stopOnFailure": true
|
|
},
|
|
"variables": {
|
|
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
|
|
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}",
|
|
"test_page_name": "테스트페이지_{{$timestamp}}"
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": "login",
|
|
"name": "1. 로그인",
|
|
"method": "POST",
|
|
"endpoint": "/login",
|
|
"body": {
|
|
"user_id": "{{user_id}}",
|
|
"user_pwd": "{{user_pwd}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.access_token": "@isString"
|
|
}
|
|
},
|
|
"extract": {
|
|
"token": "$.access_token"
|
|
}
|
|
},
|
|
{
|
|
"id": "list_pages",
|
|
"name": "2. 페이지 목록 조회 (FG 타입)",
|
|
"method": "GET",
|
|
"endpoint": "/item-master/pages",
|
|
"params": {
|
|
"item_type": "FG"
|
|
},
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "create_page",
|
|
"name": "3. 페이지 생성 (완제품 FG)",
|
|
"method": "POST",
|
|
"endpoint": "/item-master/pages",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"body": {
|
|
"page_name": "{{test_page_name}}",
|
|
"item_type": "FG",
|
|
"absolute_path": "/products/finished"
|
|
},
|
|
"expect": {
|
|
"status": [200, 201],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.id": "@isNumber"
|
|
}
|
|
},
|
|
"extract": {
|
|
"page_id": "$.data.id",
|
|
"page_name": "$.data.page_name"
|
|
}
|
|
},
|
|
{
|
|
"id": "verify_create",
|
|
"name": "4. 생성 확인 - 목록에서 조회",
|
|
"method": "GET",
|
|
"endpoint": "/item-master/pages",
|
|
"params": {
|
|
"item_type": "FG"
|
|
},
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "update_page",
|
|
"name": "5. 페이지 수정",
|
|
"method": "PUT",
|
|
"endpoint": "/item-master/pages/{{create_page.page_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"body": {
|
|
"page_name": "{{test_page_name}}_수정됨",
|
|
"item_type": "FG",
|
|
"absolute_path": "/products/finished/updated"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "verify_update",
|
|
"name": "6. 수정 확인 - 목록에서 조회",
|
|
"method": "GET",
|
|
"endpoint": "/item-master/pages",
|
|
"params": {
|
|
"item_type": "FG"
|
|
},
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "delete_page",
|
|
"name": "7. 페이지 삭제",
|
|
"method": "DELETE",
|
|
"endpoint": "/item-master/pages/{{create_page.page_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "verify_delete",
|
|
"name": "8. 삭제 확인 - 목록에서 조회",
|
|
"method": "GET",
|
|
"endpoint": "/item-master/pages",
|
|
"params": {
|
|
"item_type": "FG"
|
|
},
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|