강의

멘토링

커뮤니티

Inflearn Community Q&A

dhfl07104559's profile image
dhfl07104559

asked

More Java, different ways to test your applications

Getting Started with JUnit 5

안녕하세요 @BeforeAll관련해서 질문이 있습니다.

Written on

·

384

0

안녕하세요

강의 감사히 잘보고 있습니다.

1.통합 테스트 작성중에 @BeforeAll를 사용하여 필요한 엔티티들을 DB에 넣었는데 , 롤백이 되지 않습니다.

테스트 클래스가 종료된 이후에 롤백되게끔 할 수 있는 방법이 있을까요??

 

Chaos-MonkeyArchUnitJUnitjavaJMetertestcontainersmockito

Answer 1

0

whiteship님의 프로필 이미지
whiteship
Instructor

아.. 그렇쵸. @BeforeAll의 반대되는 @AfterAll을 구현하여 넣었던 모든 데이터를 삭제하는 것은 어떨까요?

dhfl0710님의 프로필 이미지
dhfl0710
Questioner

직접 삭제해주는 수밖에 없나보군요 ㅜㅜㅜ

답변감사드립니다~!

dhfl07104559's profile image
dhfl07104559

asked

Ask a question