post/given-test-code/ #91
Replies: 1 comment 1 reply
-
안녕하세요, 윤! 시리즈 전부 잘 읽었습니다. 두 가지 궁금한게 있는데요. 1. 본문의 예시와 같이 데이터를 셋업하고, 테스트를 수행하려면 테스트용 데이터베이스를 프로비저닝해야만 할 것 같습니다. 테스트용 데이터베이스는 어떤 방식으로 프로비저닝하여 테스트에 이용하시는지, 2. jpa 의존성이 담긴 테스트를 실행하기 위해선 2-1. 만약 단순 메소드의 유닛 테스트에서 Spring Context를 Load하고 있지 않으시다면, 테스트에 필요한 Data Model을 생성하기 위해 Fixture 등을 관리하여야 할텐데 이 문제는 어떻게 해결하셨나요? 2-2. 만약 단순 메소드의 유닛 테스트에서 Spring Context를 Load하고 있으시다면, 각 테스트의 실행 속도뿐 아니라 테스트 전체의 실행 속도에 큰 영향을 미칠 것 같은데요. 이 문제는 어떻게 해결하셨나요? 그 외에도 여러 테스트간 데이터 격리가 잘 되지 않아 발생하는 데이터 정합성/경합의 문제도 있을 것 같아 여쭈어봅니다. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
post/given-test-code/
Mock 테스트 코드 작성 중에 마주한 문제들과 그 문제를 해결하는 방법과 노하우를 소개드립니다.
https://tech.kakaopay.com/post/given-test-code/
Beta Was this translation helpful? Give feedback.
All reactions