Test Data and Fixture
테스트 데이터 및 픽스처
테스트 데이터와 픽스처는 알려진 입력과 설정 단계를 의미합니다. 각각의 테스트마다 시스템을 동일한 상태로 만듭니다.
다른 예시
청구서 픽스처는 고객 한 명, 항목 두 개, 고정된 시계, 세금 규칙 하나를 만들어요. 자신의 기록만 지워요.
주요 부분
- 01Code or behavior under test
- 02Observable evidence
- 03Coverage, failure, and recovery
사용할 때
중요한 상태를 명확하고 반복 가능하게 유지하기 위해 작은 빌더와 별도의 고정 장치를 사용하십시오.
다음 경우에는 사용하지 마세요
거대한 공유 픽스처, 복사한 개인정보, 시드 없는 무작위 값, 관련 없는 기록을 지우는 청소는 피하세요.
코드에서 사용된 이름
factory + deterministic clock + isolated cleanup 출시하기 전에
Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule.
Outcome:Complete the task with 테스트 데이터 및 픽스처 (Test Data and Fixture)。 User context:청구서 픽스처는 고객 한 명, 항목 두 개, 고정된 시계, 세금 규칙 하나를 만들어요. 자신의 기록만 지워요. Validation approach:테스트 데이터 및 픽스처 (Test Data and Fixture)。 Why it fits:중요한 상태를 명확하고 반복 가능하게 유지하기 위해 작은 빌더와 별도의 고정 장치를 사용하십시오. Do not use it when:거대한 공유 픽스처, 복사한 개인정보, 시드 없는 무작위 값, 관련 없는 기록을 지우는 청소는 피하세요. Test requirements: Name the system and test environment. Define prepared test data, other inputs, and the result you can observe. Include failure and edge cases, allowed error, isolation, and cleanup. Test operations: Make failures easy to diagnose. Control random or changing inputs. Name an owner. Keep the test fast and simple enough for its release gate. Acceptance criteria: The test fails for the known bug and passes after the fix. It repeats in the target environment, gives useful evidence, and does not expose or change unrelated data. Evidence and limits (evidence boundary):하나의 공식 표준이 전체 용어를 통제하지 않음. 의미는 팀, 플랫폼 또는 프레임워크마다 달라질 수 있음. Unknowns to confirm: Release gate, environment, prepared test data, allowed error, time budget, owner, and flaky-test rule.
이 요청을 확인하세요
Review how 테스트 데이터 및 픽스처 (Test Data and Fixture) is used now. Definition: 테스트 데이터와 픽스처는 알려진 입력과 설정 단계를 의미합니다. 각각의 테스트마다 시스템을 동일한 상태로 만듭니다. Release checks: Check the environment and prepared test data (fixture). Define a result you can observe, failure and edge cases, isolation, stable inputs, useful error details, and cleanup. Set a time budget, owner, and flaky-test rule. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.