About This Course
In this course, you will learn how to write Unit tests and Integration tests in BDD style for Spring Boot applications as well as Spring WebFlux applications using JUnit 5, Mockito, AssertJ, Hamcrest, JsonPath, and Testcontainers frameworks.Recent update: I have added lectures on JUnit 5 fundamentals.Important note: This course is updated to use Spring Boot 3.Type the code along with me in the videos. If you follow along with me, then this will enhance your learning experience.The source code and PDF files (class notes) are available for download.Spring Boot OverviewSpring Boot is an opinionated framework that helps developers build Spring-based applications quickly and easily.The main goal of Spring Boot is to quickly create Spring-based applications without requiring developers to write the same boilerplate configuration repeatedly.Spring Boot is a popular framework for developing REST web services and microservices.Spring WebFlux OverviewSpring 5 includes Spring WebFlux, which provides reactive programming support for web applications.Spring WebFlux internally uses Project Reactor and its publisher implementations, Flux and Mono.The new framework supports two programming models:Annotation-based reactive componentsFunctional routing and handlingThis course will focus on building reactive REST APIs using annotation-based reactive components.What you'll learn?Learn JUnit 5 framework fundamentals.Learn to write industry-standard Unit and Integration tests in BDD (Behaviour Driven Development) style using Spring Boot Starter Test dependency from scratch.Learn how to use BDD (Behaviour Driven Development) format that is given/when/then to write Unit tests.Learn to Unit test the Spring boot application Repository layerLearn to Unit test the Spring boot application Service layerLearn to Unit test the Spring boot application Controller layerLearn how to do Integration testing for the Spring boot application.Learn how to do Integration testing using Testcontainers // very importantYou will learn to use the most important Unit Testing ANNOTATIONS - @SpringBootTest, @WebMvcTest, @DataJpaTest, and @MockBeanUse ALL the FRAMEWORKS in Spring Boot Starter Test - JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert, and JsonPath.You will learn to write Unit tests using Mocks and Stubs created with Mockito.Learn how to use Mockito annotations to create mock objects.Learn to Write Integration Tests using a MySQL database.You will learn to Write INDEPENDENT Integration tests for RESTFUL web services by talking with MULTIPLE LAYERS - controller, service, and repository layers.Learn Building Reactive CRUD REST APIs using Spring WebFluxLearn Unit Testing Reactive CRUD REST APIsLearn Integration Testing Reactive CRUD REST APIsTools and Technologies used in this course:Technologies and Libraries:Java 11+Spring BootSpring MVCSpring Data JPA ( Hibernate)JUnit 5 FrameworkMockito 4 (Latest)Hamcrest frameworkAssertJ LibraryJsonPath LibrarySpring WebFluxMongoDBIDE:IntelliJ IDEADatabase:H2 In-memory database ( for repository layer testing)MySQL database ( for Integration testing)MongoDB database (for Integration testing)
What you'll learn:
- Learn to write industry-standard Unit and Integration tests in BDD (Behaviour Driven Development) style using Spring Boot Starter Test dependency from scratch
- Learn how to use BDD (Behaviour Driven Development) format that is given/when/then to write Unit tests.
- Learn everything about JUnit Framework 5
- Learn to Unit test Spring boot application Repository layer
- Learn to Unit test Spring boot application Service layer
- Learn to Unit test Spring boot application Controller layer - Unit test REST API's
- Learn how to do Integration testing for the Spring boot application
- You will learn to use the most important Unit Testing annotations - @SpringBootTest, @WebMvcTest, @DataJpaTest, and @MockBean
- Use all the frameworks in Spring Boot Starter Test - JUnit, Spring Test, Spring Boot Test, AssertJ, Hamcrest, Mockito, JSONassert, and JsonPath.
- You will learn to write Unit tests using Mocks and Stubs created with Mockito
- Learn how to use Mockito annotations to create mock objects.
- Learn to write Integration Tests using a MySQL database
- You will learn to write independent Integration tests for RESTFUL web services talking with MULTIPLE LAYERS - controller, service, and repository layers.
- Learn to write Integration Tests using a Testcontainers
- Learn Building Reactive CRUD REST APIs using Spring WebFlux and MongoDB
- Learn Unit Testing Reactive CRUD REST APIs using JUnit and Mockito
- Learn Integration Testing Reactive CRUD REST APIs using WebTestClient