0

I am using the Spring MVC Test framework in Spring 3.2.4, and one problem I have with it is that it continuously traps exceptions. For example, if you perform a POST with JSON data (or anything really), and a NullPointerException or Jackson MappingException is thrown, it doesn't just report it in the console output like a regular test - it traps it and does something else with it - or sometimes suppresses it altogether and forces me to create temporary @ExceptionHandler methods in my controllers or manually invoke andDo(print()) just to see what went wrong.

How can I get spring-mvc-test framework to just report errors like any other test? I use IntelliJ IDEA, and I just want to see the exception stack track and have full clickability with respect to line numbers and such offered by the IDE. Without this most basic testing feature, creating and debugging tests with Spring MVC test framework is actually really a pain.

I really appreciate the help.

egervari
  • 22,372
  • 32
  • 121
  • 175

0 Answers0