Setup procedure for recording and running tests on a local device (Android)

Prev Next

Local device setup guide

0. What you need

Item Description
Windows PC / Mac Used to control tests
Android device Local physical device. Make sure the application can run on it.
USB cable Used to connect PC ↔ Android device
Autify NoCode Mobile account Used to access Autify NoCode Mobile and to create a token for the Autify CLI

1. Install and configure Android Studio (~1 hour)

Android Studio and the Android SDK are required by Autify NoCode Mobile to use a local Android device.

Install Android Studio

Download and install Android Studio from here.

Install the SDK

When you launch Android Studio, a dialog prompts you to install the Android SDK.
Choose the Standard option and install the SDK.

2. Enable USB debugging (~15 min)

USB debugging is necessary to operate the device.

Enable USB debugging

Follow the instructions on this page to enable USB debugging on the device:
https://developer.android.com/studio/debug/dev-options?hl=en

Connect the device to the PC

While USB debugging is enabled, connect the device to the PC.
When the dialog “Allow USB debugging?” appears, tap Allow.
Switch the connection mode to File Transfer (MTP) or PTP.

3. Install the Autify CLI (~15 mins)

Install the software needed to connect the device to Autify NoCode Mobile.

On Mac

Install Homebrew

The Autify CLI is installed via Homebrew.
If Homebrew is not installed, open Terminal and run the command shown under “Install Homebrew” on https://brew.sh/.

Configure PATH

After Homebrew is installed, add it to your PATH:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)

Install the Autify CLI

Run the following command in Terminal:

brew install autifyhq/tap/autify-cli

If you encounter errors during installation, please contact our Support.

After the command finishes successfully, verify that the Autify CLI works:

autify help

If the installation succeeded, you will see “Autify Command Line Interface (CLI)” along with the version and available commands.

If you see command not found, Autify CLI might not be properly added to your PATH.

On Windows

Download and install the Autify CLI from:
https://help.autify.com/docs/en/autify-command-line-interface#native-installer

After installing and configuring the PATH, verify:

autify help

If installed correctly, “Autify Command Line Interface (CLI)” will be displayed, along with version information and available commands.

4. Generate a Personal Access Token in Autify NoCode Mobile (~5 mins)

Generate a token on Autify NoCode Mobile user settings page and store it safely.

5. Setup the device connection (~15 mins)

First, register the Personal Access Token you created in the previous step with the Autify CLI.
Please run the following command in the terminal (Command Prompt / PowerShell for Windows) to set your personal access token:

autify mobile auth login

Next, run the command below.
This installs the components required to connect your mobile device to Autify NoCode Mobile and lets you enter the necessary information:

autify mobile link setup

Follow the on-screen prompts to complete the setup.

  • Enter the Workspace ID

    You can obtain the Workspace ID as follows:

    1. Go to http://mobile-app.autify.com/ and log in.
    2. The URL changes to:
      https://mobile-app.autify.com/projects/XXXXXXX?by=test_plan
    3. The XXXXXXX part is your Workspace ID.
  • Consent to upload logs
    Enter Yes to allow log files related to recording and test runs to be sent to Autify NoCode Mobile, which helps Support resolve issues more smoothly.

6. Start the connection

Run the following command in the terminal (Command Prompt / PowerShell for Windows) to start the connection between Autify NoCode Mobile and your local device:

autify mobile link start

After the command starts, login to the Create New Scenario page on Autify NoCode Mobile with the same user that created the access token.

If the connection is successful, select Local Device in the dropdown at the bottom of the modal; your device name will appear.

Image

Using the local device

Prerequisites

Before recording or running tests on a local device, make sure the USB cable is connected properly and the device is unlocked.

If you intend to use the device for an extended period, open Settings ▸ Display & Brightness on the device and set Auto-Lock to Never.

Complete the steps in Start the connection.

Tests will fail if the device is locked during execution. Please ensure the device is unlocked before running the test.

Recording

Open an existing scenario or create a new one and start a new recording session then select your local device and start recording.

If an error occurs during the recording session launch, confirm with a developer that the build can be installed on the device. If the issue persists, contact our Support.

Test execution

As with cloud devices, you can run tests that target the local device from Run Now on the scenario details page or from a Test Plan.

Troubleshooting

Please see this article.