Spring Framework

Testing Spring Boot Applications Masterclass

8 Modules 22 Chapters 127 Lessons Intermediate

About this course

Learn everything you need to know about testing Spring Boot applications.

The Testing Spring Boot Applications Masterclass is a deep-dive course on testing your Spring Boot applications. You'll learn how to effectively write unit, integration, and end-to-end tests while utilizing Spring Boot's excellent test support.


Make the most of testing libraries like JUnit 5, Mockito, Selenium, WireMock, Testcontainers, LocalStack, Awaitility, Selenide, and Spring's excellent test support while using a real-world application example: Java 14, Spring Boot 2.4, React, TypeScript, AWS, PostgreSQL, and Keycloak.

Testing Spring Boot Applications Course Map

 Get more information about this Masterclass here .

Course Structure

2 Chapters

Testing Database Access

Start writing efficient tests for your database layer while utilizing Spring Boot test features like @DataJpaTest, TestEntityManager, @Sql, etc.

Furthermore, with this module you'll start using Testcontainers to replace the default in-memory database, learn how you can pre-populate your database, and understand the pitfalls when writing tests where the EntityManger is involved.

2 Chapters

Testing the Web Layer

MockMvc to the rescue!

Learn how to effectively test your web-layer (@RestController and @Controller) in isolation. You have your endpoints secured with Spring Security? No problem! There is great support available to ensure only authenticated users with the correct privileges reach your endpoints. 

4 Chapters

Testing Further Slices of Our Application

Ever wanted to know how to test your WebClient or RestTemplate HTTP calls? How to ensure your business logic is working as expected and how to verify your messaging controllers?

In this module, we'll tackle further slices to effectively test different parts of our application in isolation. In addition, we'll write our own test slice.

2 Chapters

Writing Web Tests

Writing end-to-end tests to ensure users can interact with your application.

Having automated web-tests for your happy-paths can literally save your ass. We'll make the most of Selenium and Selenide by verifying the Book Reviwr application without any manual WebDriver setup (including VNC recording, screenshots on failure, etc.).

4 Chapters

Testing Best Practices

​Build tool configuration, test strategies, naming strategies, testing static methods, working with time, test report visualization within your CI (e.g. Jenkins, GitLab CI, Azure DevOps) server, etc.

... and ​last but not least: ​Drastically reduce your build times with Spring's Context Caching mechanism.