软件测试是保证嵌入式软件质量的重要手段之一,测试用例集的完备性是软件测试的关键因素.研究一种基于统一建模语言(UML)状态图生成测试用例集的方法,根据状态、迁移不变性原则以及动作映射,将UML状态图转换为扩展有限状态机(EFSM),采用广度优先搜索满足状态、迁移覆盖准则,由测试序列建立查找表生成测试用例集.最后给出实例说明该方法的可行性和有效性.
Software testing is an important means of ensuring embedded-software quality,in which the completeness of test cases is a key factor.In this paper,a method of generating test cases based on the unified modal language(UML) state diagram is studied.According to the state,migration invariance principles and action mapping,the UML state diagram can be transformed to an extended finite state machine(EFSM).With breadth-first search,the state and migration covering principles are satisfied.Then test cases are generated by test sequences and the look-up table.Finally,an example is given to demonstrate the feasibility and efficiency of the method.