そこまでXCUITestを調べてなかったのですが、最近のFacebookのWebDriverAgentに少し気になるissueのコメントを見つけました。
issueはこちら。 ★ いくつかピックアップすると、
There are a number of limitations currently with XCTUI testing, but we will need to start with the groundwork, since it’s possible that UIAutomation is going away in the next major Xcode release.
> https://github.com/facebook/WebDriverAgent/issues/7#issuecomment-140745640The old UI Automation support in Instruments is deprecated. UI testing in XCTest is the replacement, and where our efforts will be focused going forward.
https://forums.developer.apple.com/thread/9169
> https://github.com/facebook/WebDriverAgent/issues/7#issuecomment-140747097
リンク先のフォーラム
つまり、次のmajor version upで既存のUIAutomationは除かれ、完全にXCUITestが本流になる、という感じですね。
EspressoやXCUITest含め、このレベルでのテストコードの言語がだんだんとプロダクトコードの言語によるのは別に良いのですが、テストシナリオとテストコードの分離が難しくなって、それらが実装コードの可読性などに引きずられるのは少し面倒だなと感じました。シナリオコード書くの、SwiftやJUnit(Android)だと結構面倒なのですよね。
AppiumやKIFなどのような、なんらかの形でUIAutomationを介しているツールは、すべてXCUITestベースに置き換える必要がありますね。一方で、UIAutomationはAccessibilityの一部として提供されていた面もあるので、XCUITestのほかにもそういったAccessibilityへのアクセス手段でてくるのかな。
どのみち、XCUITestはちゃんと学ぶ必要ありそう。
