liveBook · Manning

Test

As explained in Spring in Action, Sixth Edition

An automated test is executable code that checks software behavior without requiring a human to perform each test step.

An automated test is executable code that checks software behavior without requiring a person to perform every step. A baseline Spring test checks whether the application context loads successfully. section 1.2.2

Baseline application test

A test class uses @SpringBootTest to load the Spring application context and @Test to mark contextLoads() as executable test code. The empty method passes when startup succeeds; run it with ./mvnw test.

How Spring in Action, Sixth Edition covers it

How deep it goes
Defines executable tests and demonstrates one context-loading test, but does not develop behavioral test cases.
Examples
Uses TacoCloudApplicationTests and its empty contextLoads() method as the baseline example.
What it assumes
Assumes a generated Spring project and begins with a test that checks only whether its application context loads.
What you can do after
Diagnose startup failures by running a Spring context-loading test through Maven.
How it connects
Connects testing with Spring Boot, the Spring application context, JUnit, and Maven.

Also explained in

Compare how 53 books explain test →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.