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.

Conclusion

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 ...
Has this ever happened to you: You’ve been testing for a while, perhaps building off of a branch, only to find out that, after all of this time, there is something big wrong. It’s a bad build and now you have to go backwards, fix something, and get a new build. Basically, you just wasted ...
Bringing in experts can set you up for automation success. Test automation isn’t easy when your testing gets beyond a few hundred test cases. Lots of brilliant testers and large organizations have, and continue to struggle with test automation, and not for lack of effort. Everyone understands the value of test automation, but few testing ...
All too often, software development organizations look at automating software testing as a means of executing existing test cases faster. Very frequently there is no strategic or methodological underpinning to such an effort. The approach is one of running test cases faster is better, which will help to deliver software faster. Even in organizations that ...
Learn how to leverage TestArchitect and Selenium for turnkey, Automated Web testing. TestArchitect lets you create, manage, and run web-based automated tests on different types of browsers—using either a WebDriver or non-WebDriver technique. In this article, we will explore employing WebDriver for testing a web-based application with TestArchitect. TestArchitect with WebDriver is a tool for automating ...
< Michael Hackett sat down with EA’s Stephen Copp to discuss the world of integrated test platforms.
Identifying which tests to begin with when starting automation is key to driving testing cycle times down and coverage up. So there you are. You’ve done a little research and made the business case to upper management regarding test automation and they bit on the proposal. Surprisingly, they supported you all the way and are extremely ...
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 ...
LogiGear Magazine, December 2015: Test Automation
The success of Automation is often correlated to its ROI. Here are 5 KPIs that we find universally applicable when it comes to quanitfying your Test Automation.
In order to make the right choices among tools, you must be able to classify them. Otherwise, any choice would be at best haphazard. Without functioning classification, you would not be able to understand new tools fast, nor come up with ideas of using, or creating new tools.

Leave a Reply

Your email address will not be published.

Stay in the loop with the lastest
software testing news

Subscribe