Unit testing JSPs in embedded mode

后端 未结 2 1960
半阙折子戏
半阙折子戏 2021-01-03 08:19

I am in process of building up a small framework that does unit testing for JSPs. These JSPs have some custom tags, otherwise they are not any special.

Although ther

2条回答
  •  礼貌的吻别
    2021-01-03 08:59

    Take a look at HttpUnit - http://httpunit.sourceforge.net/. It comes bundled with ServletUnit which is an in memory servlet engine that will handle JSPs. This should usually only be used to test the View portion of a properly factored MVC application or to do some Integration/Acceptance tests.

    Business logic should be tested directly from the POJOs.

提交回复
热议问题