<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/57078542-8f42-48aa-8b05-305907951923/def.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/57078542-8f42-48aa-8b05-305907951923/def.png" width="40px" /> The *test pyramid* is a way of thinking about how different kinds of automated tests should be used to create a balanced portfolio. Its essential point is that you should have many more low-level UnitTests than high level BroadStackTests running through a GUI. - Martin Fowler

</aside>

Untitled


과거에 테스트 자동화는 ui를 통해 이루어지는 interaction을 체크하는 것을 의미하는 경우가 많았다. 그러한 테스트는 초반에는 그리 문제도 되지 않고 프로그래밍을 전혀 할줄 모르는 사람도 테스트를 수행할 수 있다.

조금만 지나면 이런 테스트는 망한다. ui를 통한 테스트는 느리고 cost가 높다. 이런 테스트는 “headless” mode로 돌릴 수 없다. script로 자동 검사하거나 배포 파이프라인의 중간에 삽입될 수 없다.

요약하자면 ene-to-end로 동작하는 UI test는

단위 테스트는

Unit End-to-End
Fast 🐰 🐢
Reliable ⬆️ 👎