How to unit test a Spring MVC annotated controller?

后端 未结 3 1340
陌清茗
陌清茗 2020-12-24 03:41

I am following a Spring 2.5 tutorial and trying, at the same time, updating the code/setup to Spring 3.0.

In Spring 2.5 I had the HelloControlle

3条回答
  •  心在旅途
    2020-12-24 04:04

    You can also look into other web testing frameworks that are independent of Spring like HtmlUnit, or Selenium. You won't find any more robust strategy with JUnit alone other than what Sasha has described, except you should definitely assert the model.

提交回复
热议问题