Testing Web Apps with Spring Framework
summary
Shows how to test Spring MVC controllers with concrete code: pure unit tests using mocks that run in milliseconds, controller-scoped integration tests with MockMvc scaffolding that serialize real domain objects to JSON and assert status, headers and JSON properties, and full Spring-context tests that run with a real (HSQL) DB loaded by @Sql scripts and take about a second to start (single setup) then seconds per suite. Uses Spring MVC Test framework (Spring 3.2+/4.x), request builders, JSON path assertions and exception verification.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 2:16Unit tests for controllers
- 8:40Spring MVC Test Framework
- 11:56Isolated integration tests
- 21:57Integration tests with context
- 30:15Extensions and resources
- 32:52Q&A
related talks
01h 03mWebinar: Testing Web Applications with Spring 3.2
48mTesting Spring Boot Applications Demystified
53mTesting Spring Boot Applications Demystified
02h 43mSpring Boot testing: Zero to Hero
50mTesting Spring Boot Applications
01h 49mSpring Boot testing: Zero to Hero
45mSpring Boot Test - A look behind the curtain
01h 27mGet the Most out of Testing with Spring 4.2
