Skip to main content
QUICK REVIEW

[論文レビュー] Scripted GUI Testing of Android Apps: A Study on Diffusion, Evolution and Fragility

Riccardo Coppola, Maurizio Morisio|arXiv (Cornell University)|Nov 9, 2017
Advanced Malware Detection Techniques参考文献 10被引用数 3
ひとこと要約

本研究では、6つの人気のあるテストフレームワークを用いて、オープンソースAndroidアプリにおけるスクリプト化GUIテストの採用状況、進化、脆さを調査した。その結果、Androidプロジェクトのわずか8%しかGUIテストツールを使用しておらず、テストコード変更の60%がGUIの脆さに起因していることが判明した。これは、自動化GUIテストの広範な採用を妨げる重大な保守負担を示している。

ABSTRACT

Background. Evidence suggests that mobile applications are not thoroughly tested as their desktop counterparts. In particular GUI testing is generally limited. Like web-based applications, mobile apps suffer from GUI test fragility, i.e. GUI test classes failing due to minor modifications in the GUI, without the application functionalities being altered. Aims. The objective of our study is to examine the diffusion of GUI testing on Android, and the amount of changes required to keep test classes up to date, and in particular the changes due to GUI test fragility. We define metrics to characterize the modifications and evolution of test classes and test methods, and proxies to estimate fragility-induced changes. Method. To perform our experiments, we selected six widely used open-source tools for scripted GUI testing of mobile applications previously described in the literature. We have mined the repositories on GitHub that used those tools, and computed our set of metrics. Results. We found that none of the considered GUI testing frameworks achieved a major diffusion among the open-source Android projects available on GitHub. For projects with GUI tests, we found that test suites have to be modified often, specifically 5\%-10\% of developers' modified LOCs belong to tests, and that a relevant portion (60\% on average) of such modifications are induced by fragility. Conclusions. Fragility of GUI test classes constitute a relevant concern, possibly being an obstacle for developers to adopt automated scripted GUI tests. This first evaluation and measure of fragility of Android scripted GUI testing can constitute a benchmark for developers, and the basis for the definition of a taxonomy of fragility causes, and actionable guidelines to mitigate the issue.

研究の動機と目的

  • オープンソースAndroidプロジェクトにおけるスクリプト化GUIテストフレームワークの普及状況を評価すること。
  • 時間経過に伴うテストスイートの変更頻度と原因を測定すること。
  • GUIテストの脆さに起因するテスト変更の割合を数量化すること。
  • 開発者向けのベンチマークを提供し、自動化GUIテストにおける脆さの軽減に基盤を提供すること。

提案手法

  • 著者らは、6つの人気のあるGUIテストツール(Espresso、UI Automator、Selendroid、Robotium、Robolectric、Appium)を用いて、オープンソースAndroidプロジェクトのGitHubリポジトリをマイニングした。
  • リリースレベルでのバージョン履歴を分析し、タグ付きリリース間でテストクラスやメソッドの変更を追跡した。
  • 脆さの推定には代理指標を用いた:テストメソッドの任意の変更は、GUIの脆さを示すものとみなした。
  • テストスイートの進化を特徴付けるためのメトリクスを算出した。これには、テストコードにおける変更ラインの割合、および脆さに起因する変更の割合が含まれる。
  • 代理指標の信頼性を検証するために、正確性評価(70%)を実施し、テスト変更とGUI変更の関連付けの妥当性を検証した。
  • 代表的なサンプルとして、少なくとも1つのタグ付きリリースを持つ1,000プロジェクトを対象に統計的分析を実施した。

実験結果

リサーチクエスチョン

  • RQ1オープンソースAndroidプロジェクトにおけるスクリプト化GUIテストフレームワークの採用レベルはどの程度か?
  • RQ2Androidプロジェクトの進化に伴い、テストスイートはどの程度の頻度で変更されているか?
  • RQ3テストコード変更のうち、GUIテストの脆さに起因する割合はどの程度か?
  • RQ4テストメソッドの変更を代理指標として用いることで、GUIの脆さをどの程度正確に推定できるか?

主な発見

  • 少なくとも1つのタグ付きリリースを持つオープンソースAndroidプロジェクトのうち、6つのGUIテストフレームワークのいずれかを採用しているのはわずか8%であった。
  • 平均して、1リリースあたりの全コード変更の7.5%がテストコードに該当し、テストコードのうち3%が1リリースあたり変更されていた。
  • テストコード変更の約60%がGUIテストの脆さに起因しており、これは重大な保守負担を示している。
  • テストメソッドの変更を代理指標として用いることで、70%のケースで脆さを正しく特定できた。これは、脆さ推定にこの代理指標を用いる妥当性を裏付けている。
  • GUIテストを採用しているプロジェクトでは、テストスイートがプロジェクト全体の平均で約11%のコードを占めていた。
  • 平均して、1回のリリースサイクルごとに、テストクラスの5分の1がGUIの脆さに起因して変更を余儀なくされた。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。