Prerequisite - Installations
The below tools need to be downloaded and installed as prerequisite. Please contact your Dev/IT team and allow Administrative rights to the mentioned tools for optimal operation.
1. Install Java JDK 7 or later and set the 'JAVA_HOME' & 'Path' Environment variables
Note: Please skip if you already have Java JDK installed and the environment variables set.
2. Install Android Studio and set the 'ANDROID_HOME' Environment variable
Check the Official Android Studio documentation page for more details on installing Android Studio - Android Studio - Installation Guide
3. Install Appium Desktop
Install Appium Desktop to automate Tests on your local mobile device - You can download and install it from here - Appium Desktop
4. Setup Testsigma Agent on your local Machine
Please check the detailed guide for setup - Quick setup guide - Setup TestSigma Agent on your device for Hybrid Test Execution(Windows/Mac/Linux)
Configurations on Local Windows/Mac/Linux Machine
We can configure the local Machine(PC/Mac) as per the steps given below:
1. Once Testsigma Agent is set up and configured as per step 4 in above section,
start the Testsigma Agent by running the startup.sh(startup.bat for windows) script file within Testsigma-Agent > apache-x.x.xx > bin
2. Open the Testsigma Agent Interface on the machine where agent is running by going to below URL.
3. Go to Register Agent tab in the Testsigma Agent and confirm that your Testsigma Account details are present there. If not, please register the Agent with your Testsigma login credentials.
4. Ensuring that Android SDK is set up and configured as per step 2 in above section, connect the Android Device and start ADB by executing the command 'adb devices' on Command Prompt:
Your device should show up under 'List of devices attached' if Android SDK is configured properly. If the results shows 'unauthorized' message, please check the device for access popup and allow it or reconnect the device and try again.
4. Start the Appium Server with default configuration i.e Host address - 0.0.0.0 and port 4723.
Note: Please take a note of the Host Address and Port as we need to enter the same while adding an Execution Configuration to the Execution in a later stage.
You may also use the localhost IP if you prefer i.e Host Address - localhost and port - 4723. Check the README section on the Appium GitHub page for more details.
Configuration on Local Android Device
Also, we need to do a few things on the mobile device to enable Test Execution on it.
1. Enable Developer Options in Settings
2. In Developer Options, check 'Allow USB Debugging'
Check the Android Documentation to know how to enable developer options and USB debugging.
3. In Developer Options, check 'Allow USB Debugging(Security Settings)' if present
4. In Developer Options, Check 'Install via USB'
3. Allow installation from Unknown Sources in Settings
Here's an easy guide to enable unknown sources.
4. Install the App to be automated on the test device(Recommended)
In order to start a Test Session, do the following steps:
1. Create a Test Case and add a few Test Steps to it.
2. Click on the Run button on the top right to start a Dry Execution and select the following options:
Execution Model: Hybrid
Machine: Select your local device that was added in Configuration > Systems
Appium URL: Default value is http://0.0.0.0:4723/wd/hub
Device Name: Give a unique name for your device
Use APK/App Details/Use Uploads:
(Recommended) Use Uploads if APK has been uploaded to Testsigma - Test Development> Uploads
App details if app is already installed on the device.
Use APK for local APK file
3. Click on Create and Run.
4. Switch to Executions page of Testsigma Agent. If the Execution name is present with status as 'Running', the test will start in the local device in a few minutes.
That's all the configuration required for Automating Android Apps on real Android Devices using Testsigma. Go to the Testsigma App and start the Execution!