首页> 外文会议>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控件的Locations,名称或属性值的更改中重用Android应用程序的测试脚本。在我们的方法中,测试脚本使用XPath表达式来定位UI控件。该方法首先识别失败的测试脚本,并且通过在新版本的应用程序上执行原始测试脚本,不再是有效的XPath表达式。接下来,它使用无效的XPath表达式来查找与新版本中已更改页面中的视图对应的两个DOM之间的差异,以及先前版本中原始页面中的视图。最后,它使用DOM差异来修复XPath表达式,从而实现了测试脚本的重用。我们已经实现了基于Robotium的方法的原型,并用它在两个现实世界Android应用程序中进行实验。结果表明,我们的方法可以实现比机器人的更高脚本。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号