电子学报
電子學報
전자학보
ACTA ELECTRONICA SINICA
2015年
8期
1555-1560
,共6页
王红阳%姜淑娟%王兴亚%鞠小林%张艳梅
王紅暘%薑淑娟%王興亞%鞠小林%張豔梅
왕홍양%강숙연%왕흥아%국소림%장염매
软件测试%子路径扩展%不可达路径检测%约束求解
軟件測試%子路徑擴展%不可達路徑檢測%約束求解
연건측시%자로경확전%불가체로경검측%약속구해
software testing%sub-path expansion%infeasible path detection%constraint solving
不可达路径是造成软件测试资源消耗的一个重要方面。在路径测试之前,检测程序中的不可达路径可以有效节约软件测试资源。提出了一种基于子路径扩展的不可达路径静态检测方法。该方法首先生成程序的子路径集,将路径的可达性问题转换为不等式组的求解问题。使用约束求解器判断子路径的可达性,可以分为:可达子路径,不可达子路径和无法判定三个部分,并对后面两部分的子路径扩展出的路径做二次可达性检测,最终获得程序中所有路径的可达性信息。可达性检测工作主要在子路径集上进行,因此有效地解决了路径爆炸问题。实验结果表明本文方法可以准确有效地检测出程序中的不可达路径。
不可達路徑是造成軟件測試資源消耗的一箇重要方麵。在路徑測試之前,檢測程序中的不可達路徑可以有效節約軟件測試資源。提齣瞭一種基于子路徑擴展的不可達路徑靜態檢測方法。該方法首先生成程序的子路徑集,將路徑的可達性問題轉換為不等式組的求解問題。使用約束求解器判斷子路徑的可達性,可以分為:可達子路徑,不可達子路徑和無法判定三箇部分,併對後麵兩部分的子路徑擴展齣的路徑做二次可達性檢測,最終穫得程序中所有路徑的可達性信息。可達性檢測工作主要在子路徑集上進行,因此有效地解決瞭路徑爆炸問題。實驗結果錶明本文方法可以準確有效地檢測齣程序中的不可達路徑。
불가체로경시조성연건측시자원소모적일개중요방면。재로경측시지전,검측정서중적불가체로경가이유효절약연건측시자원。제출료일충기우자로경확전적불가체로경정태검측방법。해방법수선생성정서적자로경집,장로경적가체성문제전환위불등식조적구해문제。사용약속구해기판단자로경적가체성,가이분위:가체자로경,불가체자로경화무법판정삼개부분,병대후면량부분적자로경확전출적로경주이차가체성검측,최종획득정서중소유로경적가체성신식。가체성검측공작주요재자로경집상진행,인차유효지해결료로경폭작문제。실험결과표명본문방법가이준학유효지검측출정서중적불가체로경。
Infeasible paths are one of the most important parts to cost the test resources.Before path testing,infeasible paths detecting in a program can save test resources efficiently.This paper presents a static method to detect infeasible paths which is based on sub-path expansion.First,the proposed method generates sub-path set,and the feasibility issues will be converted into in-equalities.Second,the constraint solver is used to solve the inequalities,and then we can distinguish the sub-paths into three parts:one part is infeasible sub-paths,the second part is feasible sub-paths,and the third part is undetermined.The paths that are expanded from the latter two parts will be tested again to determine their feasibility.Eventually,the feasibility of all the paths is detected.Most of the detecting work is on sub-path set,so our method makes an effective solution to the path-explosion problem.Experimental re-sults show that the proposed method can detect infeasible paths more accurately and effectively.