测试工作在软件的开发过程中占据了重要地位,也是比较费工数的一个环节。因此自动化测试作为这个问题的一个解决方案,越来越受人关注。笔者在目前进行的一个项目中全面运用了自动化测试技术和测试驱动开发技术,下表为本项目的技术选型。 
 
| 
 方面  | 
 技术  | 
 下载网址  |  
| 
 FrameWork  | 
 Struts 1.1  | 
 http://jakarta.apache.org/struts/index.html  |  
| 
 数据库访问  | 
 Torque 3.1  | 
 http://db.apache.org/torque/  |  
| 
 开发工具  | 
 Eclipse 2.1  | 
 http://www.eclipse.org  |  
| 
 Web容器  | 
 Tomcat 4.1.14  | 
 http://jakarta.apache.org/tomcat/index.html  |  
| 
 测试Java类  | 
 JUnit 3.8.1  | 
 http://www.junit.org  |  
| 
 测试Servlet、JSP、 
Taglib  | 
 Cactus  | 
 http://jakarta.apache.org/cactus/index.html  |  
| 
 测试Struts  | 
 Struts TestCase  | 
 http://sourceforge.net/projects/strutstestcase/  |  
| 
 Build工具  | 
 Ant 1.5.2  | 
 http://ant.apache.org/  |  
| 
 Tomcat Plugin  | 
 tomcatPlugin  | 
 http://www.sysdeo.com/eclipse/tomcatPlugin.html  |   
  
我们在这个项目深刻体会到一句话:任何代码都是可以测试,不可以测试的代码不应该存在。 
以下是我们的做法。 
   
 
  |