개발/Spring
SPRING_Framework Test 환경 구축
Zziny
2021. 10. 19. 00:53
pom.xml -> junit , spring-test, hamcrest-all 최신버전으로 추가/수정
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.3.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
src/test/java 랑 src/test/resources 사용
Spring Framework의 Mock객체 사용
*org.slf4j.Logger : 로그 남길 때 사용