No release in over a year
The easiest way to retry your Android Instrumented Tests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Development

Runtime

>= 0
 Project Readme

try_adb_test plugin

fastlane Plugin Badge

About try_adb_test

The easiest way to retry your Android Instrumented Tests 🚀

Under the hood try_adb_test uses the stable version of the marvelous gojuno composer and allows you to customize your retry strategy.

Option Description Default
apk Either relative or absolute path to application apk that needs to be tested
test_apk Either relative or absolute path to apk with tests
test_runner Fully qualified name of test runner class you're using Automatically parsed from test_apk's AndroidManifest
try_count Number of times to try to get your tests green 1
shard Either true or false to enable/disable test sharding which statically shards tests between available devices/emulators true
output_directory Either relative or absolute path to directory for output: reports, files from devices and so on fastlane/output
instrumentation_arguments Key-value pairs to pass to Instrumentation Runner Empty
verbose Either true or false to enable/disable verbose output for Composer false
devices Connected devices/emulators that will be used to run tests against. Example: "emulator-5554 emulator-5556" Empty, tests will run on all connected devices/emulators
device_pattern Connected devices/emulators that will be used to run tests against. Example: "emulator.+" Empty, tests will run on all connected devices/emulators
fail_if_no_tests Either true or false to enable/disable error on empty test suite true
install_timeout Apk installation timeout in seconds. Applicable to both test Apk and Apk under test 120
extra_apks Apks to be installed for utilities. What you would typically declare in gradle as androidTestUtil. Example: "path/to/apk/first.apk path/to/apk/second.apk" Empty

Requirements

  • JVM 1.8+

Getting Started

To get started with try_adb_test, add it to your project by running:

$ fastlane add_plugin try_adb_test

Usage

try_adb_test(
  try_count: 2,
  test_runner: 'com.example.test.ExampleTestRunner',
  test_apk: "app/build/outputs/apk/example-debug.apk",
  apk: "app/build/outputs/apk/example-debug-androidTest.apk",
  instrumentation_arguments: "package com.example",
  device_pattern: 'emulator.+'
)