Skip to main content

Testing Spring MVC Applications

  • Chapter
Book cover Expert Spring MVC and Web Flow
  • 804 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics