The Problem with GUI Testing

GUI Testing

Being in the software testing industry can afford you plenty of straightforward nuances that may seem alien to any newbies venturing in for the first time. Perhaps that’s the case for every industry but when software and application testing is concerned, it is common knowledge that testing backend code is a relatively easy task. Any QA technician can vouch for the fact that most times, you’re well-equipped with the understanding of the software, its quirks, and features. You then design scripts to make sure the features run as intended and proceed to run regression tests to ensure everything still works during each iteration of the update. Sounds familiar, right?

Graphical User Interfaces or GUIs on the other hand are notorious for being difficult to test using automation testing tools. The simple reason for this is down to the multitude of “moving parts” which bring in a lot of uncertainty. This makes the process of testing frontend code reliably, very difficult. A simple way to visualize this is by imagining how a screen would look on a developer’s computer and then compare it to a test computer. Problems arise when the test screen and the original screen have different dimensions, text sizes, and resolutions. Bitmaps too, almost never match in cases like these despite all human efforts in manual testing demonstrating otherwise.

Beyond Bitmap Comparisons

It was simpler in the past to compare bitmaps for GUI testing when all applications ran in full-screen mode and only two video adapters existed in the hardware industry. The situation is different today. With such a wide variety of devices at everyone’s disposal with innumerable combinations of hardware backing it up, trying to ensure you have all the baseline bitmaps accounted for is a near-impossible task. Think about all the multiple screen sizes and resolutions available from mobile devices, to laptops, tablets, TVs, and smart refrigerators. Not only that, but cross-platform and hybrid applications allow for software to be sized according to the consumer’s will and make browser compatibility a possibility too.

We can, however, break elements down into widgets if we choose to abstract the intention of GUIs. These widgets (or controls) are made up of panels, menus, text elements, input fields, scroll bars, checkboxes, etc. After this breakdown, widgets can then be specified in the order of view that they should be in for each application. But QA technicians find this a complicated task too and for good reason. This is because widgets have a Z-order which means that they can be stacked one on top of the other. But while complicated, it is a functional approach in relation to saving and comparing bitmaps.

Layout methods for GUIs can also highlight concrete locations and sizes for each element, or make use of a flow design methodology. This helps testers a lot by helping them know which was used during the design phase. This also helps you verify control coordinates and boundaries when you begin testing and for flow designs, you can also access control IDs.

There are a few things that testers need to keep in check when testing GUIs with controls. The first is to ensure that every widget appears for every possible user interaction. And there could be thousands of these! The next is to check whether each widget is correctly enabled or not for the corresponding input. This means ensuring the text, for instance, appears and isn’t cut off or blocked, or that any disabled controls are shown in grey text, among others. This process further capitulates when developing applications and software for the international market where multiple language support requires this process to be repeated each time.

The task further delves into realms of impossibility when GUIs need to be tested in desktop browsers, native device applications, and mobile browsers. Taking into account the few dozen popular devices available today and thousands of models available, it’s easy to see why this is an especially daunting task. This isn’t always the case though. In the rare instances where you have tight control over your app’s users, you won’t be required to test GUIs for all the devices available – just the one’s your users will be using.

Testing Tools

GUI testing can seem scary with manual testing, but a balance needs to be struck. The best QA technicians know that looking for the best tools to carry out the aforementioned processes can help them cut down on precious testing time. And luckily, there are options available that do just that.

Kualitee is one of the best bug management tools available today for GUI testing. It provides options for automation testing scripts through integration with Selenium in addition to its manual capabilities.. 

Selenium is another worthy addition to your arsenal of GUI testing tools. It can also run all the popular browsers available today and is W3C’s prime recommendation. It also includes Chrome and Firefox extensions to help record and playback tests within the browser. 

Appium is an open-source test automation framework that drives iOS, Android and Windows applications. It can be used with native, hybrid, and mobile web apps and uses the Selenium WebDriver protocol.

Crowdsourced Testing

A third and still useful alternative to GUI testing on multiple mobile devices is leveraging crowdsourced testing. Today, this part of the industry is growing with more companies joining the mix every month. The essential idea behind this is that the businesses offer a test platform and a pool of testers with diverse devices, languages, and locations; you provide the software and scenarios, and you generally pay per bug found.

Crowdsourced testing and internal testing are complementary, and together to offer you better coverage of your code. Crowdsourced testing is ideal for late-stage uses like beta and compatibility testing, whereas internal testing, with and without tools, is beneficial throughout the software lifecycle.

Overall, yes, it’s possible to check GUIs. It’s important to use a combination of the techniques we mentioned. Backend regression tests, manual tests, automated test, and crowdsourced testing are powerful methods of achieving accurate and reliable GUI testing outcomes.