스프링
Spring Junit 어노테이션
세객
2019. 10. 28. 11:20
@BeforeClass
- static 으로 메서드 작성, 1회만 실행됨
@Before
- @Test 메서드가 실행될 때 마다 실행된다
@BeforeEach
- @BeforeEach = @Before
@BeforeAll
- @BeforeAll = @BeforeClass
https://www.baeldung.com/junit-before-beforeclass-beforeeach-beforeall
@Before vs @BeforeClass vs @BeforeEach vs @BeforeAll | Baeldung
Learn about the difference between JUnit annotations that can be used to run logic before tests.
www.baeldung.com