Creating your First Mobile Test in Testim Visual Editor

Welcome to Testim's mobile testing tutorial!

In this tutorial you will learn how to connect a mobile device, select a native mobile app to be tested, record a test, and finally run it. The tutorial does not cover all the various options in the process, but rather a specific scenario that illustrates a process from beginning to end.

Video Course: A beginner level video course on Tricentis Testim Mobile

Before we begin

Before we begin make sure you have the following:

  • A mobile testing project - mobile testing requires a mobile testing project that is separate from the web testing project. If you do not have an existing mobile project, contact Tricentis support.

📘

Note:

Each project is assigned to a single mobile operating system. A separate project is required to create/run tests on different operating systems. For example, you cannot create a test for an iOS device if the project was created for Android.

  • Tricentis Mobile Agent - in order to create and run mobile tests on Testim, you need to install the Tricentis Mobile Agent. This agent manages the physical devices connected to your workstation (e.g., phone or tablet) and simulators/emulators, running on your workstation. You can download the Tricentis Mobile Agent through the Test Editor UI, by clicking the Tricentis Mobile Agent icon, selecting the relevant OS version and then clicking the Download icon. See TMA documentation for more details.
250

📘

Note:

Each user that wants to run local mobile tests needs to install and configure the Tricentis Mobile Agent on their computer.

  • Native Application - in the current version only native apps are supported. For Android devices - Java or Kotlin apps. For iOS devices - Objective C or Swift.

Connecting to the Tricentis Mobile Agent

Before authoring a new test, you need to connect to the Tricentis Mobile Agent. The step assumes you have already installed the Tricentis Mobile Agent. If the Agent is not yet running you will see a red offline indication on the Tricentis Mobile Agent icon like this:

386

To connect to the Tricentis Mobile Agent:

  1. Click the Tricentis Mobile Agent icon.
  2. Click Retry Connecting.
349
  1. You will be asked to approve the opening of the software. Click Open Tricentis Mobile Agent.
1053

Once the agent has connected, the icon will display a green indicator and the Agent Status will display Ready. Note that the TMA (Tricentis Mobile Agent) version is also displayed (e.g. 1.0.0).

370

If a version update is available, it will be indicated as seen below:

334

Under Connected Devices, you can manage the connected devices.

  • Physical Devices - displays a list of physical devices connected to your local computer.
  • Virtual Devices - displays a list of virtual devices connected to the project.
370

Connecting a Physical Device

To connect a new physical device:

  1. Connect a physical device to your local computer (e.g., connect a mobile phone using a USB cable).

📘

Note:

For Android devices, the device needs to run in "Debug Mode" - Enable developer options and USB debugging. After enabling debug mode, go to Settings > Developer options and enable the USB debugging option. For more details, see the relevant section in the TMA documentation.

Once the Tricentis Mobile Agent recognizes the device, it will be listed:

313

Recording a Mobile Test

You can record a test on a mobile device to be run automatically at a later time. During the test you can record only a single application from one device. However, when playing back the test, you will be able to run the same test on another device than the device used during the recording.

To record a mobile test:

  1. Make sure a physical or virtual device is connected, by ensuring that the Tricentis Mobile Agent indicator is green.
  2. From the Dashboard screen click the New Test button.
365
  1. To begin recording your test, click the Record button in the action menu.
590
  1. Select a device for your test. In this tutorial we are using a physical device. To select the device, click the Physical Devices option and then click the device that you have previously connected. Click Next to continue.
653
  1. Select an Application to be tested. In this tutorial we will test one of the applications from the connected device. Click From Device and then navigate and select the desired application. Click Done to finish.
440

📘

Note:

Each test can only interact with a single application.

  1. An AUT Mirroring Viewer is displayed with the opened application under test. The viewer allows you to view the device and interact with the application under test, while Testim records the actions.

📘

Note:

Test steps are only recorded by taking actions on the AUT Mirroring Viewer. Taking actions directly on the device will not record test steps.

1868

🚧

Important Notice

When recording a test, try to choose text elements and avoid outer frames, images and icons for better stability.

622
  1. To stop recording, click the Stop Recording button or close the Viewer window.
686
  1. Click the Setup step and enter a Test Name and Test Description.
  2. Click Save to save the test.

Supported Mobile Actions

The following actions are currently supported when using the AUT Viewer during the recording of the test:

  • Tap - simulates a user tapping an element on the mobile device screen. To create this step, click the mouse on the AUT Viewer screen during recording.
  • Swipe Vertical - simulates a user pressing and dragging their finger across the screen vertically. To create this step, click the mouse, drag the cursor in a vertical direction, and release the mouse button.
  • Swipe Horizonal - simulates a user pressing and dragging their finger across the screen horizontally. To create this step, click the mouse, drag the cursor in a horizontal direction, and release the mouse button.
  • Set Custom Text - simulates a user entering text into a text field in the app. When hovering your mouse on a text element, the element is highlighted in red. Clicking the text element open a Set Custom Text window. Enter the desired text in the field and click the Send button.
416

Running a Mobile Test

Once you have created a test, you can run the test and Testim will automatically repeat the recorded steps.

Run Mobile Test in Testim Editor

To run a mobile test in the test editor:

  1. Navigate to the Test List and select the test you want to run.
92
  1. Click the Run button in the action menu.
1916

📘

If a Target device setting for the test is not present (e.g., when you run the test from Test Library), you will be asked to select a device. Select the relevant physical or virtual device and then click Done. The selected device will be saved as the Target Device for the current session.

The device viewer window opens and runs the test actions. When the test is completed, a pop-up window indicates whether the test was successful.

1905

Viewing Test Results

On the Test Editor screen, you can view the test results. The test result (Passed or Failed) is displayed at the top of the test. In addition, the colored icons at the top of each step indicate whether or not that action was successful.

1425

If you would like to view detailed results for a specific action, double-click on the step. The action results screen is displayed for that action.

In case of a test failure, detailed info is shown about the cause of the failure.

1900