摘要
直接从含有层次和并发结构的UML statecharts图产生面向对象软件类的测试用例是比较困难的,文中提出了基于UML statecharts图的测试框架:先利用现有的UML工具画出UML statecharts图,并产生XMI(XML metadatainterchange)格式的规格说明文件;然后根据UML statecharts的形式化语义,层次和并发结构被展平,将UML statecharts图的规格说明XML文件转换成FREE(flattened regular expression)模型的规格说明信息;最后根据FREE模型的规格说明信息,按照不同的充分性测试准则,分别产生测试用例集.同时提出了由FREE模型根据全ZOT路径覆盖准则产生有限迁移序列的算法,并且还实现了这个测试框架.
It is difficult to generate test cases of class directly from the UML statechart diagrams that contain a hierarchical and concurrent structure. This paper presents a test framework based on UML statecharts. The UML state chart diagram is first drawn using UML tools. The specification of the UML statechart is exported in XMI (XML metadata interchange). According to the formal semantics of UML statecharts, the UML statecharts are transformed into flattened regular expression (FREE) model diagrams. The hierarchical and concurrent structure of states is flattened in the FREE state model. The XML document of UML statechart diagram specification is converted into the specification of FREE model. Finally, test case sets of classes are generated separately based on different test coverage criteria from the specification of the FREE model. In addition, an algorithm generating transition sequence based on full ZOT path coverage criteria from a FREE model is presented. The test framework is implemented.
出处
《应用科学学报》
CAS
CSCD
北大核心
2006年第5期491-497,共7页
Journal of Applied Sciences
基金
国家自然科学基金(60373072)
国家"863"(2002CB312001)资助项目