Testing Summary
Spring MVC applications are highly testable, due to their use of interfaces, Dependency Injection techniques, and decoupled designs. Both unit and integration tests can easily be written to test not only the domain model, but all layers of the application. The Spring Framework provides many classes inside spring-mock.jar to help with test creation and management. In combination with mock objects, the tests for your web components and other layers can provide immediate feedback for new features and refactorings. This leads to higher confidence in the system, and thus a greater ability to adapt the system to growing needs and requirements.
Above all, remember that tests should always run fast, whether you are testing a simple POJO or a complex web Controller. Tests that run fast are tests that are built and run during development, when they can catch issues earliest.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Seth Ladd, Darren Davison, Steven Devijver, and Colin Yates
About this chapter
Cite this chapter
(2006). Testing Spring MVC Applications. In: Expert Spring MVC and Web Flow. Apress. https://doi.org/10.1007/978-1-4302-0133-5_10
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0133-5_10
Publisher Name: Apress
Print ISBN: 978-1-59059-584-8
Online ISBN: 978-1-4302-0133-5
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)