他の自動化ツールとの比較(Android)

Androidのテストツールの選択は著しく困難だったりします。弊社のTestArchitectを一番にお薦めしたいですが、例えばある条件ではTestArchitectが向かない場合もあります。お買い求めになる前に是非ご相談し、納得してご利用いただきたいと思っております。

UiAutomator Espresso TestArchitect
パフォーマンス (※1)
マルチプラットフォーム
安定性
キーワード駆動型
(簡単にスクリプトが書けるか)
2つ以上のアプリケーションテスト
(設定等含む)
(※2) (※2)
(※1)https://sigma.software/about/media/espresso-android-its-drawbacks-and-use-test-automation-engineer
(※2)アーキテクチャーの問題の為。TestArchtectもEspressoも生成されたAPKを直接インストールできる状態で、かつそのAPKの開発者サインを変更できないとテストする事はできません。詳しくはロジギアまで問い合わせください。
  • 上記○☓比較をしてますが、どれが優れているかについてはあまり言及しません。
  • EspressoもUiAutomatorもGoogleで作られており、アーキテクチャー自身が違うので、apple to appleの比較は難しいです。
  • TestArchitectは商用である分、マルチプラットフォームに対応していたり、キーワード駆動であるため使いやすいですが、パフォーマンスや安定性はGoogleのコンポーネントを使っているので大きな違いはありません。

参考 Android Testing: UIAutomator vs Espresso

I was seeking for test frameworks for Android UI automation and I stumbled upon UI Automator and Espresso and this is the part I am confused about –

  1. Both are maintained by Google
  2. Both are used for functional UI testing
  3. Both are Android only frameworks

So my questions/doubts here are –

  • What is the major difference between UI Automator and Espresso?
  • Will the source code have to be modified to integrate any of these frameworks?
  • Does one framework hold any advantage over the other? If yes, then which framework is the most suitable for UI automation of an Android app?

Answer by dtmilano for Android Testing: UIAutomator vs Espresso

If you are testing only one application, then Espresso.

If you are testing more than one application or its integration with other applications or system, then UiAutomator.

Answer by Simas for Android Testing: UIAutomator vs Espresso

When using UIAutomator you must use an 18+ API while with Espresso, you can go as low as API 8.

As the Android documentation states, multi-application tests should be done with UIAutomator while if you only want the tests to run inside of your own app package you can use Espresso.

At the bottom of this documentation’s page, you can find the introduction, as well as examples to both of these testing styles.

Answer by Steven Mark Ford for Android Testing: UIAutomator vs Espresso

UIAutomator ? is powerful and has good external OS system integration e.g. can turn WiFi on and off and access other settings during test, but lacks backward compatibility as it requires Jelly Bean or higher. But, also lacks detailed view access so one could say it may be more of a pure black-box test. Where as Espresso has access to view internals (see below).

Espresso – is a bit more light weight compared to ui automator and

supports 2.2 Froyo and up it also has a fluent api with powerful hamcrest(https://github.com/hamcrest) integration making code more readable and extensible (it is newer than Ui automator). It does not have access to system integration tests but has access to view internals e.g. can test a webview (useful for Hybrid app testing, or webview heavy testing). Slightly more grey-box testing compared to UI Automator.
Answer by Dmitry Gr for Android Testing: UIAutomator vs Espresso

Actually, you don’t need to choose. UIAutomator and Espresso use the same instrumentation runner, so you can use commands from both of them in a single test. Espresso has variety of matchers, assertions and actions on UI, that automator doesn’t have:

Espresso 2.1 Cheat Sheet

Espresso is running in separate thread and it is really fast comparing to other test frameworks.

as Summary: use both of them in your tests, Espresso is main and UIAutomator as an additional tool for OS integration.

Answer by piotrek1543 for Android Testing: UIAutomator vs Espresso

I’ve found an interesting article, which talks about why you should use them both. Take a look at:

https://qathread.blogspot.com/2015/05/espresso-uiautomator-perfect-tandem.html

Already Espresso is enough for me, but for some reasons like testing app notifications I would in just a few weeks learn uiautomator.

Spend some time to

  • check Google’s examples of using these frameworks:
    https://github.com/googlesamples/android-testing/tree/master/ui
  • read a documentation of these frameworks:
    https://developer.android.com/training/testing/ui-testing/espresso-testing.html

https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html

Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72