3 min read time

How to perform Cross Browser Testing with Mobile browsers in UFT

by in DevOps Cloud (ADM)

 

(This post was written by Yossi Neeman from the UFT R&D Team)

 

Cross Browser Testing with Mobile browsers

Mobile Apps are becoming more and more dominant in the world. In fact, 80 percent of Internet users own a Smartphone and use it to access the Internet (per mequoda.). Currently, (in a lot of cases) web pages act differently when viewing them on a desktop browser vs. on a mobile device browser. As a result, writing a responsive web app is a better choice for functionality, but more on this subject further in the blog. Hewlett Packard Enterprise Unified Functional Testing (UFT) exposes both working with a real mobile device using the Micro Focus Mobile Center for mobile testing, and working with a Chrome-emulated device for automated testing.

 

Try Unified Functional Testing to expand your test automation capabilities.

 

Think of the next scenario, let’s say you want to create a web test that will run on your device’s browser, however the device is not available. Furthermore you feel more comfortable creating the test on the local browser and then running it on the real device.

Chrome Emulator

UFT 12.51 patch1 introduces a Chrome Emulator option in the Record and Run settings.

After selecting the Chrome Emulator, the user can choose which device Chrome should emulate. For instance, in the example below the user selects iPhone 6 as the emulated device

 Now, when recording a session Chrome will start in the Chrome emulated state—emulating the selected device. The AUT will be shown in the Browser with the look and feel as it was on a real mobile device.

The recorded script will be a regular web script (not mobile specific) that can then be also replayed on the Chrome browser 

After running on the desktop Chrome and validating that the test runs as expected, the user can now replay the test on a real device. In the R&R setting, the user can change the settings to run on the Micro Focus Mobile Center lab (see below), he will then need to specify the needed browser and device

Running the same test on the real device will trigger the device in the MC lab and run it on the chosen browser

 

Responsive Design

Development in the past meant that web apps were implemented twice: once for the desktop browser and a second time for the mobile browser. Today modern apps are written in responsive design (A responsive app means that it will act the same whether it’s on a desktop browser or on a device browser). All main web frameworks are supporting writing web apps with responsive design—it truly is becoming an industry standard

When the web app is responsive, recording a script on the desktop browser can be run also on the device’s browser seamlessly, with no need to change the test.

Until UFT12.51, a web script created on the desktop browser could not run on a real device using Micro Focus Mobile Center. In UF12.51 patch1 UFT can run a regular web script also on the real device using Micro Focus Mobile Center.

The only change is in the record and run settings, as seen in above, the user just needs to choose running the script on Micro Focus Mobile Center and applying the needed device and browser.

Get more information on Unified Functional Testing at the product page here.

You can also experience UFT for yourself with a trial

Thanks to Yossi for writing this article!

Labels:

Functional Testing