摘要
类的状态测试是面向对象软件测试的重要内容,类的单元测试归结为测试类的数据成员和成员函数。该文提出了基于类的状态模式测试用例生成方法,从类的状态常量、状态变量以及成员函数等方面测试类的一致性与完整性,指出只有满足类的状态常量的约束条件与状态变量的前置条件和后置条件的测试数据,才能充分检验类的状态模式中存在的不一致、不完整性错误。
The state test of class is an important component part of object-oriented software test. Class unit test comes down to test the data member and member function. An approach of test cases generation based-on the class state model is proposed, and test consistency and integrality of classes form state constant, state variable and member function. A result is gained that only the test data which satisfies the restraint conditions of state constant and the pre-condition and post-condition of state variable fully test inconsistency and imperfect in tested classes.
出处
《计算机工程》
CAS
CSCD
北大核心
2007年第2期44-46,共3页
Computer Engineering
基金
国家自然科学基金项目资助(60474070)
湖南省自然科学基金项目资助项目(04JJ3031
05JJ2002)
湖南省教育厅科研基金资助项目(05C263)