{ "name": "회사 가입 신청 플로우", "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}}", "test_business_number": "123-45-67890" }, "steps": [ { "id": "login", "name": "로그인", "method": "POST", "endpoint": "/api/v1/login", "body": { "user_id": "{{user_id}}", "user_pwd": "{{user_pwd}}" }, "expect": { "status": [200], "jsonPath": { "$.access_token": "@isString" } }, "extract": { "token": "$.access_token" } }, { "id": "check_business_number", "name": "사업자번호 확인", "description": "가입 가능한 회사인지 사업자번호로 확인", "method": "POST", "endpoint": "/api/v1/companies/check", "headers": { "Authorization": "Bearer {{login.token}}" }, "body": { "business_number": "{{test_business_number}}" }, "expect": { "status": [200], "jsonPath": { "$.success": true } }, "extract": { "company_exists": "$.data.exists", "company_id": "$.data.company_id" } }, { "id": "submit_request", "name": "회사 가입 신청", "method": "POST", "endpoint": "/api/v1/companies/request", "headers": { "Authorization": "Bearer {{login.token}}" }, "body": { "company_id": "{{check_business_number.company_id}}", "department": "개발팀", "position": "개발자", "message": "Flow 테스트용 가입 신청입니다." }, "expect": { "status": [200, 201], "jsonPath": { "$.success": true } }, "extract": { "request_id": "$.data.id" }, "continueOnFailure": true }, { "id": "get_my_requests", "name": "내 신청 목록 조회", "method": "GET", "endpoint": "/api/v1/companies/my-requests", "headers": { "Authorization": "Bearer {{login.token}}" }, "expect": { "status": [200], "jsonPath": { "$.success": true } } }, { "id": "get_request_detail", "name": "신청 상세 조회", "method": "GET", "endpoint": "/api/v1/companies/requests/{{submit_request.request_id}}", "headers": { "Authorization": "Bearer {{login.token}}" }, "expect": { "status": [200], "jsonPath": { "$.success": true, "$.data.id": "@isNumber" } }, "continueOnFailure": true }, { "id": "approve_request", "name": "신청 승인 (관리자)", "description": "관리자 권한으로 가입 신청 승인", "method": "POST", "endpoint": "/api/v1/companies/requests/{{submit_request.request_id}}/approve", "headers": { "Authorization": "Bearer {{login.token}}" }, "body": { "role_id": 2, "department_id": 1, "approved_message": "승인되었습니다." }, "expect": { "status": [200, 403], "jsonPath": { "$.success": "@isBoolean" } }, "continueOnFailure": true }, { "id": "submit_another_request", "name": "거절 테스트용 신청", "method": "POST", "endpoint": "/api/v1/companies/request", "headers": { "Authorization": "Bearer {{login.token}}" }, "body": { "company_id": "{{check_business_number.company_id}}", "department": "영업팀", "position": "매니저", "message": "거절 테스트용 신청입니다." }, "expect": { "status": [200, 201, 400, 422], "jsonPath": { "$.success": "@isBoolean" } }, "extract": { "reject_request_id": "$.data.id" }, "continueOnFailure": true }, { "id": "reject_request", "name": "신청 거절 (관리자)", "description": "관리자 권한으로 가입 신청 거절", "method": "POST", "endpoint": "/api/v1/companies/requests/{{submit_another_request.reject_request_id}}/reject", "headers": { "Authorization": "Bearer {{login.token}}" }, "body": { "reason": "테스트 거절 사유" }, "expect": { "status": [200, 403], "jsonPath": { "$.success": "@isBoolean" } }, "continueOnFailure": true }, { "id": "verify_rejection", "name": "거절 상태 확인", "method": "GET", "endpoint": "/api/v1/companies/requests/{{submit_another_request.reject_request_id}}", "headers": { "Authorization": "Bearer {{login.token}}" }, "expect": { "status": [200], "jsonPath": { "$.success": true, "$.data.status": "rejected" } }, "continueOnFailure": true } ] }