Configuring tests for Android

How to configure test settings for Android apps

Navigate to the Test tab in your app settings. You'll see a list of all the tests that Nevercode has detected. By default, all tests (except for AWS Device Farm) are enabled and will be run with every build.

Instrumentation tests

Instrumentation tests can be run on the following emulators:

  • Local emulator — Run the tests on an emulator that runs in the same virtual machine as the build.
  • Dedicated emulator — Run the tests on a single Firebase Test Lab virtual device free of charge. (Default)
  • Firebase — Run the tests on any number of virtual or real Firebase Test Lab devices with custom parameters. Note that you need a Firebase account to use this option. Refer to our Firebase Test Lab integration guide for information on setup and configuration.
Instrumentation test settings

Instrumentation test settings

To use a local or a dedicated emulator, follow the steps below.

  1. Select Enabled to run the tests with the build.
  2. Select local emulator or dedicated emulator as the emulation type.
  3. Test target is set by default based on the gradle task name selected in Build configuration.
  4. The Test parameters field (dedicated emulator only) is empty by default and includes all test targets. You can define additional parameters to limit the scope of tests. The test targets defined here must be in a specific format, see the --test-targets flag for gcloud firebase test android run from gcloud SDK documentation.
  5. Select the virtual device to be used for emulation (dedicated emulator only).
  6. Click Save to finish the setup.

Unit tests

  1. Select Enabled to run the test with the build.
  2. Test target is set by default based on the gradle task name selected in Build configuration.
  3. Click Save to finish the setup.

AWS Device Farm

The AWS Device Farm option lets you test your app on real devices. This option is disabled by default and requires additional setup. See our guide on how to create an AWS Device Farm account and configure the settings on Nevercode.

Test results

Once the build has finished, you can see the test results together with device logs in the build overview.

Test log

Test log

Configuring tests for Android

How to configure test settings for Android apps