1

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.

Taoufik Mohdit
  • 1,910
  • 3
  • 26
  • 39
newbie
  • 527
  • 2
  • 8
  • 13

1 Answers1

1

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

Biju Kunjummen
  • 49,138
  • 14
  • 112
  • 125
  • Not necessarily, you can unit test just the controller by mocking out all its collaborators. DBUnit will come in only if you want to do an end to end integration test from controller down. – Biju Kunjummen Jul 18 '13 at 14:43
  • What i mean is, I also need to test DAO.. That should be DBUnit right? – newbie Jul 18 '13 at 15:18