摘要
软件测试是排除软件故障,提高软件质量和可靠性的重要手段。从是否需要执行被测程序角度考虑,软件测试分为静态测试和动态测试。动态测试通过输入测试数据,动态执行程序来发现软件中存在的错误。尽管动态测试能发现部分软件错误,但对于一些特殊类型错误的检测无效。鉴于此,本文采取了一种特殊的静态分析技术来实现对代码的测试。本文首先讨论了传统软件测试方法的缺点和局限性,给出了软件的故障模型,进而提出了基于抽象语法树的静态分析技术,并给出了故障自动检测算法。依据该算法开发了自动化测试工具,给出了实验结果和对比分析,并指出了下一步的研究方向。
Software testing is an important means to eliminate software faults and enhance software quality and reliability. Depending on if the program is executed, software testing methods are divided to two kinds, static testing and dynamic testing. Through inputting some testing data and executing program, dynamic testing can find some errors in a program, however, it is ineffective in checking certain kinds of errors. Therefore, a special static analysis method is taken to implement code testing. The paper discusses the disadvantage and limitation of the traditional software testing method, builds software's fault models, then puts forward a static analysis technique based on abstract syntax tree, and presents an automatic fault detection algorithm. Based on this method, a software testing system was designed and developed, experiment results were obtained and comparison analysis was made, providing a direction for further study.
出处
《北京化工大学学报(自然科学版)》
CAS
CSCD
北大核心
2007年第A01期25-29,共5页
Journal of Beijing University of Chemical Technology(Natural Science Edition)
关键词
软件测试
静态分析
故障
故障模型
语法树
software testing
static analysis
fault
fault model
syntax tree