我按网上的资料把测试程序分为三部分:
(1)把JAVA类的test case写出来。
(2)把前端的JSP测试程序写出来。
(3)把WEB.XML配置好。然后进行测试。
请问这样对不对????第二个问题: 用Junit很方便吗??? 我觉得它只是生成了一些框架,而测试的大部分东西还是要自己来写的。 感觉跟人工测试没什么区别啊??
(1)把JAVA类的test case写出来。
(2)把前端的JSP测试程序写出来。
(3)把WEB.XML配置好。然后进行测试。
请问这样对不对????第二个问题: 用Junit很方便吗??? 我觉得它只是生成了一些框架,而测试的大部分东西还是要自己来写的。 感觉跟人工测试没什么区别啊??
1) you can see http://jakarta.apache.org/cactus/
Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters, ...). The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it. Cactus implements an in-container strategy, meaning that tests are executed inside the container.
-------------------------------------------------------------------
2) or you can see http://mockrunner.sourceforge.net/examplesejb.html Mockrunner is a lightweight framework for unit testing applications in the J2EE environment. It supports Struts actions and forms, servlets, filters and tag classes. Furthermore it includes a JDBC and a JMS test framework and can be used in conjunction with MockEJB to test EJB based applications.