SeeTest Automation Tutorial: A Mobile Test Automation Tool Guide

Owing to heavy competition and quick marketing of Mobile Apps, Mobile automation is being quite popular nowadays. There are several Mobile Automation tools that are available in the market as Open Source and Propitiatory ones.

Mobile automation tools can be categorized as Image-Based and Object-Based. In Image-Based tools, element identification is performed by image recognition. But Object-Based technique utilizes UI element internal representation (XPath) to identify UI elements.

This tutorial on SeeTest Automation gives you a complete overview of the entire tool along with pictorial representation for your easy understanding. And I am sure that this tutorial on SeeTest Automation will be a perfect guide for anyone who is new to it.

Introduction to SeeTest Automation

SeeTest Automation is one of the leading Mobile Automation tools in the industry that supports both Image-Based and Object-Based recognition. It also supports automation of iOS, Android, Windows Phone and BlackBerry applications. The same script can be used among different OS with few minor changes.

SeeTest provides client libraries for Java, C#, Perl, Python in order to develop automation scripts in these programming languages. SeeTest has its own reporting mechanism that can contain screenshots and video recording of tests performed. It is neither Open Source nor freeware.

The tool is licensed and the license cost is around $1500-$2000 per year (Node-Locked license).

Downloading and Installing SeeTest Automation

If you are installing SeeTest Automation on your machine, then you will get 30 days trial license to try out the features of SeeTest Automation.

Enter the First name, Last name, Company Email, Country, City and Phone number in the appropriate fields.

Uncheck all the checkboxes shown below except SeeTest Automation.

Figure 1 SeeTest Automation Registration

Click on Submit and you will be receiving an email from Experitest containing the link to download SeeTest Automation.

You may also receive a welcome email from Experitest with the URLs to get support to your company email.

Navigate to the download link received to download SeeTest Automation installation file.

After successful download, open the downloaded exe file and click on the ‘Next’ button in the installation wizard until it successfully gets installed.

First Launch

After successful installation of SeeTest Automation, double-click the shortcut icon displayed on the desktop to launch SeeTest Automation.

During the first launch, SeeTest might raise a firewall request to unblock some ports (SeeTest execution agent’s ports and licensing server port). We need to accept that request for seamless usage of SeeTest Automation. After accepting the request, SeeTest Automation will be launched as displayed in the below figure.

Figure 2 Firewall Access

Figure 3 SeeTest Automation Interface

The left top side of the interface contains tools to perform Device-related actions such as Add Device, Remove Device etc. It also contains an icon to connect to cloud device which is hosted on a cloud network.

Device toolbar and Application toolbar can be seen below. This contains icons to perform Application related activities such as Install Application in the Device, Remove an application from the Device etc.

The left bottom side is for Object Repository. This area displays all the objects that we created for a repository (by default, the repository name will be ‘default’).

Figure 4 Device, Applications and Object Repository tools

The middle area is the Command window in which we type SeeTst commands.

The area also contains two tabs ‘Test’ and ‘Debug’. Test tab facilitates performing actions on the device via SeeTest commands and Debug tab provides the facility to investigate a particular scene.

The rightmost side is a supplementary section for Command window. There we set properties and their values for the command entered in a command window.

Figure 5 Command Window

The right lengthy drop-down list is for adding commands to the command window manually. Clicking the down arrow in the drop-down list will display all the available commands. You can click on any command that you would like to perform. After clicking on the command, the command will be added to the command window.

Property window will populate with the parameters of the command. These parameters are set via providing values in the Value field next to the Property field. The window below Property window displays tiny documentation about the command.

In selenium, when we need to test whether a particular operation will work or not, we need to execute all the steps before that operation. But in SeeTest, the session id is valid until SeeTest Automation is closed, therefore you can do all the operations manually and perform the test of a particular command using the command window.

The bottom section has two tabs i.e,‘Log’ and ‘Code’. Log window displays the logs of the events performed and Code window displays the corresponding program for the commands entered in a command window.

SeeTest Automation can show codes for various frameworks such as Java WebDriver (Selenium), Java (JUnit), Java TestNG, C# NUnit, C# MSTest, UFT, VB.NET, Python, Perl, and Ruby. It provides client libraries for these as well.

Figure 7 Code Window

Execution Agents

Execution Agents are the programs that help the user to connect and execute tests in more than one device. Each agent utilizes ports in the system (normally starting from 8990). You can view Agent information by clicking on the ‘Agent Properties’ from the File menu of SeeTest Automation.

Figure 8 Agent Properties menu

In the ‘Agent Properties’ window, you can see multiple Agents with the port in which they are running, its status and the devices they support.

Figure 9 Execution Agents

In the above figure, two agents are in ‘Running’ status (running on ports 8889 and 8890) and rest are in ‘Disabled’ state. That means, we can connect two different devices (iOS, Android, Blackberry, and WP8) and execute the tests in parallel. The column next to the status implies the devices supported by the Execution Agent.

From the above figure, we can understand that the agents support iOS and Android devices.

If you are in a trial period, you will be getting two Execution Agents and by default, each of them supports iOS, Android, Windows Phone and Blackberry devices. When the trial period ends and once you purchase a node-locked license, the number of Agents will be limited to one.

You need to purchase ‘Executor Add-on’ license to get additional Execution Agents apart from the node-locked license. An Executor Add-on may cost around $1000 for a year.

Setting up Project Folder

When you launch SeeTest Automation for the first time, you would be asked to choose a directory in which the project related files are stored. This is similar to the workspace concept in the Eclipse. You can also switch to a different project folder by clicking on ‘Open Project’ from the File menu.

Project folder is used to store several files related to the current state of SeeTest Automation.

Some of them are as follows:

#1) Object Repository

Object Repository contains the objects (images, texts) that are used in SeeTest Automation to identify the objects that are not detectable by Xpath. If you are required to verify an image by its look, then XPath identification itself is not enough, however, image recognition is also needed.

In such a case, we create an object by combining XPath and the image. During verification, SeeTest Automation searches for the image in the specified XPath. We will be covering about Object Repository in detail in the upcoming tutorials.

#2) Scenes

Scenes are the screenshots that are extracted from the mobile app during the element identification stage ( also called Object Spy which we will be covering in upcoming tutorials). It also contains screenshots that are generated during a test run.

Apart from these, SeeTest stores Events file by keeping a track of the events performed in SeeTest Automation.

Connecting Real Devices

#1) Connecting Android Device

There are certain pre-requisites to connect an Android device with SeeTest Automation.

They are as follows:

USB Debugging should be enabled.

Latest device drivers including USB Debugging driver should be installed in the machine.

Once the above steps are done, connect the Android device to the USB port (Mostly back USB ports are preferred as they are directory connected to the motherboard). If successfully connected, you would be prompted to provide authorization in the Android device as shown below.

Figure 10 USB Debugging Authorization

After allowing USB Debugging, you would see an android icon in the notification bar of the Android device implying that it has been successfully connected via USB Debugging.

After the device is connected via USB Debugging, launch SeeTest Automation and click on the ‘Add Device’ icon in the toolbar and select Android device.

Figure 11 Connect Device

Then, a popup containing connected device information will be shown as shown below.

Figure 12 Add Device

After clicking on the Ok button, the device will be successfully added and the same would be listed in the device list displayed in the left part of SeeTest Automation. Double-clicking on the device name should open the device reflection as shown below.

You can also open this by clicking on the ‘Open Device’ icon in the toolbar after selecting the device from the Device List. Accept any firewall requests if it comes.

Figure 13 Added Device and Compatible Applications

Figure 14 Open Device

#2) Connecting iOS Device

In order to connect an iOS device, the latest version of iTunes should be installed in the machine. After connecting the device via USB, launch SeeTest Automation and click on the ‘Add Device’ icon in the toolbar and select iOS Device.

Now, a popup window will be displayed as shown below.

Figure 15: Configure iOS profile

This is because of the additional security mechanism imposed by Apple to prevent hacking. Apple does not allow controlling iOS device without a proper authentication. There are some workarounds to overcome this situation.

They are mentioned below:

Provide credentials for your Apple Developer profile

If you are an iOS developer, you must be having a developer profile registered in developer.apple.com. SeeTest Automation can authorize devices via providing the credentials of this account. If you do not have an Apple Developer account, then you can create one that may cost $100.

Import a DEF file (Advanced)

This is getting a DEF (Device Enablement File) file for the device connected via USB to authorize the connection. In order to generate this file, you still need a developer account. From version 10.3 SeeTest Automation provides a utility called XDEF to generate this file.

Whatever method you choose, click on Configure Profile button to proceed to the next step. A popup to add profile will be displayed as shown in the figure. From there you need to click on the Import icon and choose the desired option.

Figure 16 Import Profile

Figure 17 iOS Signing Configurations

If you choose ‘Register your iOS Developer Account’, then you would be navigated to another popup to enter the developer account credentials and the team.

After entering those, Click on the Register button to generate a .p12 file located in C:\Users\h<user directory>\AppData\Roaming\seetest\apple-accounts folder (Windows) and Users/<user directory>/seetest/apple-accounts folder (Mac).

Figure 18 Registering developer account

After successful registration, Click on Add Device in the SeeTest Automation main interface and select iOS Device. Then a popup will be displayed asking for permission. After approving the same, enter the password in the next popup displayed.

Clicking OK would add your iOS Device to the SeeTest Automation.

Figure 19 Asking Permission

Figure 20 Account Password

Connecting Emulator & Simulator

#1) Connecting Android Emulator

The pre-requisite to connect an Android Emulator with SeeTest Automation is the presence of Android SDK with ADB and AVD (Android Virtual Device). After you create and open an Android Virtual Device, click on Add Device and select Android Device.

Then a popup will be displayed similar to the popup displayed while connecting real Android devices.

Figure 21 Connect Android Emulator

Clicking on OK will add the Emulator to SeeTest and the emulator reflection can be opened by clicking Open Device from the toolbar.

#2) Connecting iOS Simulator

In order to connect an iOS Simulator with SeeTest Automation, you should be on Mac machine and XCode (8 or above) should be installed in the machine. Before configuring the simulator with SeeTest, you should install a simulator via XCode.

After you configure simulator through XCode, follow the below steps to add it to SeeTest Automation.

If you are adding the simulator for the first time, then it will take some time to boot up the simulator.

Figure 22 Adding iOS Simulator

Conclusion

By now, we discussed all the basic details of SeeTest Automation software and the procedure for connecting iOS and Android devices including iOS simulator and Android emulator with SeeTest Automation for automating the mobile apps.

Knowing all these is mandatory to proceed our journey in Mobile Automation with SeeTest Automation.

In the next tutorial, we will discusshow mobile apps can be automated using SeeTest Automation and the techniques that SeeTest Automation supports like record & playback as in Selenium IDE for automating mobile apps.