摘要
类是面向对象软件的基本构成单元,要提高面向对象软件的可靠性,必须对类进行深入、全面的测试。文中提出了一种新的类测试框架,用XML脚本来描述和组织测试用例,用测试驱动程序来读取测试用例,驱动被测程序运行,并自动比较测试结果。采用本框架,能够自动、高效地对类进行测试,同时能够使测试数据与测试驱动程序相分离,有利于测试数据的维护与重用,在实际应用中取得了很好的效果。
Class is the basic component of object- oriented software, so in order to improve the reliabity of object- oriented software,must test the class thoroughly. A new framework of class test is put forward in this paper,using XML to describe and organize the test cases of the class, using test driven program to read test cases, drive prorngram under test to run and compare the test result automatically. By using this framework.can test classes automatically and effectively. Additionally, can seperate the test data from test driven program, which is propitious to maintain and reuse the test data. This methed has got good effect in practice.
出处
《微机发展》
2005年第8期85-87,152,共4页
Microcomputer Development