计算机应用 ›› 2010, Vol. 30 ›› Issue (8): 2189-2192.

• 软件过程处理 • 上一篇    下一篇

基于三层体系结构的单元测试框架研究与实现

周端阳,王猛   

  1. 太原科技大学
  • 收稿日期:2010-03-01 修回日期:2010-04-19 发布日期:2010-07-30 出版日期:2010-08-01
  • 通讯作者: 王猛

Research and implementation of unit testing framework based on three-layer architecture

  • Received:2010-03-01 Revised:2010-04-19 Online:2010-07-30 Published:2010-08-01

摘要: 单元测试是整个测试流程中的基础也是最重要的环节,通过深入研究三层体系结构特点,提出了一种基于该体系结构下的单元测试框架,该框架采用流行的面向接口编程技术,同时将设计模式灵活应用其中,有效指导了整个测试过程。目前整套框架已投入实际项目的运行,并且经过实践证明是切实可行的,不仅能及时发现软件开发过程中潜藏的问题,更有效保证Web应用程序的质量, 节省了后期维护费用的开销。

关键词: 三层体系结构, 单元测试框架, 设计模式, 面向接口编程, NUnit

Abstract: The unit testing is fundamental and also the most important step in the whole testing system. Through the deep research of the characteristics of the three-layer architecture,In this paper a unit testing framework based on the three-layer architecture was proposed,In this architecture,a popular interface-oriented programming was adopted, meanwhile, the flexible designing patterns were used to effectively guide the whole testing process. Currently, the whole framework has been put into practice and also has been proved feasible by practice. It can discover the hidden problems in the process of the software development, more effectively ensure the quality of the Web application procedure and cut down the expense on the latter maintenance.

Key words: three-layer architecture, unit testing framework, design pattern, interface-oriented programming, NUnit