Blog Status Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Push Files

You can push data to the device before your test runs. This is useful if your tests require some sort of premade data like test fixtures or baseline snapshots or if your test requires some additional APKs to run.

Installing additional APKs

Use --additional-apks to install one or more APKs to the device before the test starts. Multiple values can be provided by separating them with a comma, e.g. --additional-apks foo.apk,bar.apk. These will be installed on the device before any test runs.

This is useful if you have multiple apps and you want to test some form of interaction between them - for instance one app providing an exported Service or a ContentProvider while the app under test is using those endpoints.

If your test requires the Android Test Orchestrator and/or Test Services apk there’s no need to push them - they’re already present in all of the device configurations.

Pushing other data

You can also push any other free-form data like test fixtures or baseline screenshots using --other-files to one of the two possible locations:

  • /data/local/tmp/
  • /sdcard/ (may require app to have READ_EXTERNAL_STORAGE permission)

The --other-files argument takes parameters in the form of remote-path=local-path. For example, if you want to send fixtures.json file to /sdcard/fixtures.json use --other-files /sdcard/fixtures.json=fixtures.json.

You can specify multiple such pairs separating them with commas: --other-files /sdcard/fixtures.json=fixtures.json,/sdcard/