摘要
字符串测试数据自动生成是目前的研究难点,还没有很好地解决方法。针对这个问题,提出了一种将符号执行约束求解与搜索算法相结合实现基于EFSM模型的字符串测试数据自动生成方法。将测试数据候选字符集中的字符通过取余编码转换为整数;将目标路径上字符串约束转换成整数约束,通过约束求解获得中间解;采用搜索算法生成字符串测试数据。该方法能很好地减小字符串的搜索范围,有效地减少搜索算法的执行时间。实验结果表明,该方法达到了预期的效果,提高了测试数据生成效率。
Automatic string type test data generation was a difficult point and current study could not generatea good approach to solve this problem.A method of string test data automatic generation combining symbolic execution with constraint solving and search algorithm based on EFSM model was proposed.First,more candidate characters were gotter in a character set through the test data encoded into an integer,then the target string constraints were converted to integer constraints on the path,the constraints were solved and intermediate solution were solved,finally,string test data was generated by search algorithm.This method could effectively reduce the search range of the string and the execution time of the search algorithm.The experimental results showed that the method achieved the desired effect,and improved the efficiency of test data generation.
出处
《计算机工程与设计》
CSCD
北大核心
2014年第6期1968-1972,共5页
Computer Engineering and Design
基金
国家自然科学基金项目(61073035
61170082)
关键词
扩展有限状态机
符号执行
搜索算法
测试数据生成
字符串
extended finite state machine (EFSM)
symbol execution
search algorithm
test data generation
string