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

测试含有标志变量程序的占优语句(集)选择
引用本文:巩敦卫,钟超群,姚香娟.测试含有标志变量程序的占优语句(集)选择[J].软件学报,2015,26(8):1925-1936.
作者姓名:巩敦卫  钟超群  姚香娟
作者单位:中国矿业大学 信息与电气工程学院, 江苏 徐州 221116,中国矿业大学 信息与电气工程学院, 江苏 徐州 221116,中国矿业大学 理学院, 江苏 徐州 221116
基金项目:国家自然科学基金(61375067, 61203304); 江苏省自然科学基金(BK2012566)
摘    要:基于占优关系的可测试性转化,是将目标语句覆盖问题转化为位于该语句之前的占优语句(集)覆盖问题,能够对含有标志变量的程序进行测试.但是当占优语句(集)不止一个时,如何从这些语句(集)中选择最容易覆盖的作为新的目标语句(集),至今没有有效的方法,从而限制了可测试性转化的应用范围.研究了占优语句(集)选择问题,提出了基于覆盖难度的占优语句(集)选择方法.首先,提出评价语句覆盖难度的4个指标,并给出这些指标的计算方法;然后,基于上述指标,利用Topsis方法排序,选择最容易覆盖的占优语句(集);最后,将所提出的方法应用于多个基准与工业程序测试,实验结果表明,覆盖基于该方法选择的占优语句(集)能够显著提高测试数据生成的效率.

关 键 词:软件测试  语句覆盖  标志变量  可测试性转化  占优语句
收稿时间:2014/2/17 0:00:00
修稿时间:2014/5/29 0:00:00

Dominant Statement(s) Selection in Testing Programs with Flag Variables
GONG Dun-Wei,ZHONG Chao-Qun and YAO Xiang-Juan.Dominant Statement(s) Selection in Testing Programs with Flag Variables[J].Journal of Software,2015,26(8):1925-1936.
Authors:GONG Dun-Wei  ZHONG Chao-Qun and YAO Xiang-Juan
Affiliation:School of Information and Electrical Engineering, China University of Mining and Technology, Xuzhou 221116, China,School of Information and Electrical Engineering, China University of Mining and Technology, Xuzhou 221116, China and College of Science, China University of Mining and Technology, Xuzhou 221116, China
Abstract:Testability transformation based on dominant relationship, which transforms the problem of covering the target statement into the problem of covering the dominant statement(s) preceding the target statement, can test programs with flag variables. When more than one dominant statement exist, however, there have been no effective methods for selecting a statement subset with best coverage as the new target(s), which limits the scope of applying the testability transformation method. The problem of selecting dominant statement(s) is investigated in this paper, and a method of choosing dominant statement(s) is presented based on the coverage difficulty. First, four indicators for evaluating the coverage difficulty of a statement are presented, and the approaches to calculating them are provided. Then, the dominant statement(s) with best coverage is (are) chosen using Topsis sorting based on the above indicators. Finally, the proposed method is applied to test several benchmarks and industrial programs, and the experimental results show that coverage from the dominant statement(s) selected by the proposed method can greatly improve the efficiency of generating test data.
Keywords:software testing  statement coverage  flag variable  testability transformation  dominant statement
点击此处可从《软件学报》浏览原始摘要信息
点击此处可从《软件学报》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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