liveBook · Manning

Software testing

As explained in Spring Start Here, Second Edition

The systematic evaluation of software behavior against expected requirements or outcomes.

A test is a small piece of code that checks whether application logic behaves as expected. Tests help catch regressions as an application changes and document behavior. section 15.0 section 15.4

Tests can focus on different scopes and follow a simple structure:

  • A unit test checks one isolated piece of logic; an integration test checks whether multiple components interact correctly. section 15.4
  • A mock is a controlled fake object that replaces a dependency the test does not need to check. section 15.4
  • Set assumptions and mock behavior, call the method, then validate its behavior. section 15.4

Why testing matters

The troubled 2013 Healthcare.gov launch illustrates the risk: required end-to-end testing was incomplete, and components with known defects were released. section 15.0

How Spring Start Here, Second Edition covers it

How deep it goes
Defines unit and integration tests, explains mocks, and outlines assumptions, execution, and validation.
Examples
Uses the 2013 Healthcare.gov launch to illustrate risks of incomplete end-to-end testing.
What you can do after
Evaluate application logic with unit or integration tests, using mocks and a structured test sequence.
How it connects
Connects unit tests, integration tests, and mocks.

Also explained in

Compare how 67 books explain software testing →

Related concepts

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