Advanced Spring: Effective Integration Testing with Spring Boot
1h 14mAdvanced2023-10-12
Authors

Terezija Semenski
Software Developer, Mathematician, Writer, and Learner
Course details
Writing and running tests is an essential part of delivering reliable software, but we don’t always do so as efficiently as we could. Have you ever been in a situation where all the tests pass, yet the application still doesn’t work? In this course, instructor Terezija Semenski gets you up to speed on how to take advantage of advanced testing features in Spring Boot. Terezija explains the importance of testing and shows you how to get started with Spring Boot libraries. She covers how to leverage a Spring Boot test slice to test only a small part of your application. Terezija goes over how to verify that cache has been implemented properly. She describes what a web controller actually does and ways to create integration tests against a web controller. Terezija goes over features that help with error handling and explains how to write an integration test without making an external API call. Terezija concludes by showing you how to keep the client and web app message contract in sync.
Skills covered
Spring BootSpringSecurity TestingWeb Development ToolsAdvancedCybersecurityWeb DevelopmentOpen Source
Concepts
0. Introduction
- 01 - Take advantage of Spring events
- 02 - What you need to know
- 03 - Why bother testing
1. Explore the Power of Spring Boot Libraries
- 04 - Creating a Spring Boot application from start.spring.io
- 05 - Creating human-readable tests with Mockito and AssertJ
2. Integration Testing Against a Real Database
- 06 - Effective ways to test your data access
- 07 - Writing integration tests for a JPA repository
- 08 - Challenge - Write tests for a custom query
- 09 - Solution - Write tests for a custom query
3. Integration Testing Against Services with Caching Support
- 10 - Writing integration tests for the service layer
- 11 - Writing integration tests for cache
- 12 - Challenge - Write an integration test for exceptions
- 13 - Solution - Write an integration test for exceptions
4. Integration Testing Against a Web Controller
- 14 - Which type of web controller responsibilities to test
- 15 - Writing integration tests for a web controller
- 16 - Testing custom exception returns
5. Integration Testing for the Client App
- 17 - Integration testing without making an external API call
- 18 - Writing integration tests for rest endpoints
- 19 - Introduction to Spring Cloud Contract
- 20 - Ensuring client app (rest call) and web app (controller) are in sync
Conclusion
- 21 - More Spring Boot integration testing resources
Related courses
Related learn paths
- Advance Your Spring Development Skills
- Getting Started with Software Testing
- Prepare for the Google Associate Android Developer Certification
- Prepare for the PMI-ACP Certification
- Develop Your Skills in Agile Software Development
- Develop Your Skills as a Software Project Manager
- Getting Started with Agile Software Development
- Starting Your Career in Tech: Data Science