feat: Items/ItemMaster API 플로우 테스트 JSON 추가
- items-crud-api-flow.json: 품목 CRUD 플로우 (17 스텝) - items-bom-api-flow.json: BOM 관리 플로우 (24 스텝) - item-master-full-api-flow.json: ItemMaster 전체 API 플로우 (27 스텝) - JSONPath 배열 인덱스 표기법 수정 (data[0] → data.0)
This commit is contained in:
511
plans/flow-tests/item-master-full-api-flow.json
Normal file
511
plans/flow-tests/item-master-full-api-flow.json
Normal file
@@ -0,0 +1,511 @@
|
||||
{
|
||||
"name": "ItemMaster 전체 API CRUD Flow Test",
|
||||
"description": "품목기준관리(ItemMaster) 전체 API 테스트 - Init, Pages, Sections, Fields, BomItems 통합 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": "FlowTest_Page_{{$timestamp}}",
|
||||
"test_section_title": "FlowTest_Section_{{$timestamp}}",
|
||||
"test_field_name": "FlowTest_Field_{{$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": "init",
|
||||
"name": "2. ItemMaster 초기화 데이터 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/init",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list_pages_before",
|
||||
"name": "3. 페이지 목록 조회 (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": "4. 페이지 생성 (FG)",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/pages",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"page_name": "{{test_page_name}}",
|
||||
"item_type": "FG",
|
||||
"absolute_path": "/flow-test/fg"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"page_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": "/flow-test/fg/updated"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list_sections_before",
|
||||
"name": "6. 독립 섹션 목록 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/sections",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_independent_section",
|
||||
"name": "7. 독립 섹션 생성 (fields 타입)",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/sections",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"title": "{{test_section_title}}",
|
||||
"type": "fields",
|
||||
"is_template": false,
|
||||
"is_default": false,
|
||||
"description": "Flow Test 독립 섹션"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"section_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_page_section",
|
||||
"name": "8. 페이지에 섹션 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/pages/{{create_page.page_id}}/sections",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"title": "{{test_section_title}}_페이지연결",
|
||||
"type": "fields",
|
||||
"is_default": false
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"page_section_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "update_section",
|
||||
"name": "9. 섹션 수정",
|
||||
"method": "PUT",
|
||||
"endpoint": "/item-master/sections/{{create_page_section.page_section_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"title": "{{test_section_title}}_수정됨",
|
||||
"type": "fields",
|
||||
"description": "수정된 섹션 설명"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "section_usage",
|
||||
"name": "10. 섹션 사용처 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/sections/{{create_page_section.page_section_id}}/usage",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list_fields_before",
|
||||
"name": "11. 독립 필드 목록 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/fields",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_independent_field",
|
||||
"name": "12. 독립 필드 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/fields",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"field_name": "{{test_field_name}}",
|
||||
"field_key": "flow_test_field",
|
||||
"field_type": "textbox",
|
||||
"is_required": false,
|
||||
"placeholder": "테스트 입력",
|
||||
"is_locked": false
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"field_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_section_field",
|
||||
"name": "13. 섹션에 필드 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/sections/{{create_page_section.page_section_id}}/fields",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"field_name": "{{test_field_name}}_섹션연결",
|
||||
"field_key": "flow_test_section_field",
|
||||
"field_type": "number",
|
||||
"is_required": true,
|
||||
"default_value": "0",
|
||||
"placeholder": "숫자 입력"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"section_field_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "update_field",
|
||||
"name": "14. 필드 수정",
|
||||
"method": "PUT",
|
||||
"endpoint": "/item-master/fields/{{create_section_field.section_field_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"field_name": "{{test_field_name}}_수정됨",
|
||||
"field_type": "number",
|
||||
"is_required": false,
|
||||
"default_value": "100"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "field_usage",
|
||||
"name": "15. 필드 사용처 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/fields/{{create_section_field.section_field_id}}/usage",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "clone_field",
|
||||
"name": "16. 필드 복제",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/fields/{{create_section_field.section_field_id}}/clone",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"cloned_field_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "clone_section",
|
||||
"name": "17. 섹션 복제",
|
||||
"method": "POST",
|
||||
"endpoint": "/item-master/sections/{{create_page_section.page_section_id}}/clone",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"cloned_section_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "get_page_structure",
|
||||
"name": "18. 페이지 구조 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/pages/{{create_page.page_id}}/structure",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "get_page_relationships",
|
||||
"name": "19. 페이지 관계 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/pages/{{create_page.page_id}}/relationships",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_cloned_field",
|
||||
"name": "20. 복제된 필드 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/fields/{{clone_field.cloned_field_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_section_field",
|
||||
"name": "21. 섹션 필드 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/fields/{{create_section_field.section_field_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_independent_field",
|
||||
"name": "22. 독립 필드 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/fields/{{create_independent_field.field_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_cloned_section",
|
||||
"name": "23. 복제된 섹션 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/sections/{{clone_section.cloned_section_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_page_section",
|
||||
"name": "24. 페이지 섹션 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/sections/{{create_page_section.page_section_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_independent_section",
|
||||
"name": "25. 독립 섹션 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/sections/{{create_independent_section.section_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_page",
|
||||
"name": "26. 페이지 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/item-master/pages/{{create_page.page_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "verify_cleanup",
|
||||
"name": "27. 정리 확인 - 페이지 목록 재조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/item-master/pages",
|
||||
"params": {
|
||||
"item_type": "FG"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
506
plans/flow-tests/items-bom-api-flow.json
Normal file
506
plans/flow-tests/items-bom-api-flow.json
Normal file
@@ -0,0 +1,506 @@
|
||||
{
|
||||
"name": "Items BOM API CRUD Flow Test",
|
||||
"description": "품목 BOM(Bill of Materials) 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_code": "BOMTEST-{{$timestamp}}",
|
||||
"test_name": "BOM테스트_{{$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": "create_parent_item",
|
||||
"name": "2. 부모 품목(FG) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-PARENT",
|
||||
"name": "{{test_name}}_부모품목",
|
||||
"product_type": "FG",
|
||||
"unit": "EA",
|
||||
"description": "BOM 테스트용 부모 품목",
|
||||
"is_sellable": true,
|
||||
"is_producible": true
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"parent_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_child_item_1",
|
||||
"name": "3. 자식 품목 1(PT) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-CHILD1",
|
||||
"name": "{{test_name}}_자식1",
|
||||
"product_type": "PT",
|
||||
"unit": "EA",
|
||||
"description": "BOM 테스트용 자식 품목 1"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"child1_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_child_item_2",
|
||||
"name": "4. 자식 품목 2(RM) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-CHILD2",
|
||||
"name": "{{test_name}}_자식2",
|
||||
"product_type": "RM",
|
||||
"unit": "KG",
|
||||
"description": "BOM 테스트용 자식 품목 2 (원자재)"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"child2_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_child_item_3",
|
||||
"name": "5. 자식 품목 3(SM) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-CHILD3",
|
||||
"name": "{{test_name}}_자식3",
|
||||
"product_type": "SM",
|
||||
"unit": "EA",
|
||||
"description": "BOM 테스트용 자식 품목 3 (부자재)"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"child3_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_list_empty",
|
||||
"name": "6. BOM 목록 조회 (빈 상태)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_add_items",
|
||||
"name": "7. BOM 라인 추가 (Bulk)",
|
||||
"method": "POST",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"items": [
|
||||
{
|
||||
"ref_id": "{{create_child_item_1.child1_id}}",
|
||||
"ref_type": "PRODUCT",
|
||||
"quantity": 2,
|
||||
"unit": "EA",
|
||||
"waste_rate": 0.05,
|
||||
"remarks": "반제품 2개 필요"
|
||||
},
|
||||
{
|
||||
"ref_id": "{{create_child_item_2.child2_id}}",
|
||||
"ref_type": "MATERIAL",
|
||||
"quantity": 5.5,
|
||||
"unit": "KG",
|
||||
"waste_rate": 0.1,
|
||||
"remarks": "원자재 5.5kg 필요"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.created": "@isNumber"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_list_after_add",
|
||||
"name": "8. BOM 목록 조회 (추가 후)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data": "@isArray"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"bom_line_id_1": "$.data.0.id",
|
||||
"bom_line_id_2": "$.data.1.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_tree",
|
||||
"name": "9. BOM 트리 구조 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/tree",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_summary",
|
||||
"name": "10. BOM 요약 정보 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/summary",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_validate",
|
||||
"name": "11. BOM 유효성 검사",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/validate",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_categories",
|
||||
"name": "12. BOM 카테고리 목록 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/categories",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_update_line",
|
||||
"name": "13. BOM 라인 수정",
|
||||
"method": "PUT",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/{{bom_list_after_add.bom_line_id_1}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"quantity": 3,
|
||||
"waste_rate": 0.08,
|
||||
"remarks": "수량 3개로 수정"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_add_more",
|
||||
"name": "14. BOM 라인 추가 (3번째 자식)",
|
||||
"method": "POST",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"items": [
|
||||
{
|
||||
"ref_id": "{{create_child_item_3.child3_id}}",
|
||||
"ref_type": "MATERIAL",
|
||||
"quantity": 10,
|
||||
"unit": "EA",
|
||||
"remarks": "부자재 10개 추가"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_list_after_update",
|
||||
"name": "15. BOM 목록 재조회 (수정/추가 후)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"bom_line_id_3": "$.data.2.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_reorder",
|
||||
"name": "16. BOM 정렬 변경",
|
||||
"method": "POST",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/reorder",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"items": [
|
||||
{"id": "{{bom_list_after_add.bom_line_id_1}}", "sort_order": 3},
|
||||
{"id": "{{bom_list_after_update.bom_line_id_3}}", "sort_order": 1}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_delete_line",
|
||||
"name": "17. BOM 라인 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/{{bom_list_after_update.bom_line_id_3}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_replace",
|
||||
"name": "18. BOM 전체 교체",
|
||||
"method": "POST",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom/replace",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"items": [
|
||||
{
|
||||
"ref_id": "{{create_child_item_1.child1_id}}",
|
||||
"ref_type": "PRODUCT",
|
||||
"quantity": 5,
|
||||
"unit": "EA",
|
||||
"remarks": "교체된 BOM - 반제품"
|
||||
}
|
||||
]
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bom_list_after_replace",
|
||||
"name": "19. BOM 목록 조회 (교체 후)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}/bom",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_child3",
|
||||
"name": "20. 자식 품목 3 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_child_item_3.child3_id}}",
|
||||
"params": {
|
||||
"item_type": "SM"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_child2",
|
||||
"name": "21. 자식 품목 2 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_child_item_2.child2_id}}",
|
||||
"params": {
|
||||
"item_type": "RM"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_child1",
|
||||
"name": "22. 자식 품목 1 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_child_item_1.child1_id}}",
|
||||
"params": {
|
||||
"item_type": "PT"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_parent",
|
||||
"name": "23. 부모 품목 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_parent_item.parent_id}}",
|
||||
"params": {
|
||||
"item_type": "FG"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "verify_cleanup",
|
||||
"name": "24. 정리 확인 - 품목 검색",
|
||||
"method": "GET",
|
||||
"endpoint": "/items",
|
||||
"params": {
|
||||
"q": "BOMTEST",
|
||||
"size": "20"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
375
plans/flow-tests/items-crud-api-flow.json
Normal file
375
plans/flow-tests/items-crud-api-flow.json
Normal file
@@ -0,0 +1,375 @@
|
||||
{
|
||||
"name": "Items API CRUD Flow Test",
|
||||
"description": "통합 품목(Items) 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_code": "FLOWTEST-{{$timestamp}}",
|
||||
"test_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_items_before",
|
||||
"name": "2. 품목 목록 조회 (전체)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items",
|
||||
"params": {
|
||||
"size": "20"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list_items_fg",
|
||||
"name": "3. 품목 목록 조회 (FG 필터)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items",
|
||||
"params": {
|
||||
"type": "FG",
|
||||
"size": "10"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_item_fg",
|
||||
"name": "4. 완제품(FG) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-FG",
|
||||
"name": "{{test_name}}_완제품",
|
||||
"product_type": "FG",
|
||||
"unit": "EA",
|
||||
"description": "Flow Test 완제품",
|
||||
"is_sellable": true,
|
||||
"is_purchasable": false,
|
||||
"is_producible": true,
|
||||
"safety_stock": 10,
|
||||
"lead_time": 5
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"fg_id": "$.data.id",
|
||||
"fg_code": "$.data.code"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_item_pt",
|
||||
"name": "5. 반제품(PT) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-PT",
|
||||
"name": "{{test_name}}_반제품",
|
||||
"product_type": "PT",
|
||||
"unit": "EA",
|
||||
"description": "Flow Test 반제품",
|
||||
"is_sellable": false,
|
||||
"is_purchasable": false,
|
||||
"is_producible": true,
|
||||
"safety_stock": 20
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"pt_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "create_item_rm",
|
||||
"name": "6. 원자재(RM) 생성",
|
||||
"method": "POST",
|
||||
"endpoint": "/items",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"code": "{{test_code}}-RM",
|
||||
"name": "{{test_name}}_원자재",
|
||||
"product_type": "RM",
|
||||
"unit": "KG",
|
||||
"description": "Flow Test 원자재",
|
||||
"is_sellable": false,
|
||||
"is_purchasable": true,
|
||||
"is_producible": false,
|
||||
"material_code": "MAT-{{$timestamp}}",
|
||||
"specification": "100mm x 50mm",
|
||||
"is_inspection": "Y"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200, 201],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
},
|
||||
"extract": {
|
||||
"rm_id": "$.data.id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "show_item_fg",
|
||||
"name": "7. 완제품(FG) 단건 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_item_fg.fg_id}}",
|
||||
"params": {
|
||||
"item_type": "FG"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true,
|
||||
"$.data.id": "@isNumber"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "show_item_by_code",
|
||||
"name": "8. Code 기반 품목 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/code/{{create_item_fg.fg_code}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "show_item_with_price",
|
||||
"name": "9. 단가 포함 품목 조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_item_fg.fg_id}}",
|
||||
"params": {
|
||||
"item_type": "FG",
|
||||
"include_price": "true"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "update_item_fg",
|
||||
"name": "10. 완제품(FG) 수정",
|
||||
"method": "PUT",
|
||||
"endpoint": "/items/{{create_item_fg.fg_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"item_type": "FG",
|
||||
"name": "{{test_name}}_완제품_수정됨",
|
||||
"description": "Flow Test 완제품 - 수정됨",
|
||||
"safety_stock": 15,
|
||||
"lead_time": 7
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "update_item_rm",
|
||||
"name": "11. 원자재(RM) 수정",
|
||||
"method": "PUT",
|
||||
"endpoint": "/items/{{create_item_rm.rm_id}}",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"item_type": "RM",
|
||||
"name": "{{test_name}}_원자재_수정됨",
|
||||
"specification": "150mm x 75mm",
|
||||
"remarks": "수정된 원자재 비고"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "verify_update",
|
||||
"name": "12. 수정 확인 - 단건 재조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items/{{create_item_fg.fg_id}}",
|
||||
"params": {
|
||||
"item_type": "FG"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "search_items",
|
||||
"name": "13. 품목 검색 (키워드)",
|
||||
"method": "GET",
|
||||
"endpoint": "/items",
|
||||
"params": {
|
||||
"q": "플로우테스트",
|
||||
"size": "20"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_item_pt",
|
||||
"name": "14. 반제품(PT) 단건 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_item_pt.pt_id}}",
|
||||
"params": {
|
||||
"item_type": "PT"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "batch_delete_items",
|
||||
"name": "15. 품목 일괄 삭제 (FG, RM)",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/batch",
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"body": {
|
||||
"item_type": "FG",
|
||||
"ids": ["{{create_item_fg.fg_id}}"]
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "delete_item_rm",
|
||||
"name": "16. 원자재(RM) 삭제",
|
||||
"method": "DELETE",
|
||||
"endpoint": "/items/{{create_item_rm.rm_id}}",
|
||||
"params": {
|
||||
"item_type": "RM"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "verify_cleanup",
|
||||
"name": "17. 정리 확인 - 목록 재조회",
|
||||
"method": "GET",
|
||||
"endpoint": "/items",
|
||||
"params": {
|
||||
"q": "FLOWTEST",
|
||||
"size": "20"
|
||||
},
|
||||
"headers": {
|
||||
"Authorization": "Bearer {{login.token}}"
|
||||
},
|
||||
"expect": {
|
||||
"status": [200],
|
||||
"jsonPath": {
|
||||
"$.success": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user