摘要
提出一种带OCL约束的状态图测试线索的自动生成方法。该方法自动解析类图和带OCL约束的状态图的XML模型文件,获取相应的状态节点邻接表,再结合状态对—事件约束集合生成带OCL约束的测试线索。实例研究表明,通过OCL约束冲突判断可避免不可行测试线索的生成,减少测试用例数目,达到降低测试成本的目的。实验结果证明了该方法的可行性和有效性。
This paper proposed an effective generation approach to test sequence from state diagram with OCL constraints.It acquired constitute corresponding adjacency list of state nodes by automatically analyzing XML model file of class diagram state diagram with OCL constraints.Then,generated test sequence with OCL constraints based on state adjacency list StatusCouple-Event set.The case research indicated that,the generation of infeasible testing sequence could be avoided through OCL restrict conflict judgement,and that it could effectively reduce the number of test case,so as to achieve the objective of reducing the test cost.This method was verified to be feasible and effective by experimental results.
出处
《计算机应用研究》
CSCD
北大核心
2011年第3期988-990,994,共4页
Application Research of Computers
关键词
对象约束语言
可扩展标记语言
类图
状态图
测试线索
约束冲突
OCL(object constraint language)
XML
class diagram
state diagram
test sequence
constraint conflict