为Struts的测试辩护!

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

一下摘自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无法测试的?不过这样的测试有点像在打补丁?不是吗?还是不清楚

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航