计算机应用
計算機應用
계산궤응용
COMPUTER APPLICATION
2014年
z2期
204-207,218
,共5页
软件测试%测试成本约束%测试用例集%遗传算法%测试用例相距度
軟件測試%測試成本約束%測試用例集%遺傳算法%測試用例相距度
연건측시%측시성본약속%측시용례집%유전산법%측시용례상거도
software testing%limited test cost%test-case set%Genetic Algorithm ( GA)%test-case distance
在软件测试实践中,由于受到测试投入时间、投入资金和人力成本的约束,软件测试不可能以无限制投入来获取理想的软件质量。针对测试成本约束下条件下在测试用例集中如何选择测试用例以获取最优软件测试覆盖这样一个具有理论价值和现实意义的问题,提出了综合考虑测试成本、测试用例权重和测试用例相距度三要素的测试用例选择寻优新思路,给出了测试成本约束下测试用例选择寻优问题的形式化描述,提出了基于遗传算法和测试成本约束的测试用例选择寻优算法的两种基本算法,即测试用例权重优先的测试用例选择寻优算法以及集群测试用例优先的测试用例选择寻优算法,并以一个模拟测试用例集合对算法有效性进行了检验,实验结果表明两种测试用例选择寻优算法在测试覆盖效果上均显著优于随机选择算法。
在軟件測試實踐中,由于受到測試投入時間、投入資金和人力成本的約束,軟件測試不可能以無限製投入來穫取理想的軟件質量。針對測試成本約束下條件下在測試用例集中如何選擇測試用例以穫取最優軟件測試覆蓋這樣一箇具有理論價值和現實意義的問題,提齣瞭綜閤攷慮測試成本、測試用例權重和測試用例相距度三要素的測試用例選擇尋優新思路,給齣瞭測試成本約束下測試用例選擇尋優問題的形式化描述,提齣瞭基于遺傳算法和測試成本約束的測試用例選擇尋優算法的兩種基本算法,即測試用例權重優先的測試用例選擇尋優算法以及集群測試用例優先的測試用例選擇尋優算法,併以一箇模擬測試用例集閤對算法有效性進行瞭檢驗,實驗結果錶明兩種測試用例選擇尋優算法在測試覆蓋效果上均顯著優于隨機選擇算法。
재연건측시실천중,유우수도측시투입시간、투입자금화인력성본적약속,연건측시불가능이무한제투입래획취이상적연건질량。침대측시성본약속하조건하재측시용례집중여하선택측시용례이획취최우연건측시복개저양일개구유이론개치화현실의의적문제,제출료종합고필측시성본、측시용례권중화측시용례상거도삼요소적측시용례선택심우신사로,급출료측시성본약속하측시용례선택심우문제적형식화묘술,제출료기우유전산법화측시성본약속적측시용례선택심우산법적량충기본산법,즉측시용례권중우선적측시용례선택심우산법이급집군측시용례우선적측시용례선택심우산법,병이일개모의측시용례집합대산법유효성진행료검험,실험결과표명량충측시용례선택심우산법재측시복개효과상균현저우우수궤선택산법。
In practice of software testing, due to the limited cost in time, money and manpower, it is impossible to invest unlimited input into a software testing to obtain an ideal software quality. To resolve the valued issue that under a limited test cost, how to select test cases in a test-case set for obtaining an optimal software testing coverage, a new idea of test-case selection optimization with an overall consideration on test cost, test-case weight and test-case distance, was proposed based on the definition of test-case distance with Euclidean space distance, then a formal description of the issue, the test-case selection optimization under a limited test cost, was given. Two basic test-case selection optimization algorithms under a limited test cost were proposed, which are weight prior test-case selection optimization algorithm and cluster prior test-case selection optimization algorithm. Finally the proposed algorithms were verified with a simulated test-case set, and the results show that the proposed two algorithms are significantly better than random selection algorithm in test coverage.