Tests that catch wiring, persistence and HTTP failures
Prerequisites: 01-ecosystem
Which test can prove the behavior?
Goal & mental model verified
Boot supports focused test slices and full-context tests. A slice loads a constrained subset; a full application test exercises broader wiring. Different scopes answer different questions.
[S48] [S25]Worked example · design exercise synthesis
Test pricing rules with ordinary objects; validate controller errors with an MVC slice; exercise repository mappings against a representative database; reserve full application tests for critical integration flows.
[S48] [S25]Engineering decision synthesis
Pick the cheapest test that can detect the targeted failure. Real infrastructure tests cost time but can expose SQL, serialization and configuration problems that mocks cannot.
[S48] [S25]Pitfall & diagnosis synthesis
A mocked repository cannot establish real transaction rollback. Test-managed transactions can also conceal commit-time behavior; choose the test boundary to match the production failure.
[S48] [S25]Improve & validate synthesis
Build a few high-value scenarios: authorization denial, conflict/rollback, malformed requests and startup misconfiguration. Track failure relevance rather than chasing coverage percentage alone.
[S48] [S25]Check yourself: Can an MVC slice validate real database rollback?
Not by itself. It typically excludes the persistence infrastructure required to prove it.