17 Testing Spring Boot applications

 

This chapter covers

  • Creating a project with Spring Initializr
  • Moving a Spring application tested with JUnit 5 to Spring Boot
  • Implementing a test-specific Spring Boot configuration
  • Testing a Spring Boot application feature with JUnit 5

Working with Spring Boot is like pair-programming with the Spring developers.

—Anonymous

Spring Boot is a Spring convention-over-configuration solution. It enables the creation of Spring applications that are ready to run immediately. Spring Boot is an extension of the Spring Framework that strongly reduces the initial Spring application’s configuration: a Spring Boot application is preconfigured and given dependencies to outside libraries so that we can start using it. Most Spring Boot applications need very little (or no) Spring configuration.

Definition

Convention over configuration—A software design principle adopted by various frameworks in order to reduce the number of configuration actions a programmer using that framework needs to perform. The programmer only needs to specify the nonstandard configuration of the application.

17.1  Introducing Spring Boot

A shortcoming of the Spring Framework is that it takes some time to make the application ready for production. The configuration is time-consuming and can be a little overwhelming for new developers.

17.2  Creating a project with Spring Initializr

 
 

17.3  Moving the Spring application to Spring Boot

 
 

17.4  Implementing a test-specific configuration for Spring Boot

 
 

17.5  Adding and testing a new feature in the Spring Boot application

 
 

17.6  Summary

 
 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest