Reflect Docs

Mobile Testing

Test mobile-friendly responsive websites, PWAs, or hybrid-mobile apps.

Reflect gives you the ability to record and execute tests via an emulated mobile device. This allows you to create regression tests that simulate how your users experience your site from a phone or tablet. This can also be used to test hybrid mobile apps built with technologies like React Native.

Device Profiles

An option to select a ‘Device Profile’ is provided when you start a new test recording.

Each test must be associated with a single Device Profile, and this profile cannot be changed once the test is created. In addition to the default ‘Desktop’ profile, two mobile device profiles are currently supported:

‘Tablet’ Profile

This profile emulates the dimensions of an iPad and iPad Mini:

  • Width: 1024 pixels
  • Height: 768 pixels
  • Device Scale Factor: 2x
‘Mobile’ Profile

This profile emulates the dimensions of the iPhone 6, iPhone 7, and iPhone 8:

  • Width: 667 pixels
  • Height: 375 pixels
  • Device Scale Factor: 2x

Since a test can only be associated to one Device Profile, if you want to record a test scenario for both desktop and mobile devices, you’ll need to record the test for each profile individually. We realize this results in test duplication, but this limitation exists for a good reason. Web apps can often have divergent behavior depending on the user’s screen resolution, reported User Agent, or Javascript runtime. Creating a single recording that is resilient to all of these changes is often not possible, so instead we choose to isolate these differences into Device Profiles so that they are guaranteed not to change across test runs and so we can minimize the chances of false-positive test failures.

The Mobile and Tablet device profiles utilize Chrome’s built-in mobile emulation support and do not run on real mobile devices.

Note: If testing against a real device is a requirement for your organization, we’d love to hear from you. Please contact us at support@reflect.run with information on your use-case.

Testing Hybrid-Mobile Apps

Because hybrid-mobile apps utilize web technologies, it is possible to create regressions for them in Reflect. Before an app can be tested, it must first be deployed to the web at a location that is accessible by the Reflect recorder.

For React Native apps, the best way to accomplish this is via the React Native for Web open source plugin which makes it possible to run React Native apps on the web. A similar approach can be taken for other hybrid-mobile technologies - as long as it’s published to the web, you can test your app in Reflect.

Copyright © 2020 Reflect Software LLC. All Rights Reserved.