首页 | 本学科首页   官方微博 | 高级检索  
     

基于谓词切片的字符串测试数据自动生成
引用本文:赵瑞莲,闵应骅. 基于谓词切片的字符串测试数据自动生成[J]. 计算机研究与发展, 2002, 39(4): 473-481
作者姓名:赵瑞莲  闵应骅
作者单位:1. 北京化工大学信息科学与技术学院,北京,100029
2. 中国科学院计算技术研究所,北京,100080
基金项目:国家自然科学重点基金项目(69733010),北京化工大学青年基金项目(QN0143)
摘    要:字符串谓词使用相当普遍,如何实现字符串测试数据的自动生成是一个有待解决的问题,针对字符串谓词,讨论了路径Path上给定谓词的谓词切片的动态生成算法,以及基于谓词切片的字符串测试数据自动生成方法,并给出了字符串间距离的定义,利用程序DUC(Definithon-Use-Control)表达式,构造谓词的谓词切片,对任意的输入,通过执行谓词切片,获取谓词中变量的当前值,进而对谓词中变量的每一字符进行分支函数极小化,动态生成给定字符串谓词边界的ON-OFF测试点,实验表明,该方法是行之有效的。

关 键 词:谓词切片 字符串测试数据 自动生成 动态生成算法 软件测试 软件开发

AUTOMATIC TEST DATA GENERATION OF CHARACTER STRING BASED ON PREDICATE SLICE
ZHAO Rui-Lian and MIN Ying-Hua. AUTOMATIC TEST DATA GENERATION OF CHARACTER STRING BASED ON PREDICATE SLICE[J]. Journal of Computer Research and Development, 2002, 39(4): 473-481
Authors:ZHAO Rui-Lian and MIN Ying-Hua
Abstract:Predicates of character string are widely used in programs. A problem that needs further research is how to automatically generate test data of string predicates. Described in this paper are a dynamic generation algorithm of predicate slices with respect to given predicates on path Path, and an approach of automatic generation of string test data based on predicate slice, and a distance between two strings are defined. The predicate slice of a given predicate is created by using DUC (Definition_Use_Control) expression of a program. According to an input of the program, the values of variables in the predicate are computed by executing the slice. Each character of string in the predicate is processed with function minimization. Thus, ON-OFF test points of the predicate border are dynamically determined. Experimental results show that the approach is effective.
Keywords:software testing   domain error   predicate of character string   predicate slice   DUC expression   ON-OFF test point   function minimization  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号