How to connect physical devices to bitrise.io

If Android emulator performance and reliability is insufficient for you but you have physical devices which can be used for testing, you can use them on bitrise.io.
All you need is Open STF and a public IP. Steps for Open STF are available in the bitrise.io steplib.

More details can be found in: How to Connect Physical Devices to Bitrise.io article.

Workflow scheme looks like this:
—
format_version: '2’
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: android
workflows:
stf_test:
steps:
# get the source code e.g. with git clone step
- openstf-connect:
inputs:
- stf_host_url: “${STF_HOST_URL}”
- stf_access_token: “${STF_ACCESS_TOKEN}”
- device_filter: .sdk >= “17”
- adb_key:
- adb_key_pub:
- device_number_limit: ‘2’
# devcies are connected now
# test the app e.g. with Gradle unit test step
- openstf-disconnect:
inputs:
- stf_host_url: “${STF_HOST_URL}”
- stf_access_token: "${STF_ACCESS_TOKEN}"
app:
envs:
- STF_ACCESS_TOKEN: STF API access token here
- STF_HOST_URL: STF host URL here e.g. https://stf.mycompany.com

1 Like

Thank you for the #how-to @koral, it looks awesome, I’ll have to try this as soon as I have some time for it! :wink: