Software Testing
What is Grey Box Testing? Techniques, Example
Grey Box Testing Grey Box Testing or Gray box testing is a software testing technique to test a...
To understand GUI Testing lets first understand-
There are two types of interfaces for a computer application. Command Line Interface is where you type text and computer responds to that command. GUI stands for Graphical User Interface where you interact with the computer using images rather than text.
Following are the GUI elements which can be used for interaction between the user and application:
GUI Testing is a validation of the above elements.
GUI Testing is a software testing type that checks the Graphical User Interface of the Software. The purpose of Graphical User Interface (GUI) Testing is to ensure the functionalities of software application work as per specifications by checking screens and controls like menus, buttons, icons, etc.
GUI is what the user sees. Say if you visit guru99.com what you will see say homepage it is the GUI (graphical user interface) of the site. A user does not see the source code. The interface is visible to the user. Especially the focus is on the design structure, images that they are working properly or not.
In above example, if we have to do GUI testing we first check that the images should be completely visible in different browsers.
Also, the links are available, and the button should work when clicked.
Also, if the user resizes the screen, neither images nor content should shrink or crop or overlap.
In this tutorial, you will learn-
Now the basic concept of GUI testing is clear. The few questions that will strike in your mind will be
To get the answer to think as a user, not as a tester. A user doesn't have any knowledge about XYZ software/Application. It is the UI of the Application which decides that a user is going to use the Application further or not.
A normal User first observes the design and looks of the Application/Software and how easy it is for him to understand the UI. If a user is not comfortable with the Interface or find Application complex to understand he would never going to use that Application Again. That's why, GUI is a matter for concern, and proper testing should be carried out in order to make sure that GUI is free of Bugs.
The following checklist will ensure detailed GUI Testing in Software Testing.
GUI Testing Techniques can be categorized into three parts:
Manual Based Testing
Under this approach, graphical screens are checked manually by testers in conformance with the requirements stated in the business requirements document.
Record and Replay
GUI testing can be done using automation tools. This is done in 2 parts. During Record, test steps are captured by the automation tool. During playback, the recorded test steps are executed on the Application Under Test. Example of such tools - QTP.
Model Based Testing
A model is a graphical description of a system's behavior. It helps us to understand and predict the system behavior. Models help in a generation of efficient test cases using the system requirements. The following needs to be considered for this model based testing:
Some of the modeling techniques from which test cases can be derived:
Model based testing is an evolving technique for generating test cases from the requirements. Its main advantage, compared to above two methods, is that it can determine undesirable states that your GUI can attain.
Following are open source tools available to conduct automated UI Test.
Product | Licensed Under |
---|---|
AutoHotkey | GPL |
Selenium | Apache |
Sikuli | MIT |
Robot Framework | Apache |
Water | BSD |
Dojo Toolkit | BSD |
GUI Testing basically involves
Here we will use some sample test cases for the following screen.
Following below is the example of the Test cases, which consists of UI and Usability test scenarios.
TC 01- Verify that the text box with the label "Source Folder" is aligned properly.
TC 02 - Verify that the text box with the label "Package" is aligned properly.
TC 03 – Verify that label with the name "Browse" is a button which is located at the end of TextBox with the name "Source Folder."
TC 04 – Verify that label with the name "Browse" is a button which is located at the end of TextBox with the name "Package."
TC 05 – Verify that the text box with the label "Name" is aligned properly.
TC 06 – Verify that the label "Modifiers" consists of 4 radio buttons with the name public, default, private, protected.
TC 07 – Verify that the label "Modifiers" consists of 4 radio buttons which are aligned properly in a row.
TC 08 – Verify that the label "Superclass" under the label "Modifiers" consists of a dropdown which must be properly aligned.
TC 09 – Verify that the label "Superclass" consists of a button with the label "Browse" on it which must be properly aligned.
TC 10 – Verify that clicking on any radio button the default mouse pointer must be changed to the hand mouse pointer.
TC 11 – Verify that user must not be able to type in the dropdown of "Superclass."
TC 12 – Verify that there must be a proper error generated if something has been mistakenly chosen.
TC 13 - Verify that the error must be generated in the RED color wherever it is necessary.
TC 14 – Verify that proper labels must be used in the error messages.
TC 15 – Verify that the single radio buttons must be selected by default every time.
TC 16 – Verify that the TAB button must be work properly while jumping on another field next to previous.
TC 17 – Verify that all the pages must contain the proper title.
TC 18 – Verify that the page text must be properly aligned.
TC 19 – Verify that after updating any field a proper confirmation message must be displayed.
TC 20 - Verify that only 1 radio button must be selected and more than single checkboxes may be selected.
In Software Engineering, the most common problem while doing Regression Testing is that the application GUI changes frequently. It is very difficult to test and identify whether it is an issue or enhancement. The problem manifests when you don't have any documents regarding GUI changes.
Following is a list of popular GUI Testing Tools :
Click here to learn Selenium, QTP & Cucumber.
Conclusion:
The success of a software product immensely depends on how the GUI interacts with the user and ease in using its various features. Hence, GUI testing is very important. Manual GUI testing can sometimes be repetitive and boring and hence error-prone. Automation is highly recommended for GUI testing.
This article is made possible by the contributions of Swati Ghildiyal, Prateek Chandra and Guru99.
Grey Box Testing Grey Box Testing or Gray box testing is a software testing technique to test a...
1) Which protocols are supported by LoadRunner? As of LoadRunner 9.5 following protocols are...
{loadposition top-ads-automation-testing-tools} There are ad-infinitve cross browser test tools to...
What is Static Testing? Static Testing is a software testing technique which is used to check...
Soak Testing Soak Testing is a type of non functional testing that is used to measure performance of...
Reliability Testing Reliability Testing is a software testing process that checks whether the...