{ "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 } } } ] }