GREAT STEP
테스트코드를 위한 위대한 발자국
Covenant Ko
STEP 1.
JPA
Covenant Ko
Chapter 4
JPA
How to Test?
JPA 스터디 맞습니다..
- Name. Covenant Ko
- Company. 11번가
- Github 용감한친구들 Organization Founder & Maintainer. https://github.com/brave-people
- Github. https://github.com/KoEonYack
- Tech Blog. https://covenant.tistory.com/ (누적 방문 41만)
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
Week 1
Week 2
Week 2
Week 3
8. .
8. .
9. ?
8. .
9. ?
10.
8. .
9. ?
10.
11. TDD, DDD .
8. .
9. ?
10.
11. TDD, DDD .
12. MVC ?
8. .
9. ?
10.
11. TDD, DDD .
12. MVC ?
13. JPA ?
8. .
9. ?
10.
11. TDD, DDD .
12. MVC ?
13. JPA ?
14. ? ?
8. .
9. ?
10.
11. TDD, DDD .
12. MVC ?
13. JPA ?
14. ? ?
Week 4
?
?
https://youtu.be/sJiPXZmdidg
?
https://techblog.woowahan.com/2613/
?
https://techblog.woowahan.com/2613/
?
https://techblog.woowahan.com/2613/
확인이 어려운 문제
?
https://techblog.woowahan.com/2613/
https://www.slideshare.net/OKJSP/okkycon-120498066
1.
2. ( )
3. ( ..)
4.
5. ? ( Insert ?)
6. ( ? , , ?)
?
https://postshare.co.kr/archives/101972
https://www.slideshare.net/WooseopKim3/gdg-and-kor
1. .
2. , , ,
3. , ,
4.
?
https://postshare.co.kr/archives/101972
https://www.slideshare.net/WooseopKim3/gdg-and-kor
MVC
https://www.slideshare.net/gyumee/ss-90206560
DB
MVC
UI
how we write/review code in big tech companies
https://youtu.be/rR4n-0KYeKQ
테스트 실패
how we write/review code in big tech companies
https://youtu.be/rR4n-0KYeKQ
이해를 못하고 바빠서 삭제 후 Pull Request
how we write/review code in big tech companies
https://youtu.be/rR4n-0KYeKQ
왜 지웠는지 모르겠고 승인
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
1. .
2. @SpringBootTest
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
1. , , ,
2. .
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
1. .
2. DB Repeatable
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
1. .
2. console out … Assert
FIRST Rules
Robert C. Martin (Uncle Bob) F.I.R.S.T
Fast
Independent
Repeatable
Self-validating
Timely
https://galid1.tistory.com/772#unnecessarymockito-2x-%EB%B2%84%EC%A0%84%EC%9D%98-%EC%82%AC%EC%9A%A9%ED%95%98%EC%A7%80-%EC%95%8A%EB%8A%94-%EC%8A%A4%ED%85%81%EA%B0%90%EC%A7%80
1. Test Code .
2. TDD .
Service Layer Test Code
Service Layer Test Code
1. F.I.R.S.T First
2.
Service Layer Test Code
3. F.I.R.S.T Repeatable
4. DB Repeatable
1. F.I.R.S.T First
2.
Service Layer Test Code
Mockito !
3. F.I.R.S.T Repeatable
4. DB Repeatable
1. F.I.R.S.T First
2.
Mockito ?
, , Mock(
)
https://velog.io/@max9106/Mockito-Mockito%EB%9E%80
Mockito ?
https://velog.io/@max9106/Mockito-Mockito%EB%9E%80
Tasty mocking framework for unit tests in Java (site.mockito.org)
, , Mock(
)
Mockito ?
https://velog.io/@max9106/Mockito-Mockito%EB%9E%80
Tasty mocking framework for unit tests in Java (site.mockito.org)
, , Mock(
)
Mockito ?
https://knowyourmeme.com/memes/ito-suffix
https://velog.io/@max9106/Mockito-Mockito%EB%9E%80
Tasty mocking framework for unit tests in Java (site.mockito.org)
A smaller version of a larger thing
Imitate (someone or something)
, , Mock(
)
1. given .
2. given
1. 100 ? (ex. God Object)
2. Mocking ?
2. Jackson Json String ?
https://exceptionnotfound.net/god-objects-the-daily-software-anti-pattern/
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.researchgate.net%2Ffigure%2FAn-example-of-god-object-Web-service_fig1_307572331&psig=AOvVaw3n8qSAYig1IAvNLo-XG-6H&ust=1630764224837000&source=images&cd=vfe&ved=0CAwQjhxqFwoTCJCf07X84vICFQAAAAAdAAAAABAV
Mockito
https://zhangyuhui.blog/2018/02/09/how-mockito-dose-the-mock/
MockMVC
Client
WAS
MockMVC
Client
Spring MVC
Spring MVC
HttpServletRequest
HttpServletResponse
Mock Request
Mock Response
https://www.slideshare.net/gyumee/ss-90206560
?
Right-BICEP
Right: ?
Boundary: ?
Inverse: ?
Cross-check: ?
Error condition: ?
Performance: ?
https://www.slideshare.net/gyumee/ss-90206560
Troubleshooting
Service Service
Service
Service
Service
Service
Troubleshooting
Service Service
Service
Service
Service
Service
1. (Functional Decomposition)
2. (Abstract Data Type)
3. (Object-Oriented)
Functional Decomposition
Flow
https://hucet.tistory.com/71
Functional Decomposition
Flow
https://hucet.tistory.com/71
Functional Decomposition
Flow
https://hucet.tistory.com/71
Functional Decomposition
Flow
: -> Scope
https://hucet.tistory.com/71
https://hucet.tistory.com/71
Functional Decomposition
Flow
Functional Decomposition
Flow
https://hucet.tistory.com/71
Functional Decomposition
Flow
1. Open-Closed
2. QA
https://hucet.tistory.com/71
GREAT STEP
테스트코드를 위한 위대한 발자국
Covenant Ko
STEP 1.

GREAT STEP 1. 테스트 코드를 향한 위대한 발걸음