计算机应用 ›› 2016, Vol. 36 ›› Issue (12): 3454-3460.DOI: 10.11772/j.issn.1001-9081.2016.12.3454

• 计算机软件技术 • 上一篇    下一篇

基于软件层次化模型的软件测试数据生成

徐炜珊1,2, 于磊1,2, 冯俊池3, 侯韶凡1,2   

  1. 1. 信息工程大学, 郑州 450001;
    2. 数学工程与先进计算国家重点实验室, 郑州 450001;
    3. 后勤科学研究所, 北京 100071
  • 收稿日期:2016-02-22 修回日期:2016-03-22 出版日期:2016-12-10 发布日期:2016-12-08
  • 通讯作者: 徐炜珊
  • 作者简介:徐炜珊(1990-),女,浙江淳安人,硕士研究生,主要研究向:软件质量工程;于磊(1974-),男,山东青岛人,副教授,博士,CCF高级会员,主要研究方向:软件工程、软件质量管理;冯俊池(1990-),男,山东聊城人,硕士,主要研究方向:软件质量工程;侯韶凡(1990-),女,河南郑州人,硕士研究生,主要研究方向:软件质量工程。
  • 基金资助:
    国家自然科学基金资助项目(61402525);郑州市普通科技攻关项目(141PPTGG383)。

Software testing data generation technology based on software hierarchical model

XU Weishan1,2, YU Lei1,2, FENG Junchi3, HOU Shaofan1,2   

  1. 1. Information Engineering University, Zhengzhou Henan 450001, China;
    2. State Key Laboratory of Mathematical Engineering and Advanced Computing, Zhengzhou Henan 450001, China;
    3. Logistics Scientific Institute, Beijing 100071, China
  • Received:2016-02-22 Revised:2016-03-22 Online:2016-12-10 Published:2016-12-08
  • Supported by:
    This work is partially supported by the National Natural Science Foundation of China (61402525), the General Key Scientific and Technological Projects of Zhengzhou (141PPTGG383).

摘要: 针对基于Markov链模型的软件测试技术在测试数据生成时不考虑软件的结构信息,生成的测试数据集对代码路径的覆盖能力以及缺陷检测能力都较低的问题,将统计测试与基于Markov链模型的测试相结合,提出了一种新的软件测试模型——软件层次化模型。该模型涵盖了软件与外部环境之间的交互,同时描述了软件内部结构信息。还给出了该模型测试数据集的生成算法:首先生成符合使用情况的测试序列,然后为测试序列生成覆盖软件内部结构的输入数据。通过针对示例软件的实验结果表明,与基于Markov链模型的测试方法对比,基于软件层次化模型的测试在满足软件测试充分性要求的同时,提高了测试数据集的代码路径覆盖能力和缺陷检测能力。

关键词: 软件测试, Markov链模型, 软件层次化模型, 测试数据生成

Abstract: Since Markov chain model based software testing does not consider the software structural information and has low ability of path coverage and fault detection, a new software testing model called software hierarchical testing model was proposed based on the combination of statistical testing and Markov chain model based testing. The software hierarchical testing model contains the interaction between software and external environment, and also describes the internal structural information of software. Besides, the algorithm for generating test data set was put forward:firstly, the test sequences conforming to the actual usage of software were generated; then the input data which covered software internal structure was generated for the test sequences. Finally, in the comparison experiments with software testing based on Markov chain, the new model satisfies the software testing sufficiency and improves the test data set's ability of path coverage and fault detection.

Key words: software testing, Markov chain model, software hierarchical model, test data generation

中图分类号: