- 개발팀 전용 폴더 dev/ 생성 (standards, guides, quickstart, changes, deploys, data, history, dev_plans 이동) - 프론트엔드 전용 폴더 frontend/ 생성 (api/ → frontend/api-specs/) - 기획팀 폴더 requests/ 생성 - plans/ → dev/dev_plans/ 이름 변경 - README.md 신규 (사람용 안내), INDEX.md 재작성 (Claude Code용) - resources.md 신규 (노션 링크용, assets/brochure 이관 예정) - CURRENT_WORKS.md 삭제, TODO.md → dev/ 이동 - 전체 참조 경로 업데이트 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
215 lines
5.9 KiB
JSON
215 lines
5.9 KiB
JSON
{
|
|
"name": "Client API CRUD 테스트",
|
|
"description": "거래처(Client) API 전체 CRUD 테스트 - 생성, 조회, 수정, 토글, 삭제 포함. business_no, business_type, business_item 신규 필드 검증 포함.",
|
|
"version": "1.0",
|
|
"config": {
|
|
"baseUrl": "https://api.sam.kr/api/v1",
|
|
"apiKey": "{{$env.FLOW_TESTER_API_KEY}}",
|
|
"timeout": 30000,
|
|
"stopOnFailure": true
|
|
},
|
|
"variables": {
|
|
"user_id": "{{$env.FLOW_TESTER_USER_ID}}",
|
|
"user_pwd": "{{$env.FLOW_TESTER_USER_PWD}}",
|
|
"test_client_code": "TEST_CLIENT_{{$timestamp}}"
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": "login",
|
|
"name": "1. 로그인 - 토큰 획득",
|
|
"method": "POST",
|
|
"endpoint": "/login",
|
|
"body": {
|
|
"user_id": "{{variables.user_id}}",
|
|
"user_pwd": "{{variables.user_pwd}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.access_token": "@isString"
|
|
}
|
|
},
|
|
"extract": {
|
|
"token": "$.access_token"
|
|
}
|
|
},
|
|
{
|
|
"id": "create_client",
|
|
"name": "2. 거래처 생성 (신규 필드 포함)",
|
|
"method": "POST",
|
|
"endpoint": "/clients",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"body": {
|
|
"client_code": "{{variables.test_client_code}}",
|
|
"name": "테스트 거래처",
|
|
"contact_person": "홍길동",
|
|
"phone": "02-1234-5678",
|
|
"email": "test@example.com",
|
|
"address": "서울시 강남구 테헤란로 123",
|
|
"business_no": "123-45-67890",
|
|
"business_type": "제조업",
|
|
"business_item": "전자부품",
|
|
"is_active": "Y"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.id": "@isNumber",
|
|
"$.data.client_code": "{{variables.test_client_code}}",
|
|
"$.data.name": "테스트 거래처",
|
|
"$.data.business_no": "123-45-67890",
|
|
"$.data.business_type": "제조업",
|
|
"$.data.business_item": "전자부품"
|
|
}
|
|
},
|
|
"extract": {
|
|
"client_id": "$.data.id"
|
|
}
|
|
},
|
|
{
|
|
"id": "list_clients",
|
|
"name": "3. 거래처 목록 조회",
|
|
"method": "GET",
|
|
"endpoint": "/clients?page=1&size=20&q=테스트",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.data": "@isArray",
|
|
"$.data.current_page": 1
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "show_client",
|
|
"name": "4. 거래처 단건 조회",
|
|
"method": "GET",
|
|
"endpoint": "/clients/{{create_client.client_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.id": "{{create_client.client_id}}",
|
|
"$.data.client_code": "{{variables.test_client_code}}",
|
|
"$.data.business_no": "123-45-67890",
|
|
"$.data.business_type": "제조업",
|
|
"$.data.business_item": "전자부품"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "update_client",
|
|
"name": "5. 거래처 수정 (신규 필드 변경)",
|
|
"method": "PUT",
|
|
"endpoint": "/clients/{{create_client.client_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"body": {
|
|
"name": "테스트 거래처 (수정됨)",
|
|
"contact_person": "김철수",
|
|
"business_no": "987-65-43210",
|
|
"business_type": "도소매업",
|
|
"business_item": "IT솔루션"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.name": "테스트 거래처 (수정됨)",
|
|
"$.data.contact_person": "김철수",
|
|
"$.data.business_no": "987-65-43210",
|
|
"$.data.business_type": "도소매업",
|
|
"$.data.business_item": "IT솔루션"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "toggle_client",
|
|
"name": "6. 거래처 활성/비활성 토글 (N으로)",
|
|
"method": "PATCH",
|
|
"endpoint": "/clients/{{create_client.client_id}}/toggle",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.is_active": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "toggle_client_back",
|
|
"name": "7. 거래처 토글 복원 (Y로)",
|
|
"method": "PATCH",
|
|
"endpoint": "/clients/{{create_client.client_id}}/toggle",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.is_active": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "list_active_only",
|
|
"name": "8. 활성 거래처만 조회",
|
|
"method": "GET",
|
|
"endpoint": "/clients?only_active=1",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true,
|
|
"$.data.data": "@isArray"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "delete_client",
|
|
"name": "9. 거래처 삭제",
|
|
"method": "DELETE",
|
|
"endpoint": "/clients/{{create_client.client_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [200],
|
|
"jsonPath": {
|
|
"$.success": true
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "verify_deleted",
|
|
"name": "10. 삭제 확인 (404 예상)",
|
|
"method": "GET",
|
|
"endpoint": "/clients/{{create_client.client_id}}",
|
|
"headers": {
|
|
"Authorization": "Bearer {{login.token}}"
|
|
},
|
|
"expect": {
|
|
"status": [404],
|
|
"jsonPath": {
|
|
"$.success": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |