golang-testing
테이블 주도 테스트, 서브테스트, 벤치마크, 퍼징, 테스트 커버리지를 포함한 Go 테스팅 패턴. 관용적 Go 관행과 함께 TDD 방법론을 따릅니다.
Original · translation is not supported for this source languageTarget: Software development & testing. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original Korean text
Topics in the source
- Go 테스팅 패턴
- 활성화 시점
- Go에서의 TDD 워크플로우
- RED-GREEN-REFACTOR 사이클
- Go에서의 단계별 TDD
- 테이블 주도 테스트
- 에러 케이스가 있는 테이블 주도 테스트
- 서브테스트 및 서브벤치마크
TDD 방법론을 따르는 신뢰할 수 있고 유지보수 가능한 테스트 작성을 위한 포괄적인 Go 테스팅 패턴. 새로운 Go 함수나 메서드 작성 시 기존 코드에 테스트 커버리지 추가 시 성능이 중요한 코드에 벤치마크 생성 시 입력 유효성 검사를 위한 퍼즈 테스트 구현 시 Go 프로젝트에서 TDD 워크플로우 따를 시 Go 테스트의 표준 패턴. 최소한의 코드로 포괄적인 커버리지를 가능하게 합니다. testdata/에 저장된 예상 출력 파일에 대한 테스트. | 코드 유형 | 목표 | |-----------|--------| | 핵심 비즈니스 로직 | 100% | | 공개 API | 90%+ | | 일반 코드 | 80%+ | | 생성된 코드 | 제외 | 해야 할 것: 테스트를 먼저 작성 (TDD) 포괄적인 커버리지를 위해 테이블 주도 테스트 사용 구현이 아닌 동작을 테스트 헬퍼 함수에서 t.Helper() 사용 독립적인 테스트에 t.Parallel() 사용 t.Cleanup()으로 리소스 정리 시나리오를 설명하는 의미 있는 테스트 이름 사용 하지 말아야 할 것: 비공개 함수를 직접 테스트 (공개 API를 통해 테스트) 테스트에서 time.Sleep() 사용 (채널이나 조건 사용) 불안정한 테스트 무시 (수정하거나 제거) 모든 것을 모킹 (가능하면 통합 테스트 선호) 에러 경로 테스트 생략 기억하세요: 테스트는 문서입니다. 코드가 어떻게 사용되어야 하는지를 보여줍니다. 명확하게 작성하고 최신 상태로 유지하세요.
- Source repository
- affaan-m/ECC
- Source file
- docs/ko-KR/skills/golang-testing/SKILL.md
- Fixed revision
- d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: affaan-m/ECC · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:49.851Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.