# 환경은 재현 가능한 입력이다

> seed·reset·clock·queue·flag와 identity/domain/external fixture

- Canonical: https://learning.reopt.ai/courses/agentic-testing/lessons/at-m2-concept
- Language: ko-KR
- HTML: https://learning.reopt.ai/courses/agentic-testing/lessons/at-m2-concept

---

[에이전틱 테스트 환경 엔지니어링](/courses/agentic-testing) 2. 환경·데이터·Fixture 계약 3 / 9

# 환경은 재현 가능한 입력이다

seed·reset·clock·queue·flag와 identity/domain/external fixture
개념 학습 45 XP 9분

간헐 실패의 상당수는 assertion이 아니라 공유 계정·남은 데이터·시간·queue·feature flag에서 나옵니다. 테스트 환경을 코드 버전과 같은 입력으로 보고 fingerprint를 남기며, fixture는 편의 함수가 아니라 상태 경계 계약 으로 설계합니다.
Fixture가 실패 원인을 감추지 않게 identity state, domain state, external sandbox를 분리하고 cleanup 또는 TTL을 둡니다. 긴 비즈니스 절차와 sleep·retry를 한 줄 helper 뒤에 묻지 않습니다.

| 상태 | 통제 방법 | 관측 신호 |
| Identity | 역할별 storage state·account pool | user·role·token expiry |
| Domain data | seed API·namespace·cleanup/TTL | seed version·record key |
| Async | clock·queue drain·webhook sandbox | job id·completion event |
| Runtime config | flag snapshot·env version | environment fingerprint |

- 1 상태 목록화 identity·domain·external·async 상태를 분리합니다.

- 2 소유 경계 fixture가 준비하고 정리할 범위를 제한합니다.

- 3 결정적 관측 sleep 대신 event·status·contract를 기다립니다.

- 4 Fingerprint seed·flag·version·queue 정보를 결과에 남깁니다.

실무에 남길 기준

- 환경과 데이터는 테스트 코드 밖의 숨은 입력이다
- 좋은 fixture는 편의보다 상태·권한·cleanup 경계를 드러낸다
- sleep을 늘리는 대신 완료 이벤트와 contract를 관측한다

[이전](/courses/agentic-testing/lessons/at-m1-quiz) 이해했어요 · 계속

---

에이전트용 사이트 안내: https://learning.reopt.ai/llms.txt · 사이트맵: https://learning.reopt.ai/sitemap.xml · 문의: https://learning.reopt.ai/contact
