Skip to main content
CF

Testing Spring Boot Applications Masterclass

11h 51m 45s
English
Paid

Learn how to test Spring Boot apps with clear steps and real examples. You write unit, integration, and end‑to‑end tests. You use Spring Boot’s test tools to build safer code and catch bugs early.

What You Learn

You learn how each test type works and when to use it. You also learn how tests shape your design. You practice with small code samples and with a full app.

Tools You Use

You work with a wide set of testing tools that support Java and Spring Boot.

  • JUnit 5
  • Mockito
  • AssertJ
  • JSONAssert
  • Selenium and Selenide
  • WireMock
  • Testcontainers
  • LocalStack
  • Awaitility
  • Spring Test

Project You Explore

The course uses a full-stack microservice app. You test real features from front end to back end. This helps you see how each tool fits into daily work.

  • Java 21
  • Spring Boot 3
  • React 18
  • TypeScript 4
  • AWS
  • PostgreSQL
  • Keycloak

Who This Course Is For

This course is for developers who want cleaner code and fewer regressions. It helps you ship updates with more confidence and less guesswork.

Additional

https://github.com/rieckpil/testing-spring-boot-applications-masterclass

Watch Online 130 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 130 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Keeping the Course Content Up-to-Date
All Course Lessons (130)
#Lesson TitleDurationAccess
1
Keeping the Course Content Up-to-Date Demo
02:11
2
Setup for Java Development
03:21
3
Infrastructure Setup With Docker Compose
04:34
4
Application Architecture
02:24
5
Maven Dependencies
03:19
6
Flyway Migration Scri
01:40
7
Application Configuration
01:56
8
AWS SDK Overrides
00:49
9
Introduction to the Backend Code
03:48
10
Keycloak Configuration Walkthrough
02:39
11
Application Walkthrough
04:06
12
Anatomy of the dependency
03:45
13
Managing library versions
04:16
14
Writing Your First Test With JUnit 5
05:29
15
Verify the Test Outcome With Assertions
04:36
16
Lifecycle of a Test
05:37
17
More on Assertions
05:34
18
Specifying the Name of a Test
02:54
19
Write Parameterized Te
04:34
20
Your First JUnit 5 Extension
08:09
21
Happy-Path Testing
02:30
22
Parallelization of Te
04:56
23
Introduction to the Class Under Test
05:34
24
Mocking Method Calls With Mockito
07:50
25
Your First Test With Mockito
04:03
26
Mocking the Behaviour of the Repository
03:15
27
Instrumenting a Mock to Throw an Exception
04:43
28
Full Happy-Path Test With Mockito
04:47
29
Capture Method Argume and Verify Invocations
05:24
30
Introduction to Hamcrest
05:53
31
Introduction to AssertJ
06:41
32
Introduction to JSONAssert
04:39
33
Introduction to JsonPath
05:17
34
Things I Wish I Knew When I Started Testing Spring Boot Applications by Philip Riecks
40:17
35
Introduction to the JPA Domain Model
04:33
36
What to Test When Using Spring Data JPA
03:32
37
Start Using @DataJpaTest
07:04
38
Resolving context startup errors
02:13
39
Why and When to Use the TestEntityManager
03:09
40
Pitfalls of the First Level Cache
04:25
41
Transactional Support
02:53
42
Using P6SPY for More Insig
06:54
43
The Rationale Behind Not Using In-Memory Databases
03:11
44
Using Testcontainers for the First Time
11:02
45
Managing the Lifecycle of a Container
04:09
46
Improve Build Times by Reusing Containers
03:23
47
Solutions to Pre-Populate Your Database
08:42
48
Testing the Native Query
05:01
49
Recap of the Database Access Module
01:42
50
Why Unit Te Are Not Enough
04:37
51
Introduction to @WebMvcTest
03:05
52
Getting the Setup Right
06:11
53
Defining On Which Level to Mock
03:22
54
Your First Test With @WebMvcTest
09:01
55
More Te for the BookController
07:18
56
Introduction to the ReviewController
04:48
57
Verifying the First Behavior
06:29
58
Testing the First Secured Endpoint
06:01
59
Additional Ways to Provide Authentication
04:38
60
Happy-Path Testing For Creating Reviews
15:00
61
Ensure We Validate Incoming Reviews
03:26
62
Access to Role-Based Secured Endpoi
07:14
63
Recap and Learnings of This Module
03:47
64
Introduction to Testing HTTP Clie
03:39
65
The Power of @RestClientTest
03:31
66
First Test Using the MockReerviceServer
06:19
67
More Assertions for the Happy-Path
02:25
68
Handling Partial Responses
03:40
69
Test a Failure of the Remote System
02:54
70
More Expectations on the HTTP Request
05:49
71
Required Setup for the MockWebServer
06:39
72
Testing the Happy-Path Using MockWebServer
07:06
73
Verify Behavior on Partial Responses
02:05
74
Testing Failure of the Remote System
01:35
75
Implement and Test Retry Mechanism for More Resiliency
05:55
76
Which Logic to Verify
03:55
77
Getting the Setup Right for Testing the ReviewService
03:55
78
Verify the First Error Scenario
03:59
79
Ensure We Don’t Store Reviews With Bad Quality
03:44
80
Happy-Path Testing For Storing a Review
05:49
81
Choosing the Application Part for Isolated Testing
02:25
82
Introduction to LocalStack
04:32
83
Creating a Spring Application Context With Only One Message Listener
05:03
84
Understanding the Spring Cloud AWS Auto Configuration
04:29
85
Overriding the AWS SQS Client
03:46
86
Creating a Local SQS Queue and Applying the Configuration
06:49
87
Happy-Path Testing For the Whole Listener Process
07:05
88
New Spring Cloud AWS Sliced Test Context Annotation
03:09
89
Recap on How to Create a Sliced Spring Context for Testing
02:39
90
What's Currently Missing to Start the Whole Context
02:17
91
Creating an Integration Test Profile
07:27
92
First Try to Start the Whole Context
04:37
93
Introducing WireMock to Mock HTTP Communication
04:13
94
Creating an ApplicationContextInitializer for WireMock
06:36
95
Mocking the OpenID Configuration Response
05:31
96
Mocking the JWKS (JSON Web Key Set) Response
10:27
97
Making Use Of the WebTestClient to Access the Backend
09:03
98
Creating a Valid JWT to Access Our Endpoi
04:23
99
Verifying the Book Synchronization Process
06:57
100
Refactor Our WebClient to Mock the HTTP Response
09:19
101
Extract Integration Test Setup to a Central Place
06:47
102
Ensure Users Can Create Reviews
06:15
103
Develop the Missing API Endpoint Test-Driven (TDD)
07:17
104
Test the Statistics Endpoint With Reviews From Multiple Users
04:51
105
Recap of This Module About Integration Te
02:49
106
What’s Missing Compared to Writing Integration Te
03:46
107
Creating a Web Test Application Profile
06:39
108
Using Testcontainers to Start the Docker Compose Environment
06:22
109
Using Selenide to Write Concise Web Te
07:05
110
Writing the First Test With Selenide
03:53
111
Making Screensh During Test Execution
05:52
112
Further Hi on the Web Test Setup
01:50
113
Using Testcontainers With Selenide
03:42
114
Recording the Web Test With a Video
02:51
115
Inserting Reviews During the Web Test
05:19
116
Verifying the Outcome of the Test
02:22
117
Refactoring the Test to Page Obje
08:53
118
Recap on Writing Web Te
04:48
119
Defining Your Own Test Strategy
06:18
120
Naming Conventions for Your Te
04:42
121
Maven Surefire and Failsafe Plugin Configuration
06:32
122
Visualizing Test Resu Within a CI Server
03:16
123
Introduction to Context Caching
04:25
124
Context Caching in Action
04:17
125
Making the Most Of Spring’s Context Caching
05:00
126
How fixing a broken window cut down our build time by 50% by Philip Riecks @ Spring I-O 2022
48:40
127
Working With Time
05:25
128
Mocking Static Method Calls
06:05
129
Using GitHub Actions for Your Project
02:34
130
Thank You for Completing the Masterclass
01:04
Unlock unlimited learning

Get instant access to all 129 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
To enroll in this course, you should have a basic understanding of Java programming and familiarity with Spring Boot. Experience with tools like Maven and Docker Compose would be beneficial for setting up the development environment, as covered in the 'Setup for Java Development' and 'Infrastructure Setup With Docker Compose' lessons.
What projects will I work on during the course?
During the course, you will work on a full-stack microservice application. This project involves testing real features from front end to back end, using technologies such as Java 21, Spring Boot 3, React 18, TypeScript 4, AWS, and PostgreSQL. The hands-on experience helps you understand how each testing tool fits into daily development work.
Is this course suitable for beginners in testing?
This course is designed for developers with some experience in programming and an interest in improving their testing skills. It is not specifically tailored for complete beginners in testing, but it does cover foundational topics such as writing your first test with JUnit 5 and using Mockito, AssertJ, and other testing tools in a structured way.
How does the course compare in depth to other testing courses?
This course offers a comprehensive exploration of testing in Spring Boot applications, covering unit, integration, and end-to-end tests. It goes beyond basic testing concepts by using advanced tools like Selenium, WireMock, and Testcontainers. The course includes 130 lessons, providing a thorough understanding of how tests shape your design and improve code quality.
What testing tools will I learn to use in this course?
You will learn to use a variety of testing tools that support Java and Spring Boot, including JUnit 5, Mockito, AssertJ, JSONAssert, Selenium, Selenide, WireMock, Testcontainers, LocalStack, Awaitility, and Spring Test. These tools will be applied in practical exercises to test different aspects of a Spring Boot application.
What topics are not covered in this course?
The course does not cover basic Java programming or the fundamentals of web development. It assumes prior knowledge of Java and Spring Boot. Additionally, it does not delve into in-depth security practices or non-testing related aspects of AWS and PostgreSQL, focusing instead on testing strategies and tools.
How much time should I expect to commit to this course?
The course comprises 130 lessons, suggesting a substantial time commitment. While the exact duration depends on your prior experience and pace of learning, dedicating a few hours per week should allow you to progress steadily. The hands-on exercises and the full-stack project will require additional time for effective practice and understanding.