Skip to content
AITroveRead. Build. Understand.

Testing

Choose the right test boundary

Spring testing tools isolate object, container and HTTP contracts through selected fixtures.

Learning roadmap

Read the contract, run the source-kit checks, and inspect a rejected input before extending the application. This subject covers Spring and Spring Boot together; Java language lessons remain in their own subject.

Prerequisites

Use Java object ownership, interfaces, exceptions and Maven builds before the framework-specific lessons.

Section lessons

Continue learning

Boot Foundations, Spring Core, Web APIs, Data & Transactions, Security, Production, Exercises, Quizzes, Projects.

Kafka verification layers

GraphQL test scope

R2DBC dependency and test scope

Spring AI boundary lessons

Modulith module and event boundaries

Batch fault handling

Modulith event and module tests

Batch recovery and rejected-row review

Batch metadata and hard-stop recovery

Testcontainers connection lifecycle

Container schema and test isolation

Spring testing boundaries

Test slice and transaction boundaries

Curriculum

Run the source-kit fixture and inspect its rejected boundary.

  1. 1Spring MockMvc standalone tests: know which HTTP layers were assembled

Run the source-kit test and inspect the rejected case.

  1. 1Spring test failures: prove the layer that can reject the request

Run the local fixture and inspect the retained state.

  1. 1Test a Spring worker at admission, lease and replay boundaries

Trace both accepted and rejected tenant requests.

  1. 1Test Spring JWT authorization through filters, service proxy and SQL

Trace a tenant-scoped command from token to committed rows.

  1. 1Spring command rollback test: inspect state after an injected failure

Check byte, storage and operational health boundaries.

  1. 1Spring MockMvc multipart tests: what the fixture proves

Trace ownership, retry and duplicate delivery boundaries.

  1. 1Spring relay failure trace: inspect persisted state at each cut point

Trace scheduled claims, retries and duplicate-safe completion.

  1. 1Spring relay integration tests: prove the boundaries H2 cannot

Check effective settings and staged database writes.

  1. 1Spring schema rollout tests: check old and new writers at every phase

Check selected settings and the staged database startup path.

  1. 1Spring Boot migration tests: distinguish a test starter from a runtime rollout

Follow the boundary from local fixtures to a release test.

  1. 1Spring release tests: distinguish context checks from process and platform checks

Read the checked transport, timeout and replay contracts.

  1. 1Test Spring RestClient on a socket without claiming a remote service

Distinguish child-process checks from deployment checks.

  1. 1Spring Boot config tests: what a child JVM proves and what deployment still owes

Separate local child-process proof from platform secret delivery.

  1. 1Spring Boot file-tree tests: prove binding without claiming secret delivery

Trace producer, consumer and recovery cut points without treating local tests as broker evidence.

  1. 1Spring Kafka testing layers: know what a direct listener test cannot prove

Check schema execution, authorization, costs and verification scope.

  1. 1Spring GraphQL service tests: stop short of claiming an HTTP endpoint

Check subscription, binding, rollback and fixture dependency scope.

  1. 1Spring R2DBC fixture isolation: keep incompatible H2 versions out of one test classpath

Read the application contract and its unverified integration boundary.

  1. 1Spring AI evaluations: separate model quality from enforced safety contracts

Read the checked local boundary and the next integration test.

  1. 1Spring Batch restart boundaries: recorded failure versus abrupt process loss

Run the checked local boundaries, then identify the production failure windows still open.

  1. 1Spring Batch restart test matrix: separate failure, process loss and changed input

Check the actual repository, input snapshot and recovery decision.

  1. 1Spring Batch restart tests: assert metadata rows, not repeated ID values

Follow one operation through its failure path and linked application boundary.

  1. 1Spring Boot Testcontainers: service connections and cached-context lifecycle

Storage details