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

J4 ›› 2008, Vol. 30 ›› Issue (11): 109-110.

• 论文 • 上一篇    下一篇

面向对象测试代码复用算法与工具

谢冰[1] 张晨东[1] 强彦[2]   

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

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

摘要:

本文主要研究面向对象软件系统的自动化测试代码的复用问题。复用测试代码是基于建立的方法测试用例。当创建了一个方法的测试用例之后,可以发现这个用例可在其他相  关方法的测试过程中起到多种作用。这个生成的测试用例可以作为另一个方法测试输入的对象参数,或者作为一个主测试对象以调用其方法。我们设计了一个可自动生成复用 用测试代码的算法,并应用于一个微软平台上的对象测试自动化工具的研发过程中。

关键词: 软件复用 软件测试自动化 自动化测试工具

Abstract:

This paper focues on studying the issue of reusing the automatic test code for object-oriented software systems. The basic idea to reuse the test code comes from method test case building. When we produce a method test case, we find that the test case can play different roles in testing other methods    which may have some relationship with it. This test case can be reused as an object argument passed to a method or as a major object whose method is to    be invoked. We have developed an algorithm of automatically generating reuse test code. Finally, we give the implementation of an automated testing tool   on the Microsoft.Net platform.

Key words: software reuse, software testing automation;automatic test tool