When we run UI related tests, debugging failing test is one of the most difficult and need a bunch of time task. To make it easier, we usually take screenshot, capture videos and make error report helpful. Taking screenshot is very famous, and I skip it. Recording Android Android provide screenrecord command to record a…More
Category Archives: test automation
try reportportal
I tried reportportal to research awesome extensible reporting system. The framework provided by Docker and it’s very easy to try demo app via docker-composer… I know of Allure2 and it also awesome. The following is a capture image.More
[Swift] Identify not XCTest against XCUITest and EarlGrey
XCTestでは、Swiftの時にAppDelegateを取得しようとするとクラッシュする問題があります。 そのために、 などを使い、XCTestである場合はmockしたAppDelegateを使うなどの対策を行うことがあります。ただ、この場合だと、 XCUITest や EarlGrey によるテストを行うときもこの判定に引っかかります。 以下の差分には、XCUITestとEarlGreyに置ける上記判定を入れています。両方とも同様に判定が行われます。 https://github.com/KazuCocoa/test.examples/commit/cd3ec48b741320071471b27b3ad6254ce4fbacd5 これを避けるために、例えば環境変数でEarlGreyであることを指定する、などが必要。 https://github.com/KazuCocoa/test.examples/commit/aa527223208d4d56260fa0111ccf158554c0d12f プロセスに対する環境変数、iOSのテストだとちょくちょくお世話になることがあると思うので、覚えておくと良さそう。xcodebuildなどに対して環境変数を与えると同じようなことになりますが、これはプロセスに対する環境変数なので注意が必要(プロセス外で定義した環境変数は参照されない) reference https://stackoverflow.com/questions/26946677/uiapplication-sharedapplication-delegate-as-appdelegate-causes-exc-bad-access?answertab=active#tab-top https://stackoverflow.com/questions/39478895/can-you-pass-environment-variables-into-xcodebuild?rq=1 https://stackoverflow.com/questions/27930137/ios-swift-separate-appdelegate-for-xctest/27981726#27981726More
[Android]Run orchestrator 1.0.0
Download apks from maven: orchestrator-1.0.0.apk test-services-1.0.0.apk And install them and start the process like https://developer.android.com/training/testing/junit-runner.html If you have a custom runner, you can replace android.support.test.runner.AndroidJUnitRunner to yours. After the above, you can start instrumentation tests via the orchestration layer.More
[Kotlin]Kotlin in Actionをようやっと終えた
長らく読んでいたのですが、Kotlin in Actionをようやく読み、写経などし終えた。 他にも同時にやっていたとはいえ、このときからすると時間としては結構長かった… ただ、Kotlin全体の形や、以下のような処理を書いたりしてというところが理解・発想できるようになったぶん、読んで全体を知ることはよかったかなと思います。 以下は、KotlinでSpekといった大きなライブラリを使うほどではないけれど、テストにコンテキストを持ち込みたい時なんかにプロジェクトに書いておくと良いのではないかな、と思うやつです。 KotlinだとWhenが予約語になっているので、Spekででもなのですが、Given/On/Itスタイルにすると良さそう。 すぐに書くことはできるものですが、一応、ここではライセンスをMIT Licenseにしておきます。More
[Android]composer and swarmer
I’ve posted [Android][iOS]Awesome tips about composer and swarmer. The following is my trial with them. https://github.com/KazuCocoa/run_parallel_tests_androidMore
[Android]Checking Android Testing Support Library 1.0
update: Aug 9, 2017 I encountered no tests found error when running tests with AssertJ and AndroidJUnitRunner1.0.0. https://stackoverflow.com/questions/45402645/instrumented-tests-failure-with-androidjunitrunner-1-0-0-and-assertj A few days ago, Android Testing Support Library 1.0 was released. I pick up some awesome stuff for me, and I think this release will help enhance test automation for other 3rd party libraries. https://android-developers.googleblog.com/2017/07/android-testing-support-library-10-is.html https://developer.android.com/topic/libraries/testing-support-library/release-notes.html IdlingResources…More
[Erlang][Software Test]Property-based testing/QuickCheck Testing
I often see Property-based testing recently, and the following article is useful to understand what property-based testing and quick check testing is I’ve read for a few years. PropEr Testing http://propertesting.com/ I use QuickCheck testing in my work, and it works fine against functions especially stateless ones.More
[iOS]Large Photo Libraries for Testing
from https://developer.apple.com/videos/play/wwdc2017/505/ If you’d like to test with a large number of photos, you can generate dummy photos by https://developer.apple.com/sample-code/wwdc/2017/Creating-Large-Photo-Libraries-for-Testing.zip . Download it and run on the target device. The app is presented in https://developer.apple.com/videos/play/wwdc2017/505/ . https://developer.apple.com/documentation/photos/phassetMore
[Android][iOS]Awesome tips
Headless simulators Appium(with WDA) can run headless simulators isHeadless against Xcode9+. Awesome: https://github.com/appium/appium-xcuitest-driver/pull/472/files composer, swarmer and mainframer Replace Spoon for Espresso. https://github.com/gojuno/composer https://github.com/gojuno/swarmer https://github.com/gojuno/mainframerMore