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

函数调用路径测试用例自动生成的方法研究
引用本文:沈晴,牟永敏.函数调用路径测试用例自动生成的方法研究[J].计算机工程与应用,2020,56(18):238-246.
作者姓名:沈晴  牟永敏
作者单位:北京信息科技大学 计算机学院,北京 100101
基金项目:北京市自然科学基金;网络文化与数字传播北京市重点实验室开放课题
摘    要:测试用例自动生成是软件测试自动化中最为关键的组成部分之一,符号执行作为一种程序分析方法,以其可提供高覆盖率测试用例的优势被广泛应用其中,但路径爆炸和约束求解问题很大程度制约了符号执行技术在现实程序分析中的应用。将研究粒度由语句提升至函数,利用抽象语法树和字节码序列提取到的函数关键信息和控制信息得到函数调用关系模型,设计算法生成函数调用路径(函数调用路径表示程序从开始到结束之间函数的调用或执行序列)。该方法不仅减少了测试路径数目缓解了路径爆炸问题,还有效解决了控制条件中存在函数导致符号表达式难求解的问题。实验结果表明该方法可优化测试路径集,在不降低覆盖率的前提下减少测试用例数量。

关 键 词:函数调用路径  符号执行  全局测试用例  测试用例自动生成  

Research on Automatic Generation of Function Call Path Test Case
SHEN Qing,MU Yongmin.Research on Automatic Generation of Function Call Path Test Case[J].Computer Engineering and Applications,2020,56(18):238-246.
Authors:SHEN Qing  MU Yongmin
Affiliation:College of Computer Science, Bejing Information Science and Technology University, Bejing 100101, China
Abstract:Automatic generation of test case is one of the most critical components in software test automation. Symbolic execution, as a program analysis method, is widely used because of its advantages of providing high coverage test case, but path explosion and constraint solving are very problematic. It greatly restricts the application of symbolic execution technology in real-time program analysis. The paper studies the granularity from statement to function, uses the abstract syntax tree and the bytecode sequence to extract the key information and control information of the function to get the function call relation model. The design algorithm generates the function call path (the function call path indicates the program from the beginning to the end). This method not only reduces the number of test paths to alleviate the path explosion problem, but also effectively solves the problem that the existence of function in the control condition makes the symbolic expression difficult to solve. The experimental results show that the method can optimize the test path set and reduce the number of test cases without reducing the coverage.
Keywords:function call path  symbolic execution  global test case  test case automatic generation  
本文献已被 万方数据 等数据库收录!
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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