20230404-test-code/ #33
Replies: 9 comments
-
글 잘 읽었습니다! 작성 해주신 코드 중에 테스트 대상 객체를 생성하기 위한 Fixture 를 확인할 수 있었는데요. 예를 들어 jobApplicant를 생성 할 때 현재는 create에 인자로 지원 상태만 넘겨주어서 생성 하고 있지만, 다른 값을 더 커스텀 하고 싶다거나, 예를 들어 지원서 같은 데이터를 관계로 추가 하고 싶다거나 테스트 상황마다 데이터가 미묘하게 다른 지원자 객체가 필요한 경우 Fixture 내부에서 그 구현 종류를 늘려 가시는지, 아니면 중복이 어느정도 있더라도, 테스트 내부에서 각각 변경된 값을 setter와 같은 메서드 호출해서 변경 하시는지 궁금합니다! |
Beta Was this translation helpful? Give feedback.
-
@jin3378s 안녕하세요🙂 그리고 만약 만들어질 Fixture는 최대한 외부에서 주입되어 유연해질수 있도록 내부에서 객체를 생성하는 방향보다는 default parameter를 사용합니다. |
Beta Was this translation helpful? Give feedback.
-
@haruInflearn Fixture 함수 만들다가 너무 많은 기능이 들어가는것 같아 고민하던 와중이어서 한번 여쭤 봤습니다! 좋은 글에 좋은 답변 까지 감사합니다! |
Beta Was this translation helpful? Give feedback.
-
덕분에 테스트에 대해서 좋은 인사이트를 얻을 수 있었습니다! 읽으면서 궁금했던 점이 몇 개 있는데요
|
Beta Was this translation helpful? Give feedback.
-
테스트를 작성하며, 프로젝트가 더욱 난해해지는 이상한 경험을 하고 있는데, 테스트 간 결합도 & 결과를 거증할 것을 잘 고려해봐야겠네요.. 덕분에 배워갑니당 |
Beta Was this translation helpful? Give feedback.
-
@stae1102 님 안녕하세요🙂
|
Beta Was this translation helpful? Give feedback.
-
좋은 정보 감사합니다!! |
Beta Was this translation helpful? Give feedback.
-
잘 읽었습니다. 중복보다는 가독성에 중점을 두자! 잘 가져가겠습니다 :) |
Beta Was this translation helpful? Give feedback.
-
잘 읽었습니다. 좋은 글 써주셔서 감사합니다. 혹시 테스트 코드 작성과 관련하여 추천해주실만한 책이나 강의, 영상이 있을까요? |
Beta Was this translation helpful? Give feedback.
-
테스트 코드를 왜 그리고 어떻게 작성해야 할까?
테스트 코드가 필요한 이유와 잘 작성하는 방법에 대해 공유합니다.
https://tech.inflab.com/20230404-test-code/
Beta Was this translation helpful? Give feedback.
All reactions