服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

为struts的测试辩护!

一下摘自java视线论坛上很激烈的一篇帖子 [http://forum.javaeye.com/viewtopic.php?t=6947&postdays=0&postorder=asc&start=0]

strutstestcase for junit is an extension of the standard junit testcase class that provides facilities for testing code based on the struts framework. strutstestcase provides both a mock object approach and a cactus approach to actually run the struts actionservlet, allowing you to test your struts code with or without a running servlet engine. because strutstestcase uses the actionservlet controller to test your code, you can test not only the implementation of your action objects, but also your mappings, form beans, and forwards declarations. and because strutstestcase already provides validation methods, it's quick and easy to write unit test cases.

谁说struts无法测试的?不过这样的测试有点像在打补丁?不是吗?还是不清晰

扫描关注微信公众号