๐Ÿ“˜
study
Ctrlk
  • README
  • ๋ฐฑ์—”๋“œ
    • Spring
      • Concepts
        • dtoVo
        • gradle
        • log
        • springWebFlux
        • testCode
      • JPA
      • SpringMVC
      • SpringSecurity
      • springArticles
  • ํ”„๋ก ํŠธ์—”๋“œ
  • AWS
  • ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด
  • ๊ธฐํƒ€ ์ฃผ์ œ
Powered by GitBook
On this page
  • ์ฝ”ํ‹€๋ฆฐ์—์„œ์˜ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ
  • ์ฐธ์กฐ
  • ๊ถŒ์žฅ ์‚ฌ์šฉ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ
  1. ๋ฐฑ์—”๋“œ
  2. Spring
  3. Concepts

testCode

์ฝ”ํ‹€๋ฆฐ์—์„œ์˜ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑ

์ฐธ์กฐ

์Šคํ”„๋ง์—์„œ ์ฝ”ํ‹€๋ฆฐ ์Šคํƒ€์ผ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ž‘์„ฑํ•˜๊ธฐ mockito ์‚ฌ์šฉ๋ฒ•(mockito usage) SpringBoot @MockBean, @SpyBean ์†Œ๊ฐœ @SpyBean @MockBean ์˜๋„์ ์œผ๋กœ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ธฐ Spring @Mock, @Mockbean, @InjectMock Mockito @Mock @MockBean @Spy @SpyBean ์ฐจ์ด์  ์ •๋ฆฌ Test Double์„ ์•Œ์•„๋ณด์ž

๊ถŒ์žฅ ์‚ฌ์šฉ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

Java : Junit, AssertJ, Mockito Kotlin : Kotest, Mockk, SpringMockk

PreviousspringWebFluxNextJPA

Last updated 3 years ago