TestArchitect Corner: Testing Web Applications in Mobile Emulation Mode

The huge range of mobile devices used to browse the web now means testing a mobile website before delivery is critical.

Developers use various techniques that allow mobile web applications to adapt to different mobile devices and screen sizes. Specifically the following:

  • Responsive web design that lets websites conform their page layouts to various screen sizes and dimensions
  • Platform detection that allows websites to present device-specific content

In a nutshell, testing on emulators helps verify that your mobile web applications look and work well on various devices, before you actually begin to test the web applications on real physical devices.

Mobile web testing can be challenging and tedious due to the large variety of mobile devices, platforms and screen sizes. TestArchitect addresses this challenge by letting you test mobile web applications on device emulators. Without the need for real physical devices of every type to improve test coverage, the result is a testing setup and maintenance that is highly simplified.

What is Mobile Emulation Mode?

Basically, Chrome DevTools’ Device Mode is a built-in function of Chrome. This mode simulates a wide range of devices and their capabilities, so that you can test applications under test (AUTs) on a variety of emulated mobile devices, without the need for real physical devices. It simulates not just the browser environment but the entire device. It’s useful to test things that require OS integration, for example, form input with virtual keyboards.

Automate Tests in Mobile Emulation Mode with TestArchitect

TestArchitect attempts to implement built-in actions in a manner that, from the standpoint of the AUT, is as close as possible to real user actions. The general workflow to test a web app in mobile emulation mode is:

1. Prepare Mobile Browser Profiles

The profiles are coded in JavaScript Object Notation (JSON), and with Chrome debugging protocol. You can define as many parameters as you need for a mobile browser profile.

However, it is recommended that your JSON string contains the following basic information:

  • The user agent
  • Whether to emulate a mobile device
  • Screen width
  • Screen height
  • Device pixel ratio
  • Whether a view that exceeds the available browser window area should be scaled down to fit
  • Enabling of touch event emulation

2. Launch Mobile Browser Emulator in Device Mode on Chrome DevTools

Now you’re ready to begin performing your automated web-based tests on the emulator. For example, enter “TestArchitect” then click on the “search” button.

3. Change Environment to Customize Emulator Behaviors During the Test Run

You may wish to change the environment for the emulator to customize its behaviors (device orientation, emulate geolocation data, etc.). When the mobile browser emulator has been invoked, use the send command to browser built-in action again. Technically, “send command to browser” sends a JSON string request to Google Chrome to customize the emulator behaviors on-the-fly. Note that you can change as many behaviors as you want, as long as those behaviors are supported by Chrome debugging protocol.


Besides Android emulators and iOS Simulator, mobile emulation mode is another approach for mobile web testing without the need for real mobile devices.

To learn more about this TestArchitect feature, visit testarchitect.com

Hien D. Nguyen
Hien D. Nguyen is an experienced Software QA Engineer at LogiGear Corporation. A tester by day and a blogger by night, Hien has a great passion for software testing, especially complex Test Automation problems. When not doing all those, he enjoys reading, jogging and trying new things.

The Related Post

Looking for a solution to test your voice apps across devices and platforms? Whether you’re new or experienced in testing voice apps such as Alexa skill or Google Home actions, this article will give you a holistic view of the challenges of executing software testing for voice-based apps. It also explores some of the basic ...
Even the highest quality organizations have tradeoffs when it comes to their testing coverage. In Japan, Europe, and the United States, automotive manufacturers are aiming to enhance automotive functions by using software; in Japan in particular, Toyota, Nissan, Honda, Mazda, and Subaru are all adding endless amounts of software to their vehicles in the form ...
LogiGear Magazine September Issue 2020: Testing Transformations: Modernizing QA in the SDLC
5 roadblocks in vehicular autonomy that complicate Software Testing Experts in the field have previously referred to air travel as somewhat of a gold standard for autonomous vehicle safety, but after Boeing’s two tragedies, that analogy can no longer be used when talking about self-driving cars. This was after Boeing’s 737 MAX Jets have found ...
I got some comments on my post “Test Everything all the Time” — most notably people commenting that it’s impossible to test “everything”. I can’t agree more. The intention of the post was to make the point that we need to be able to test “everything we can” all the time. That is, you should ...
LogiGear Magazine – The Big Testing Issue – April 2012
An Overview of Four Methods for Systematic Test Design Strategy Many people test, but few people use the well-known black-box and white-box test design techniques. The technique most used, however, seems to be testing randomly chosen valid values, followed by error guessing, exploratory testing and the like. Could it be that the more systematic test ...
September Issue 2019: Advancing Automation
How to do UI test automation with the fewest headaches I’m currently interviewing lots of teams that have implemented acceptance testing for my new book. A majority of those interviewed so far have at some point shot themselves in the foot with UI test automation. After speaking to several people who are about to do ...
Introduction Many executives have some very basic questions about Software Testing. These questions address the elements of quality (customer satisfaction) and money (spending the least amount of money to prevent future loss). The basic questions that executive have about Software Testing include: Why care about and spend money on testing? Why should testing be treated ...
This book isn’t for everyone, but everyone can get some value out of it. What I mean by that rather confusing statement is that folks working in Agile environments will likely want to throw the book across the room while folks in more bureaucratic environments like CMMI or other waterfall environments will likely get a ...
Framework: An abstraction in which software providing generic functionality can be selectively changed by additional user written code, thus providing application specific software. A software framework is a universal, reusable software platform used to develop applications, products and solutions. Harness: A collection of software and test data configured to test a program unit by running it under varying conditions and monitoring ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay in the loop with the lastest
software testing news