With this course, you will be able to write clean and clear test code, exactly as it is developed in practice. This lecture is for anyone curious about why test code is necessary and what constitutes good test code.
How to write robust test code that ensures production code quality
How to Write Test Code in Spring & JPA-Based Projects
Test Framework - JUnit5
Mock framework - Mockito
Documentation Automation Tool Using Test Code - Spring REST Docs
Correct test code for your practice I'll be the first step for you!
Is test code really that important? 🤔
Yes! Without test code, it is difficult to ensure a certain level of quality of the application I have created. How much time and money would it take if people were to manually test each and every new feature added or existing features modified?
You can create more robust applications if you can verify your code as often as you want through automated test code . The confidence I gain when refactoring is a bonus, because the tests ensure that the code I wrote works as intended!
I know we need test code, but I have no idea how to write this. 😵💫
Even if you know the importance of test code, if the test code is difficult to read or poorly written, it can easily become another source of trouble. If it is difficult to tell what is being tested or if it is complicated and difficult to maintain, you will not touch the test code as time goes by.
In this lecture, we will teach you how to write clean, clear test code that can evolve with changes in production code.
In this lecture 📖
Testing Framework
We will cover JUnit5, a Java-based testing framework, and Mockito, a mock testing framework. We will discuss in detail, with case-by-case examples, what to verify and in what situations it would be good to use mock objects.
Spring and JPA, layered architecture based testing
We will build an API server based on a layered architecture and discuss how to write test code for each layer. We'll cover the technology itself, but also the fundamentals of writing clean tests in any language or using any technology.
Topics covered in practical code reviews
I have included in the lectures the various questions and related answers I received while working as a reviewer for the Elegant Tech Course and Elegant Tech Camp Pro. Through lectures, you can naturally come into contact with the topics that are dealt with and considered in actual practice.
Keyword summary for one-step growth
Rather than simply covering testing-related topics, it provides a foundation for further growth as a backend developer. At the end of each section, we provide related core keywords covered in the lecture and keywords for in-depth learning, allowing you to broaden your horizons in development knowledge.
Detailed instructions and charts, and example projects you can follow along with.
We present key points and several illustrations for each topic to help with understanding, and after explaining the concepts, we proceed with coding through an example project. It is structured so that you can increase your understanding by following the code from beginning to end.
To these people I recommend it🙌🏻
The curriculum Check it out ✨
Q&A 💬
Q. I don't know much about Spring and JPA yet. Can I still take the course?
I'll give you a brief overview of what's required, but a basic understanding of Spring and JPA is required. However, it does not cover very complex content, so if you have experience creating APIs with the technology once or twice, it will be sufficient. I think it would be a good idea to learn together when you come across something you don't know :)
Q. I’m curious about the practical environment!
In order to show you how to develop in practice as closely as possible, we use the IntelliJ Ultimate license by default. I'm using macOS, but I applied the IntelliJ shortcut plugin for reference for those using other operating systems.
Spring Boot uses version 2.7.7, but you can take the course with a higher version without any problems. For more information, please refer to the open lecture [Introduction to Sample Project & Development Environment Guide]. :)
Q. Can I take any section I want first, regardless of the order?
Since this lecture shows production code and test code that gradually develop within one large flow, I recommend learning sequentially from the previous section. :)
Recommended for these people
Who is this course right for?
For those who wonder why test code is needed
Those who have learned Spring and JPA but don't know how to write test code.
Everyone who wants to write clean and clear test code
Need to know before starting?
Those who have developed basic APIs based on Spring and JPA at least once!
Hello This is
5,336
Learners
389
Reviews
367
Answers
4.9
Rating
5
Courses
안녕하세요 ☺️ 몰입을 즐기는 개발자, 박우빈입니다.
(현) 캐치테이블(와드) 소프트웨어 엔지니어
(전) 우아한형제들 소프트웨어 엔지니어
우아한테크코스 3기, 4기 리뷰어 / 우아한테크캠프pro 1기 리뷰어 / 그 외 다양한 리뷰어 활동
Hello, instructor!
I am a new backend developer in my 4th month.
I listened to it because I had to use RestDocs at work.
As a result, I felt the need for testing,
and I was able to learn how to write test code.
However, the part that I am most satisfied with is that you taught me how to use it in the field.
Of course, I was also very grateful that you answered my questions accordingly.
I was especially grateful that you taught me how to distinguish DB endpoints through @Transactional(readOnly = true),
and how to distinguish RequestDto and ResponseDto between Service and Controller,
and in response to my question, you explained that
the performance of the application is more important than the readability of the code,
and that there are parts where the readability of the code decreases,
so I refactored my actual code!
Oh, and I'm using it well because you also told me about guava. ㅎㅎ
I really came to learn RestDocs, but it was a lecture where I gained a lot more as a bonus.
Thank you so much for the lecture again.
In addition,
I think it would be good if you could share your field experience,
and make a project lecture for the field.
Many of Inflearn's lectures are focused on students or job seekers,
and of course, there would be more demand for those parts,
but I don't think there are any project-based lectures that really target the field and have high-density concerns.
If there were an advanced lecture that goes beyond simple learning,
and if the instructor filmed it, it would be really, really great.
This is my personal wish, so thank you for reading^^
Even if it's not a project lecture,
I will definitely take the instructor's other lectures.
I personally think that developers are people who constantly think,
and in that respect, I felt that the instructor's thoughts were in line with mine (as an answer to my question),
and it was an honor.
When I start writing test code again in earnest
I will review the lecture
and ask questions again.
Thank you.
khd1692~! Wow, such a sincere course review 🥲
I was wondering whether to include RestDocs in the curriculum, but it was a good decision!
I'm thinking about the next lecture in many ways. ㅎㅎㅎ
Thank you so much for the sincere course review, and I'll be rooting for your future learning journey~! ☺️
Hello, I am a developer with 6 years of experience.
I only know the general idea of test code and actually haven't used it much in practice.
My conclusion is that there are many experienced developers who can't write test code elegantly. In fact, I thought it was "annoying" before watching this lecture.
I am one of those developers. However, I changed my mind after watching this lecture. I am a senior developer and a developer who was afraid of test code, so I learned a lot from this opportunity. In addition, JPA is taught in a way that is close to practice, and if you don't have the basics, you may wonder "Why?", but this is exactly the lecture I wanted.
Thank you.
Thank you, Choi Kang-developer, for your detailed course review~!
"Your thoughts on test code have changed" is the best compliment I can give.
I'm so glad it was helpful.
I, who taught the course, have often felt that test code is annoying, so let's keep reminding ourselves why we need to keep thinking about and writing quality test code, and let's fight together in the field~!
Thank you :)
First of all, I would like to thank you.
During the 12 hours of lectures, I was able to have a productive time thinking about the intention and purpose of writing tests. In addition, I was able to get a grasp on the vague concepts of tests, and I was able to be motivated to develop an uncompromising development spirit.
In the future, I will not rest on my laurels, but will apply the test code knowledge I have learned here and there, and grow into a developer who can write tests regardless of the tools!
lango! I'm greedy, so I talked about this and that, so the lecture became quite long, but I'm glad that my sincerity was conveyed well. ㅎㅎㅎ
I hope we can continue to grow together as solid developers with test codes in the future.
Thank you for leaving a review! ☺️
I have been writing tests without any knowledge until now..
This lecture helped me build the basics to create more robust code.
I recommend this lecture.
Mokdong Developer! I'm glad I can join you in building your basics.
Sometimes writing tests is hard, but let's work hard together. ㅎㅎㅎ
Thank you for leaving a review! ☺️
This lecture really scratched my itch when it came to testing.
I was studying alone and had no place to get feedback on test codes, so I was looking through several project repos from IT clubs or educational programs and thinking about how to write test codes. This lecture really helped me.
Now that I know the direction and method to some extent, I just need to learn it myself and make it my own.
Thank you for the great lecture. I could feel that you put a lot of effort into preparing the lectures. Thank you.