Prerequisite - Installations
Following needs to be downloaded and installed before hand. Please take help from your dev team for configuring the following tools. Or if you would like our assistance in configuring the Hybrid Environment, please keep the following downloaded and installed before contacting us for further help.
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
Note: Technically, we only need the Android SDK Tools and installing the Android Studio is the easiest way to install and manage Android SDK Tools. 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 - Setup your local machine 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 server by running the startup.sh(startup.bat for windows) script.
2. Open the Testsigma Agent Interface by going to below URL and register your Testsigma Agent with Testsigma Account credentials where the Test Cases are created.
3. Ensuring that Android SDK is set up and configured as per step 4 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.
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. Allow USB Debugging is Settings
Check the Android Documentation to know how to enable developer options and USB debugging.
3. Allow installation from Unknown Sources in Settings
Here's an easy guide to enable unknown sources.
4. Install the App to be automated(Optional)
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:
Use APK for local APK file
App details if app is already installed on the device.
Use Uploads if APK has been uploaded to Testsigma - Test Development> Uploads
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!