Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Testing Book or Tutorial

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm seeking a good book and/or tutorial on unit testing for Spring Controllers/Views. Some books will discuss testing but then give you very simplistic examples that you couldn't use in a real project. I guess a focus I'd like to see a focus on a strategy for interacting with other application layers, such as mock objects you're accessing from the database/hibernate layer. How do I get at the request, response, and session, etc to test whether certain objects or values are present.

Thanks
 
author & internet detective
Posts: 41944
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good testing techniques aren't specific to Spring. Either you are unit testing (in which case the technology doesn't matter) or integration testing through a UI (in which case the browser is the technology.)

"Test Driven" is an excellent read with non trivial examples in both spaces.
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic