Contract Testing
계약 테스트
계약 테스트는 개별적으로 배포할 수 있는 두 시스템이 여전히 합의된 형식으로 메시지를 교환하는지 확인합니다.
다른 예시
클라이언트는 GET /profiles/42가 특정 필드와 상태를 반환하기를 기대합니다. 지속적 통합(CI)은 제공자가 이 약속을 지키는지 확인합니다. 이 테스트는 전체 여정이나 실시간 데이터의 품질을 증명하지 않습니다.
주요 부분
- 01소비자 계약
- 02제공자 검증
- 03호환성 결과
사용할 때
서비스가 스스로 배포될 때, 전체 시스템 없이 메시지 호환성을 확인해야 할 때 이 용어를 사용합니다.
다음 경우에는 사용하지 마세요
제공업체의 개인 코드를 계약에 복사하지 마세요, 이 테스트를 API 보안 테스트 대신 사용하지 마세요.
코드에서 사용된 이름
consumer expectation ↔ provider verification 출시하기 전에
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 계약 테스트 (Contract Testing)。 User context:클라이언트는 GET /profiles/42가 특정 필드와 상태를 반환하기를 기대합니다. 지속적 통합(CI)은 제공자가 이 약속을 지키는지 확인합니다. 이 테스트는 전체 여정이나 실시간 데이터의 품질을 증명하지 않습니다. Validation approach:계약 테스트 (Contract Testing)。 Why it fits:서비스가 스스로 배포될 때, 전체 시스템 없이 메시지 호환성을 확인해야 할 때 이 용어를 사용합니다. Do not use it when:제공업체의 개인 코드를 계약에 복사하지 마세요, 이 테스트를 API 보안 테스트 대신 사용하지 마세요. 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 계약 테스트 (Contract Testing) 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.