A week ago, Microsoft announced https://azure.microsoft.com/en-us/blog/announcing-azure-pipelines-with-unlimited-ci-cd-minutes-for-open-source/ . The pipline has Xcode build as well. Thus, I tried to do it since if the build works well, we can shoose build pipelines for iOS from TravisCI/Bitrise/Azure for OSS products. Finally, I succeeded to build and run tests include XCUITest on it. It took about 4 minutes…More
Tag Archives: automation
[Appium][Python]Run tests in parallel with pytest
This is alternative way to run Appium tests in parallel in Python. I wrote [Appium]Run tests in parallel with parallel_tests gem before to run Appium tests in parallel in Ruby with parallel_tests gem. In this article, I’d like to put a link to do similar thing in Python. I’ve created an issue to prepare an…More
[Appium]Run tests in parallel with parallel_tests gem
Sometimes I heard how to implement test environment in parallel for Appium. You can see which factors affect the parallel running in Appium server. http://appium.io/docs/en/advanced-concepts/parallel-tests/ In this article, I’d like to show you an example to run tests in parallel using parallel_tests gem by Ruby. Factors First, I’ll summarise which factors you must handle. Android…More
[Kotlin][Android]disable runBlocking checker in a UI thread
This post is completely my personal memo. Recent kotlinx.coroutines has raising exception when runBlocking runs on a UI thread by default. The runBlocking is used to block current thread interruptibly until its completion. https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.experimental/run-blocking.html https://github.com/Kotlin/kotlinx.coroutines/blob/7764e43c6fe9640615747f7830e8aae1b9bc26d2/docs/basics.md#bridging-blocking-and-non-blocking-worlds In 0.25.0, the runBlocking has https://github.com/Kotlin/kotlinx.coroutines/issues/464 . As a workaround, we can disable the checker as below. https://github.com/Kotlin/kotlinx.coroutines/pull/458#issuecomment-408737581 https://github.com/Kotlin/kotlinx.coroutines/issues/227 [update]…More
[iOS]Mocking libraries for XCTest and XCUITest
When you run tests on iOS, you can mock HTTP request with several ways. We can use such mocking for XCUITest as well. For example, you can achieve the way using below libraries. https://github.com/envoy/Embassy https://github.com/envoy/Ambassador https://github.com/KazuCocoa/myCurrencyExchange/blob/master/myCurrencyExchangeUITests/ is the result. If you’d like to achieve similar things based on EarlGrey, you should switch the mocking libraries…More
[Android]Relax “Restrictions on non-SDK interfaces” on Android P
Android P has a feature of Restrictions on non-SDK interfaces. => https://developer.android.com/preview/restrictions-non-sdk-interfaces If you have a method like below, you will face java.lang.NoSuchMethodException: setAnimationScales [class [F] error. This is because of the non-sdk interface feature. https://github.com/KazuCocoa/DroidTestHelper/blob/3781fa40a6c9dfd34e1cb94ae230a98931af3313/droidtesthelperlib/src/main/java/com/kazucocoa/droidtesthelperlib/HandleAnimations.kt#L23 To avoid the error, we can call below adb commands. After this, calling setAnimationScales succeeds. I’ve appended the note…More
[Android]run tests on multiple emulators
I published x3 Speed Up Android CI at Cookpad last week. I’d like to leave the same thing in https://github.com/KazuCocoa/EspressoEnv/blob/master/script/run_instrumented_tests.sh The script is almost the same, but it has composer script as well.More
[Android][Espresso] Decrease test failure because of ARN dialog
When I ran android tests on OS 8.1 emulators, I faced some ARN dialog by Google bundled apps. They led test failure related with UI, Espresso, because of the dialog remained on the UI. To reduce the error, we can implement like below code in TestRunner. https://github.com/KazuCocoa/EspressoEnv/pull/8/files If the dialog appears before running tests, we…More
[iOS][Appium]How to debug, set break points, WebDriverAgent
Debugging WebDriverAgent is tricky. Appium uses the library to run tests against iOS. In this article, I’d like to leave how to debug WebDriverAgent using Appium. You can set break points in arbitrary lines on WebDriverAgent via Xcode following below. On Xcode Clone the repository and finish the setup Open WebDriverAgent.xcodeproj with Xcode Open Edit…More
[Android]Use PermissionRequester to get permissions
I’m using composer to handle instrumented tests. GrantPermissionRule has introduced for the andorid test support library, [Android]Checking Android Testing Support Library 1.0. The Rule work as @Rule in JUnit4. We’d like to clean screenshots every time. But we need some permissions to clean them. To achieve it, we can use PermissionRequester to get permissions. In…More