计算机科学 ›› 2017, Vol. 44 ›› Issue (4): 114-117.doi: 10.11896/j.issn.1002-137X.2017.04.025

• NASAC 2015 • 上一篇    下一篇

基于模型代数的基本路径集的自动生成

赵会群,卢飞   

  1. 北方工业大学计算机学院 北京100144,北方工业大学计算机学院 北京100144
  • 出版日期:2018-11-13 发布日期:2018-11-13
  • 基金资助:
    本文受北方工业大学优势学科项目资助

Automatic Generation of Basis Path Set Based on Model Algebra

ZHAO Hui-qun and LU Fei   

  • Online:2018-11-13 Published:2018-11-13

摘要: 路径测试是一种根据路径设计测试用例的白盒测试技术,而 基本路径测试是其中运用最广泛的一种路径测试方法。基本路径测试是在被测程序的控制流图的基础上导出基本的可执行的路径集合,因此程序控制流图是基本路径集自动生成的关键。考虑到依赖程序控制流图生成基本路径集的低效性,提出基于模型代数的基本路径集的自动生成方法。该方法通过分析被测程序,自动生成程序的模型代数表达式,并在模型代数表达式的基础上生成基本路径集。最后通过经典案例证明了该方法的有效性。

关键词: 路径测试,白盒测试,基本路径集,模型代数

Abstract: Path testing is a white-box test method for designing test case.Basis path testing is one of the most widely used path test methods.The basic path test is the collection of the basic executable paths based on the control flow graph of the program,so the control flow graph is the key of automatic generation of the basic path set.In this paper,an automatic generation of basic path set method was proposed based on model algebra.The basic path set will be generated based on the model algebra expression which is automatically generated by analyzing the program.In the end,the classical cases show the efficiency of the method.

Key words: Path test,White-box test,Basis path set,Model algebra

[1] 宫云战,赵会群,赵瑞莲,等.软件测试教程[M].北京:北京机械工业出版社.
[2] JORGENSEN P C.Software Testing A Craftsman’s Approach(Second Edition)[M].CRC Press,2007.
[3] WANG G,JING X N,WANG Y J.The Application of Imroved McCabe Method in Basis Path Test[J].Journal of Harbin University of Science and Technology,2010,5(1):48-51.(in Chinese) 王冠,景小宁,王彦军.基本路径测试中的McCabe算法改进与应用[J].哈尔滨理工大学学报,2010,5(1):48-51.
[4] MCCABE,THOMAS J.Structural Testing:A Software Testing Methodology Using the Cyclomatic Complexity Metric[M].National Bureau of Standards (Now NIST),Special Publication 500-99,Washington,D.C.,1982.
[5] ZHANG G M,LI X W,H C Y.Automatic Generationof Basis Path Set in Path Test[J].Computer Engineering,2007,3(22):195-197.(in Chinese) 张广梅,李晓维,韩丛英.路径测试中基本路径集的自动生成[J].计算机工程,2007,3(22):195-197.
[6] WU Q J,YANG X H,LU J C,et al.An Optimized Algorithm of Auto-generate Base Paths Set Base on Depth-first Search[J].Journal of University of South China(Science and Technology),2012,6(3):87-90.(in Chinese) 吴取劲,阳小华,鹿江春,等.一种基于图深度优先搜索的基本路径集自动生成优化算法[J].南华大学学报(自然科学版),2012,6(3):87-90.
[7] YAN J,ZHANG J.Automatic Testing Based on Basis Paths[J].Computer Science,2004,1(10):62-64.(in Chinese) 严俊,张健.基于基本路径的程序自动化测试[J].计算机科学,2004,1(10):62-64.
[8] WANG M,CHEN S M,CHEN Y G.An Algorithm for Solving Basic Path Set[J].Computer Applications and Software,2014,1(11):11-14.(in Chinese) 王敏,陈少敏,陈亚光.一种基本路径集求解算法[J].计算机应用与软件,2014,1(11):11-14.
[9] XIE S X.Application Research of Program Graph Automatic Generation Based on Basic Path Test[J].Journal of Tonghua Teachers College,2009,0(12):32-35.(in Chinese) 解圣霞.基于基本路径测试的程序图自动生成的应用研究[J].通化师范学院学报,2009,30(12):32-35.
[10] GHIDUK A S.Automatic generation of basis test paths using variable length genetic algorithm[J].Information Processing Letters,2014,114(6):304-316.
[11] ZHAO H Q,SUN J.An Algebraic Model of Service Oriented Trustworthy Software Architecture[J].Chinese Journal of Computers,2010,3(5):890-899.(in Chinese) 赵会群,孙晶.面向服务的可信软件体系结构代数模型[J].计算机学报,2010,3(5):890-899.
[12] 陈火旺,刘春林.程序设计语言编译原理(第三版)[M].长沙:国防工业出版社.2000.
[13] POOLE J.A Method to Determine a Basis Set of Path to Perform[C]∥Program Testing.NISTIR 5737,1995.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!