TestExecutionListener
목표 TestExecutionListner가 무엇인지 이해한다. TestExecutionListner의 사용법을 이해한다. TestExecutionListner Junit의 @BeforeEach, @AfterEach, @BeforeAll, @AfterAll 같이 테스트 라이프사이클에 추가적으로 동작해야 되는 내용이 있을 때 사용할 수 있다. Spring test에서 제공하는 인터페이스로 이를 상속해서 구현할 수 있다. 인터페이스 public interface TestExecutionListener { default void beforeTestClass(TestContext testContext) throws Exception {}; default void prepareTestInstance(TestContext testContext) throws Exception {}; default void beforeTestMethod(TestContext testContext) throws Exception {}; default void afterTestMethod(TestContext testContext) throws Exception {}; default void afterTestClass(TestContext testContext) throws Exception {}; } beforeTestClass: 클래스 내의 모든 테스트를 실행하기 전에 실행한다....