基于正交试验设计的测试用例选择方法

Vol.44No.8

1468

计算机与数字工程

Computer&Digital Engineering总第322期

2016年第8期基于正交试验设计的测试用例选择方法*

曾茂希陆璐

(华南理工大学计算机科学与工程学院广州510006)

摘要随着传感器技术的发展,运行在各种移动设备上的上下文感知应用也迅速增加。这些应用软件不断地捕获移动设备周围的环境信息作为上下文,然后自动地调整设备的状态来适应上下文的变化。然而它们适应的过程中可能会由于触发了错误的适应规则而出错,因此,对这些上下文感知应用进行测试是保证其发展的至关重要的先决条件。由于上下文状态的多样性,在设计测试用例的时候可能会存在组合爆炸问题。论文了提出了一种基于正交试验设计的测试用例选择方法,并开发了一个普通的上下文感知应用来证明该方法对测试用例选择的有效性。此外,该文还对实验数据进行分析来展现该方法所特有的错误定位能力。实验结果表明,该方法不仅能够有效地选择出高效的测试用例,而且还能够利用这些测试用例来定位一个上下文感知应用的程序错误。

关键词软件测试;上下文感知应用;测试用例选择;正交试验设计

中图分类号T P311DOI:10.3969/j.issn.1672-9722.2016.08.016

TestCaseSelectionMethodBasedonOrthogonalExperimentDesign

ZENGMaoxiLULu

(Department of Computer Science and Engineering,South China University of Technology,Guangzhou510006)AbstractContext-aware applications(CAAs)running on mobile devices are now developing quite rapidly due to the ad-vanced built-in sensor technologies.These applications constantly capture environmental information as contexts and then a-dapt to the contextual changes.However,their adaptations may contain errors w hen erroneous adaptation rules are trig-g ered.Hence,testing these applications becomes a vital prerequisite for their development.Due to the diversity of contexts,there may be a combinatorial explosion problem during test case generating.This paper proposes a new optimization method for selecting efficient test cases from the perspective of orthogonal experiment design(OED).A common context-aware ap-p lication is developed to prove the effectiveness of this method.Additionally,an analysis of the fault localization capabilities is presented.Experiment results show that our method can not only significantly select out efficient test cases but also find out the factors that cause the faults of a CAA.

KeyWordssoftware testing,context-aware application,test case selection,orthogonal experiment design

ClassNumberT P311

1引言

随着智能手机、平板电脑、PDA等移动设备的迅速发展,上下文感知应用变得越来越流行,典型产品主要包括天气预报、导航定位等一些涉及底层传感器的软件。在2008年Google评选出十大优秀安卓应用中,有五个是上下文感知应用[1]。上下文感知应用一般通过移动设备内置的传感器来实现感知,并使用适应规则来实现自适应,所以它们可以根据移动设备周围的上下文环境来不断地改变它们的配置和动作以适应上下文的变化[2]。

大多数上下文感知应用是通过中间件来处理

*收稿日期:2016年2月11日,修回日期:2016年3月17日

基金项目:国家自然科学基金(编号:61370103);广东省科技计划项目(编号:2015B010107001);广州市产学研基金项目(编号:201508010034);武汉大学软件工程重点实验室开放基金联合资助。

作者简介:曾茂希,男,硕士,研究软件:自动化测试。陆璐,男,博士后,教授,研究方向:软件架构设计与优化,软件自动化测试,基于Web的远程监控、网络传输服务质量管理等。

相关主题
相关文档
最新文档