> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-web/en/autify-university/advanced/real-device-testing/autify-mobile-real-device-test.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Testing on Real Mobile Devices

{% hint style="warning" %}
PC & Mobile browsers on real devices are available on particular plans.
{% endhint %}

One of Autify’s most significant advantages is that, aside from full-sized PC browsers, you can also run tests on a wide variety of mobile real devices This environment is available to customers with a paid optional contract. Once contracted, it can be selected from the "Execution Environment" settings in your Test Plan. Please note that this option will not appear if it is not part of your current plan.

The benefits of running automated tests on real mobile devices with Autify are:

* **You don’t have to source your own mobile devices**
* **You can check behaviors specific to real devices, which may not be seen on emulators**
* **You can run automated tests repeatedly**

However, there are characteristics and limitations specific to real mobile environments. Therefore, the key to successful mobile testing is understanding these limitations and considering using emulators when building tests.

In this article, you will find tips and tricks on how to test on real mobile devices, as well as common issues and how to solve them.

## 1. Mobile devices you can test on with Autify

Autify supports a variety of smartphones and tablets, which run on iOS or Android operating systems. For more information, please reference the following documentation:

* [Supported OS and Browser Versions (Mobile)](https://help.autify.com/nocode-web/en/autify-university/foundation/execution-environments/supported-os-and-browser-versions-mobile.md)

## 2. The difference between testing on mobile devices and emulators

When you run tests on real devices and emulators (Device Mode in Chrome), there are slight differences in behavior due to their rendering engines. Here are a few key differences:

* Testing on an emulator is quick and easy. However, there may be slight variations in the user environment.
* Testing on real devices results in longer execution speeds, but rendering will be the consistent with the user environment.

We recommend that you use emulators when creating ***\[Scenarios]*** or checking its stability, and use real devices once you’ve confirmed that there are no issues when running on emulators.

## 3. How to automate real mobile device testing with Autify

Here is the recommended order in which to run mobile device testing with Autify:

1. Create a ***\[Scenario]*** with mobile-sized window dimensions
2. Run the test on a real mobile device

Let’s take a look at each step in more detail.

### 3.1. Record a \[Scenario] with a mobile-sized window dimensions.

You can find detailed instructions on how to facilitate this operation in the article below.

* [Can I test my smartphone web? How can I record a scenario?](https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-recording/can-i-test-my-smartphone-web-h.md)

Please record the ***\[Scenario]*** in Device Mode on Chrome and select a screen size you expect the user to have.

{% hint style="warning" %}
**Running on an emulator**

The key to running tests on real devices is to first **ensure that the test consistently succeeds on mobile emulators.** Testing on emulators is a quick process, so you can perfect the ***\[Scenario]*** by running the test repeatedly.
{% endhint %}

### 3.2. Running the test on a real mobile device

Once the tests run on mobile emulators stably, you are ready to run the tests on real devices. Prepare a ***\[Test Plan]*** for real device testing. Please select the appropriate device from the list of smartphones and tablets on the right side of the Device drop-down menu.

**Real iOS device**

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-8bd506a51b03a944a6e0e7d3e34b73077aa136e5%2FScreenshot%202022-12-28%20at%2010.21.35%20AM%20copy.png?alt=media)

**Real Android device**

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-c8e33dddc6cd31e7fd6cab5bdb06e1dc558ad00b%2FScreenshot%202022-12-28%20at%2010.21.46%20AM\(1\).png?alt=media)

Please note that **in some older versions of real device environments, a notice will appear saying that the device (version) you have selected is not supported.** You can still run tests in those environments, but test results are not supported.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-b1d6500b56ad2148c168c2bb595ba7c3ac4238b2%2FScreen_Shot_2022-03-10%2021.47.33.png?alt=media)

## 4. How to choose between real mobile devices and emulators

Testing on real devices and testing on emulators both have their unique characteristics. We recommend that you take advantage of them, even after tests are running smoothly on real mobile devices.

Here are two points to keep in mind.

### 4.1. Plan test execution according to frequency and time required

**Generally, testing on real mobile devices results in longer execution speeds.** Real mobile device testing typically over 10x longer execution speeds compared to testing on mobile emulators in Autify's cloud environment. Therefore, we recommend that you test on emulators and real devices for different purposes. For example, use emulators for tests that need to be run frequently and run tests on real mobile devices over the weekend.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-01f2bfc51b8cf70f47c9790eb6415b61cb76ada6%2Freal-mobile-devices\(1\).png?alt=media)

As shown in the figure above, real device tests are executed one at a time by default. As an option, you can increase the number of simultaneous test runs. For details, please refer to the  "How to run several tests on real devices simultaneously" section at the very bottom of the page.

### 4.2. Utilizing emulators when using functions unsupported on real devices and Notes

Some functions cannot be tested on real mobile devices and therefore must be tested on emulators. The following are typical examples:

* File Uploads: [File uploading is not supported on iOS real devices](https://help.autify.com/nocode-web/en/autify-university/foundation/creating-a-scenario/can-i-test-file-upload.md#limitations).
* Opening Windows: [There are limitations](https://help.autify.com/nocode-web/en/autify-university/foundation/creating-a-scenario/open-switch-window-step.md#notes) when performing operations that open new windows on iOS real devices.
* PDF Handling: [On Android real devices, PDF files cannot be opened in a separate window](https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-file-assertion/can-i-test-pdf-content.md).
* File Download Assertions: File download assertions are not supported on both iOS and Android real devices. [When executed on a real mobile device , the Assert file download step will be skipped](https://help.autify.com/nocode-web/en/autify-university/advanced/assert-file-download-2/assert-file-download.md#overview).

When running tests that involve the above, please use an emulator to test the functions.

Some, not all, real mobile devices might not accept beforeunload alerts automatically during test execution. For more information, please see [this article](https://help.autify.com/nocode-web/en/faq/faq-create-scenario/faq-recording/recording-alert-dialogs.md#test-execution-behavior).

Autify Connect Requirements: When using Autify Connect, in addition to the standard Cloud requirements, you must allow [\*.browserstack.com in your network settings](https://help.autify.com/nocode-web/en/autify-university/advanced/tests-on-private-environments/requirements-for-autify-connect.md#network-requirements).

## 5. Issues with testing on real mobile devices

Although we are constantly working to improve Autify so that you can test comfortably even in mobile device environments, mobile device testing is an area with many technical challenges. Below, you will find a list of known issues with testing on real mobile devices.

### 5.1. Execution speed

* Test execution speed on real mobile devices depends on the ***\[external device farm environment]*** , and is much slower than running tests on the ***\[Autify cloud environment]***.

### 5.2. Device-specific behaviors

* In some cases, elements not present in the PC’s recording environment may affect test stability.
* E.g., Confirmation dialog displayed by the OS

### 5.3. Implementation of the Click step

* When you record a Click step on an element, a click will be executed instead of a tap in most cases. If the webpage expects and listens to a [TouchEvent](https://developer.mozilla.org/ja/docs/Web/API/TouchEvent), the click step may not trigger the event and subsequent steps in the scenario may fail. Update your webpage so that it listens to [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent) including click, or apply [JS Steps for Elements](https://help.autify.com/nocode-web/en/autify-university/advanced/js-steps/js-steps-for-elements.md) to dispatch a TouchEvent programmatically. (This behavior is the same in emulators)
* In some cases, the test execution engine cannot acquire the correct coordinate where a click/tap should be executed and the click/tap is executed in the wrong place. Please get in touch with support if you suspect the coordinate of an executed click/tap step was misaligned.

### 5.4. Susceptibility to timing issues

* In real mobile devices, timing issues tend to occur more often than in other environments. These issues stem from a discrepancy between the time it takes to display a page and the time it takes to execute the test. Please reference the section “Sometimes the page doesn’t transition after clicking a button/link” for an example.

### 5.5. Temporary issues

* Unknown errors or interruptions may occur depending on the device status in the external device farm. In most cases, you can solve the issue by rerunning the test. However, please do not hesitate to contact us if failures occur repeatedly.

## 6. Troubleshooting when testing on real devices

### 6.1. Sometimes the page doesn’t transition after clicking a button/link

Consider the following example:

* Step 3: Click the **Request Demo** button, and the page transitions.
* Step 4: Verify the text shown on the screen after the page transition.

Below, you can see an example result of running the above steps on a real iPhone. The page didn’t transition in step 4.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-b609e66d02b6f0a98de9a10d14507b5e6eab8021%2FScreen_Shot_2022-03-11%2012.59.26.png?alt=media)

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-4df9a5e602759aa3b055a895a36c51d1bbfcbb0e%2FScreen_Shot_2022-03-11%2012.59.48.png?alt=media)

This problem can occur due to a discrepancy between the timing of page display and test execution. It tends to occur more frequently in real device environments.

If the page transition fails only on real devices and not in other environments, it may be solved by adding the ***\[URL Should be]*** [assertion](https://help.autify.com/nocode-web/en/autify-university/advanced/assertions-1/assertions-against-the-page.md) after the operation that causes the page transition.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-bc57a5a36a1b98271ac93e6d554c3b956120f06c%2FScreen_Shot_2022-03-11%2013.00.29.png?alt=media)

If you experience a similar issue, please give this method a try.

### 6.2. How to use different user accounts for each test execution environment (not limited to mobile devices)

We often hear from users who want to use different accounts for each test execution when there’s a possibility of running tests in parallel on various environments, including real devices. In this case, we recommend preparing a [***\[JS Step\]***](https://help.autify.com/nocode-web/en/autify-university/advanced/js-steps/javascript-steps.md) as shown in the following example and using the returned value in the subsequent steps.

```js
/* An example where a different user account is returned depending on the execution environment */  
var userAgent = window.navigator.userAgent;  

if (userAgent.indexOf('Android') >= 0) {  
return ‘Android user’;  
}  
else if (userAgent.indexOf('iPhone') >= 0) {  
return ‘iPhone user’;  
}  
else if (userAgent.indexOf('iPad') >= 0) {  
return 'iPad user';  
}  
else {  
return ‘Default user’;  
}
```

### 6.3. How to run iPhone tests sequentially within an iPhone \[Test Plan] and Android tests sequentially within an Android \[Test Plan].

We will be releasing a new feature which will allow you to specify the order in which tests are executed within a ***\[Test Plan]***!

### 6.4. How to run several tests on real devices simultaneously

By default, you can run one test at a time in a real device environment. Optionally, this can be increased to two or more! You can reduce overall testing time by running multiple tests on real devices in parallel.

To send your feedback, please contact us via [autify.com/contact](https://autify.com/contact).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-web/en/autify-university/advanced/real-device-testing/autify-mobile-real-device-test.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
