Search code examples
javaunit-testingspring-mvcmodel-view-controllerspring-mvc-test

MVC and Spring MVC Unit Testing


Can i Unit test MVC framework using Spring MVC Unit testing.. if it is possible, what setup do i need to do?
I want to do only annotation testing.
If it's possible. Sorry for a noob question, I'm really having a hard time figuring this out.


Solution

  • Yes, there is a very good support for testing Spring MVC tier using Spring-MVC test framework - more details here - http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/testing.html#spring-mvc-test-framework