struts2 junit plugin
从 struts2官网 下载的struts2-junit-plugin-2.1.6.jar ,并不能完成 http://cwiki.apache.org/WW/testing-actions.html 一文中所描述的功能。看了一下struts2-2.1.6的源码,不具备executeAction、getActionMapping等方法。
可能是wiki和源码没有同步更新吧。
这里提供一个可以支持getActionMapping等方法的strtus2-junit-plugin。
jar包下载: struts2-junit-plugin-2.1.6.jar
源码(maven工程)下载:struts2-junit-plugin-source.zip
这样就可以用wiki中的方法来进行单元测试了。如果测试类继承StrutsSpringTestCase ,还可以直接用工程中的spring配置文件,非常方便。
原创文章如转载,请注明:转载自CODIGG [ http://www.codigg.com/ ]
本文链接地址:http://www.codigg.com/2009/08/struts2-junit-plugin-spring/


踏雪留痕,你也评论一下吧