GUI Testing: A Brief Note for Software Testers

gui testing

What is GUI Testing?

GUI Testing is a type of testing in which an applications’ Graphical User Interface (GUI) is tested to make sure it is in line with the expectations. GUI testing involves checking the objects on the UI (User Interface), which are the objects that we can see on the screen.

Anything the user sees in the system or application is a GUI. Let us consider that if you visit a website, then the homepage is the GUI (graphical user interface) of the site.

The source code will not be visible as the user can see only the UI interface. Mainly the focus of GUI testing is on the design pattern, images, alignment, spellings and the overall look and feel of the UI

What is the need for GUI Testing?

Now as you’ve understoodthe basic concept of GUI testing so the next question that you’ll have in your mind will be

  • Why do we need GUI testing?
  • How to create test cases for GUI testing?
  • How to do GUI testing?

To get the answer, you need to think as a user, not as a tester. It is the User Interface of theSoftware/Application that is a deciding factor to know whether a user is going to use the Application further or not.

The looks and designs of the Application/Software are what atypical user will first look at.

Secondly, he checks how easy it will be for him to understand and navigate through the UI. If the Software/Application is more complex and not appealing or if the user is not comfortable with the Interface design, then he is not going to use that Application again.

That’s the reason, GUI testing is a matter for concern and should be taken very seriously. Also, proper testing should be carried out in order to make sure that GUI is free from any issues.

Examples of UI Test Cases

UI Testing mostly involves the checking the various elements on the screen for their look and feel, the test cases should be written in such a way that they validate the following points for each of the UI objects.

  • Size, position, width, and height of the objects with reference to other objects on the screen
  • Error messages displayed on the screen, the color and font of the error message. Errors are normally in Red color.
  • Readable and inconsistent across the application unless specified by the client.
  • Checking the same screen in different resolution with the help of zooming in and zooming out like 640 x 480, 600×800, etc. Also if there is a requirement you may want to check it in a mobile browser as well.
  • Font colors, hyperlink colors, error/warning message colors, etc.
  • Quality of the images on the screen, if applicable.
  • Spellings, grammar, and punctuations.
  • Scrollbars according to the size of the page if any.
  • Checking disabled fields if any.
  • Checking the size of the images.

The overall idea is to make the screens appealing to the user and having a good alignment and font. Many a times you may need to think out of box and stray away from the test cases and do exploratory testing with respect to the UI

GUI Testing Approaches:

1. Manual Based Testing:

This is the most widely used method for GUI testing. In this method the tester, checks the application manually by looking at the screen, navigating through the application and by using his own judgement as well.

While checking the application he will not only validated the test cases but also make suggestions to improve the UI to make it better.

This can be quite a time consuming and the quality of the testing done would depend on the knowledge and capabilities of the tester.

2. Automation Based Testing:

Though for the most part, the GUI testing needs to be done manually, there are some portions which can be automated as well.

The test cases which involve navigations, data entry or any other manual action apart from just seeing can be automated. There are a number of tools like TestComplete, Squish, AutoIT, Silk Test etc.

which can be used for this purpose. These tools are used to replicate the user actions by recording it and then playing it back each time the testing is needed. These tools involve some amount of technical scripting knowledge as well.

alt

Challenges in GUI Testing

As simple as it may sound, there are some challenges also:

  • The list of GUI test cases can be very exhaustive and time-consuming
  • It requires a lot of manual effort and the quality of the testing would depend on the skills of the tester.
  • Number of automation tools available is very limited
  • GUI is usually unstable during the initial development phases, so GUI testing is postponed to the end of the testing cycle, which sometimes creates a time crunch
  • GUI issues are given less priority when compared to functional issues

Conclusion:

The success of a software product hugely depends on how easy the GUI is to use and how it interacts with the end user. That’s basically is the reason why GUI testing is very important and should be carried out in a proper way. It is also very important that while testing the GUI we should always think from the perspective of the user.