Prerequisites


You need to have Appium and XCode installed and configured to connect to an iOS device on your Mac as a prerequisite requirement.
Please refer this article for more details - Configuring your Windows PC and Android device for Hybrid Test Execution


Also, we need to do the following in Testsigma before we proceed:

  • Create a Project, add an Application and an Application Version inside it.
  • Create a Test Case and add a few Test Steps in it.
  • Create a Test Suite and add the Test Case to it.


Creating a Project, Application and Application Version


If you are new to Testsigma and you are not yet familiar with Testsigma Project Hierarchy, check the Sample Project article to get familiar with the Project organization in Testsigma.

A Sample Project explaining the Testsigma Hierarchy


After that, please check the below articles for a detailed guide to creating Projects, Applications, and Versions.

How to Create/Edit/Delete Project?

How to Create/Edit/Delete Application?

How to Create/Edit/Delete Version?


Create a Test Case and add a few Test Steps in it


Please check the following articles for a detailed guide to creating Test Cases and Test Steps:

How to add/edit/delete an automated Test Case?

How to add/edit/delete automated Test Step?


Create a Test Suite and add the Test Case to it


Please check this article for more details on creating a Test Suite - How to add/edit/delete Test Suite?


You can bypass the Test Suite creation requirement by using a Quick Run or Dry Run.

Please check this article for more details on Quick Run and Dry Run - Different Types of Execution Methods in Testsigma


Overview

Considering you already have a Test Suite containing Android Application Test Steps, the procedure for Executing a native Android Application in Testsigma in a local environment are as follows:


1. Add the local test machine(PC) as a System in Testsigma.

2. Set up the local PC and mobile device for hybrid Execution.

3. Create Execution and add Execution Configuration.

4. And finally, start the Execution!


1. Add the local test machine as a System in Testsigma


We need to add the local machine to Testsigma Database to be selected as the Test Machine while creating Execution.


Please check this article for creating a System: How to add/edit/delete System?


Once the System is added to Testsigma, we can move onto setting the machine up for Hybrid Execution by installing Testsigma Agent and configuring it.


2. Set up the local machine for hybrid Execution


Once the local System is added to Testsigma, we need to perform some configurations on the Local machine where tests are to be run.


This is done so that the local machine can accept communication in the form of HTTP packets from Testsigma servers. This step is preconfigured in other Cloud Execution Models such as Testsigma Labs, Sauce Labs, and BrowserStack. If you prefer the easy method, you may use the cloud execution models in which you can select the execution environment from the list of available devices. Please check this article for more details - How to execute tests in Testsigma Labs, Sauce Labs or Browserstack?


Continuing with the Hybrid Execution setup, we need to first set up the Testsigma agent on the local PC. Please check the following article for a detailed guide on setting up Testsigma Agent on local PC for Hybrid Execution:

Setting up Testsigma Agent on your local Windows/Mac/Linux machine


Assuming you already have the prerequisites such as Appium and Android Studio configured, we are ready to run tests once the Testsigma Agent is configured.


Now we can create the Execution Configuration in which we will specify the necessary device details we set up till now.


3. Create Execution and add an Execution Configuration

We are almost there. The local machine is configured with Testsigma Agent and the machine is ready to accept communications from Testsigma servers to start the Execution.


Now we can start creating the Execution. Please check the following article for a detailed guide:

How to create/edit/delete Executions?


While creating the Execution Configuration for Android, we need to tell some extra information in case of Hybrid Executions for Testsigma to connect to the local Android device properly. The most important fields on the page are:


Machine: Select the local System we added in the previous Step. This is the System which Testsigma communicates directly with. The Test Android device should be connected to this System.


OS Version: Select the Android OS version in the Test Device.


Appium URL: Enter the Appium URL you started the server with. If you used the default configuration, the URL would be:


http://0.0.0.0:4723/wd/hub


Device Name: Enter the serial number of the Android Device.


Use Apk: Use this option if the App to be tested is located on the PC and you don't want to install it on the test device.

  • Apk Path: Specify the Path to the APK file on the local PC


App Details: Use this option if the App is already installed on the Test Mobile device. This is the recommended option.

  • App Package: Package name is the unique identifier of an Android App
  • App Activity: Activity name is the name of a specific Android App Screen or Page

    Check this article to know how to find App Package name and Activity name - How to find App Package and App Activity?


Once the Execution Configuration is created, we can finalize the Execution creation by clicking on Create button.


4. Start the Test Execution!!

Goto the Execution page if not already there and make sure the following conditions are met before starting the Execution:

  • Make sure the Testsigma Agent that we started earlier is running by refreshing the Agent page. Also, check the Agent is running in a command prompt window titled 'Tomcat'
  • Make sure the Appium Server is running
  • Check the mobile device is connected by checking the output of 'adb devices' command. You should see the device serial number if the device is connected properly.

Once all the above checks are done, you can start the Execution. Goto the Executions page and click on Run Now near the corresponding Execution name. That's all we need to do for performing a Hybrid Execution on a local Android Device.


Welcome to the era of #SmartTestAutomation!!