首页> 外文会议>2017 14th Web Information Systems and Applications Conference >An XPath-Based Approach to Reusing Test Scripts for Android Applications
【24h】

An XPath-Based Approach to Reusing Test Scripts for Android Applications

机译:基于XPath的方法为Android应用程序重用测试脚本

获取原文
获取原文并翻译 | 示例

摘要

The version of an Android application (app) is updated frequently and rewriting test scripts for each version update is laborious and expensive, so reusing existing test scripts is a better choice. Although the app's business logic is relatively stable during the process of app version evolution, user interface (UI) control changes in the new version tend to cause the original test scripts to fail, which is the main problem in test script reuse. In this paper we address this problem by developing an XPath-based approach to reusing test scripts for Android apps in the case of changes in the locations, names, or property values of UI controls in the app. In our approach, the test scripts use XPath expressions to locate the UI controls. The approach first identifies failed test scripts and no longer valid XPath expressions by executing the original test scripts on the new version of the app. Next, it uses the invalid XPath expressions to find the difference between the two DOMs corresponding to a view in the changed page in the new version and a view in the original page in the previous version, respectively. Finally, it uses the DOM difference to repair the XPath expressions, thereby achieving the reuse of test scripts. We have implemented a prototype of the approach based on Robotium and used it to conduct experiments on two real-world Android apps. The results show that our approach can achieve a higher script reuse percent than Robotium.
机译:Android应用程序(app)的版本会经常更新,为每个版本更新重写测试脚本既费力又昂贵,因此重用现有的测试脚本是一个更好的选择。尽管在应用程序版本演变过程中应用程序的业务逻辑相对稳定,但是新版本中的用户界面(UI)控制更改往往会导致原始测试脚本失败,这是测试脚本重用的主要问题。在本文中,我们通过开发一种基于XPath的方法来解决此问题,以在应用程序中的UI控件的位置,名称或属性值发生更改的情况下重用Android应用程序的测试脚本。在我们的方法中,测试脚本使用XPath表达式来定位UI控件。该方法首先通过在新版本的应用程序上执行原始测试脚本来识别失败的测试脚本和不再有效的XPath表达式。接下来,它使用无效的XPath表达式查找分别对应于新版本中已更改页面中的视图和先前版本中原始页面中的视图的两个DOM之间的差异。最后,它使用DOM差异来修复XPath表达式,从而实现测试脚本的重用。我们已经实现了基于Robotium的方法的原型,并使用它在两个真实的Android应用上进行了实验。结果表明,与Robotium相比,我们的方法可以实现更高的脚本重用百分比。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号