#목
-
단위 테스트 정리 3 - 목과 테스트 취약성책책책 책을 읽읍시다/프로그래밍 2022. 7. 4. 23:17
목과 테스트 취약성 테스트 대역은 모든 유형의 비운영용 가짜 의존성을 설명하는 포괄적인 용어다. 주 용도는 테스트를 편리하게 하는 것이고, 테스트 대상 시스템으로 실제 의존성 대신 전달되므로 설정이나 유지 보수가 어려울 수 있다. 테스트 대역은 더미, 스텁, 스파이, 목 페이크 총 5가지가 있고, 크게 목과 스텁의 두 가지 유형으로 나눌 수 있다. 목은 외부로 나가는 상호 작용을 모방하고 검사하는 데 도움이 된다. 이러한 상호 작용은 SUT가 상태를 변경하기 위한 의존성을 호출하는 것에 해당한다. 스텁은 내부로 들어오는 상호 작용을 모방하는 데 도움이 된다. 이러한 상호 작용은 SUT가 입력 데이터를 얻기 위한 의존성을 호출하는 것에 해당한다. 목은 SUT와 관련 의존성 간의 상호 작용을 모방하고 검사하..