• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2008, Vol. 30 ›› Issue (4): 86-88.

• 论文 • 上一篇    下一篇

测试驱动开发在J2EE项目中的全程实践

陈立群   

  • 出版日期:2008-04-01 发布日期:2010-05-19

  • Online:2008-04-01 Published:2010-05-19

摘要:

测试驱动开发(TDD)作为极限编程的重要思想正在日益流行,也显示出诸多优越性。本文在介绍了有关TDD的背景知识和编写步骤之后,以成熟的整合框架(Struts+Spring  +Hibernate)为例,分析了J2EE项目下每层所使用的测试技术和工具,以试图说明TDD可以迅速加快开发过程并产生更高质量的软件,使代码更易于理解和重构。

关键词: 测试驱动开发 测试先行编程 JUnit JMock StrutsTest Canoo WebTest

Abstract:

Test-Driven Development(TDD) as the important idea of extreme programming is becoming more and more popular and shows lots of superiorities. This ar  ticle presents the background knowledge and programming steps of TDD. And, following the mature integrated framework (Struts+ Spring+ Hibernate), th  he paper analyses the testing technologies and tools for each layer, in order to show that TDD can rapidly speed up the process of development and breed higher quality software,and make the code easier to understand and refactor.

Key words: test-driven development, test-first programming ;JUnit;JMock, StrutsTest, Canoo WebTest