摘要
随着软件测试技术的飞速发展,很多自动生成和执行测试用例的方法的技术已经发展起来。对于自动生成测试用例的约束的形式化定义也有很多方法,其中,对象约束语言(OCL)就是其中最具代表性的。OCL能够弥补UML模型的不足,精确地定义约束条件。本文将着重介绍一种从OCL文法解析到约束条件分离的方法的研究结果,通过与OCL文法比较,解析输入的OCL文本,提取OCL表达式,构建约束条件树,实现约束条件分离,最终实现测试用例集的自动生成。
OCL is horn to make up of the deficiencies in a UML model, fill the gap between traditional formal languages that needs a strong mathematical background and average business. In this paper we propose a method for generating test data for testing based on both UML and OCL. Through parsing to OCL context and dividing constraint technology, acquire constraint conditions. According Constraints-Through algorithm derived from Constraints Satisfy Problem (CSP), this paper introduces an approach to automatic generation of test cases.
出处
《微计算机信息》
北大核心
2007年第03X期244-246,共3页
Control & Automation