In [Appium] Prevent building WDA with useXctestrunFile or usePrebuiltWDA, I explained how to skip re-building WDA every session in order to make test setup faster. I would like to show a “cache” feature for WDA in Appium. After this PR , the function will work correctly. The PR will be in 1.12.1 or 1.13.0. As…More
Category Archives: test automation
[Appium] Prevent building WDA with useXctestrunFile or usePrebuiltWDA
Building WDA every time takes much time to initialise Appium sessions for iOS. I assume many users would like to reduce the initialisation time as possible. xcodebuild can run xcuitest process without building them. The command is xcodebuild test-without-build. If you already have a build module, xcodebuild can use it without additional building process. Appium…More
A couple of days ago, I had a conversation about Android tests on Twitter. I would leave it here a note. The conversation was: How to run UI tests in order Is there any good way to make them stable? How to get a system dialogue via Espresso? We discussed: It’s better to use RuleChain…More
[Appium][Flutter]Espresso driver x Flutter
I have updated my sandbox repository for Flutter x Appium. Update test app based on Flutter 1.0 Update test scenarios for it In Android, I could launch and through a simple scenario with UIA2 driver. But I could not succeed to launch it with Espresso driver. Below log is here Something happened with instrumentation combination……More
[Android]Run android tests on x86 emulators in Azure pipeline
I’ve published [iOS]try out Azure pipeline for Xcode build including XCTest/XCUITest as an article about Azure pipeline and iOS build. I thought we can use arm architectured emulators in Azure environment for Android case as well as Travis or CircleCI, etc. But I noticed we could run tests on x86 emulators in Azure. PR: https://github.com/KazuCocoa/EspressoEnv/pull/18/files…More
Read “Property-Based Testing with PropEr, Erlang, and Elixir”
I finished reading “Property-Based Testing with PropEr, Erlang, and Elixir” a couple of days ago. Do you know or know of the testing? Property-based testing is very interesting to learn. Through this book Through this book, we can learn what is property-based testing, how to consider property driven and practice in a real-world product. If…More
[Appium][Espresso]Using View Tag to test for Android on RN
I investigated before about testID feature if ReactNative [ReactNative][Appium]testIDの振られ方. Then, I found the framework maps the testID as android view tag. link The view tag is available via Espresso framework. Appium had not accessed the element by uiautomator2-driver since it uses uiautomator framework. But, appium-espresso-driver has been published. The driver can access to Espresso framework.…More
[Appium]appium-doctorをつかて環境の確認を行う
Selenium/Appium Advent Calendar 2018の19日目の記事です。空いてたので、またちょっとしたtipsを載せようと思います。 今日はAppiumには環境構築時に設定を確認できる appium-doctor と呼ばれるコマンドラインツールを紹介します。何かのOSSなりのツールを利用する際、最近はよく xxxx-doctor と呼ばれる環境確認用のコマンドラインツールをよく見かけるかと思います。Appiumも前々から同様なdoctorツールを持っていました。 v1.6まではこの appium-doctor は必須環境のみを確認するツールでした。例えばAppium自体の実行環境、AndroidやiOSに対してAppiumを実行できる環境を確認することができていました。あと、問題があった時に可能な限り自動でfixさせるautofixの機能もありました。 v1.7以降ではオプションとして利用される他のツール群の確認もするようにしました。 現在のmasterでは以下の通りの結果を得ることができます。v1.7以降にも少し確認する内容を増やしたり文言を調整したので、少し現状の npm install -g appium-doctor で入手できるものとは異なる表示、結果かもしれません。 この拡張により、画像による要素検索を行うために必要な opencv4nodejs が入っているか、などが確認可能です。iOS Simulator限定ですが、あらかじめ各種permissionを操作するためにplistを直接操作するAppleSimulatorUtilsも利用可能になります。いくつかのpermission操作はもとからサポートしていたのですが、これにより、より多くの種類のpermissionを調整可能です。 私は以前、このutilsを使いテスト実行時に不要なpermission dialogを抑制するためにあらかじめ権限を許可しておく、などしていました。(毎回、xxxのダイアログが表示されていると閉じるというようなXCTestでも必要になる記述を、Simulatorだけですが省くことができます。) Android/iOS/オプションの設定の中には手動で設定する必要のあるものもいくつかあります。そのためautofixにより全て自動で設定、とまではいかないのですが、手探りで必要なライブラリを手に入れていったり、何かライブラリのインストールが必要になる(例えば opencv4nodejs など)エラーに出くわして初めてその対応をする、というようなことを減らすことができるものとなります。 あまり大きな機能ではないですが、初めの一歩であったり、環境確認の時に利用していただけると幸いです。More
[Appium][Android]Set DataPicker and TimePicker via Espresso Driver (Eng)
This post is English edition of [Appium][Android]Set DataPicker and TimePicker via Espresso Driver which is for Selenium/Appium Advent Calendar 2018 in Japanese. mobile command Appium provides mobile command to conduct native commands in order to extend Appium actions using native features. In general, we follow the W3C webdriver spec. We add new endpoints which have…More
[Appium][Android]Set DataPicker and TimePicker via Espresso Driver
Selenium/Appium Advent Calendar 2018、17日目の記事です。空いていたので、ちょっとしたtipsということでAppiumの mobile command を紹介しようと思います。(English edition is available in [Appium][Android]Set DataPicker and TimePicker via Espresso Driver (Eng)) AppiumはW3Cに沿った基本的なコマンドのほか、iOS/Androidなどに特化したコマンドを拡張しやすくするために mobile command を定義しています。これは、例えばW3Cの定義には当てはまらない上に、AndroidやiOS固有の機能を拡張するためによく使っています。 従来の機能追加の方法としては、各種コマンドは全て何らかのURIにマッピングされていました。 ただ、特定のDriverでしか使うことはないのに必要以上にURIを乱立させたくはありません。保守が難しくなってきます。 そのため、 mobile: というprefixをつけたコマンドを文字列で定義し、このように各々の固有な機能を定義するようにしました。Androidだと adb コマンド、iOSだと siri の機能を使ったコマンドなどが拡張されています。 ここでは、それらで定義されたAndroidの2つのコマンドを紹介しようと思います。 DatePickerとTimePicker 最近ではAndroidだとDatePicker, TimePicker, 任意のpublic method を呼び出すことができる backdoor などの機能が追加されました。 これらの機能は、Appium 1.10.0 などで automationName: espressoと指定すると利用可能な、 Espresso Driver に追加されたmobile commandです。技術的にはEspressoベースだからできるようになったことです。 これらは今まではuiautmaotor経由だったためにできなかった/不安定だったところを解消する可能性が高いです。 テストコード 先ほど埋め込んでいたanimation gifは、すでにruby_lib_coreに用意している以下のテストコードを動かしている時のものです。実際に mobile: setDate…More