{"id":46311,"date":"2017-02-23T16:35:03","date_gmt":"2017-02-23T11:05:03","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=46311"},"modified":"2017-03-06T17:25:12","modified_gmt":"2017-03-06T11:55:12","slug":"the-what-and-how-of-gui-testing","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/the-what-and-how-of-gui-testing\/","title":{"rendered":"The What and How of GUI Testing"},"content":{"rendered":"<p>Graphical User Interface (GUI) is the most crucial part of any application which makes the application stand out from the million of similar apps. A well-designed interface allows the user to easily interact with the device and run tasks smoothly.\u00a0It also allows a user to interact with the technologies using images rather than text.<\/p>\n<p>Outlined blow are few elements that are used for interaction between a user and an application.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46312 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic1-300x154.png\" alt=\"pic1\" width=\"300\" height=\"154\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic1-300x154.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic1.png 325w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><br \/>\nValidating the above-mentioned elements is known as GUI Testing.<\/p>\n<p><strong>What is GUI Testing?<\/strong><\/p>\n<p><a title=\"Setting up SMTP Server with GUI for Testing purpose\" href=\"http:\/\/www.tothenew.com\/blog\/setting-up-smtp-server-with-gui-for-testing-purpose\/\">GUI Testing<\/a> is the process of testing the Graphical User Interface of the system\/application. It involves testing of screens with various types of controls like menus, buttons, icons, and different types of bars including toolbar, menu bar, dialog boxes etc.<br \/>\nIt is the actually the design which is visible to a user.For example, if you open<\/p>\n<p>For example, if you open <a href=\"http:\/\/tothenew.com\">www.tothenew.com<\/a>, the first thing that a user see is the homepage\/design. No user goes to check out the source code which runs at the backend. And as per user perspective, the focus is on the design structure, images, links, logo and whether if all of these are working well or not.All this brings the clarity on<\/p>\n<p>The <a title=\"6 UX Principles That Guide Product Design\" href=\"http:\/\/www.tothenew.com\/blog\/6-ux-principles-that-guide-product-design\/\">look and feel of the application<\/a> enable\u00a0the users to further navigate the website and interact with the other web pages. In today&#8217;s highly competitive world, GUI is a matter of concern and a thorough testing\u00a0is needed to make sure that the app is free of GUI bugs.<\/p>\n<p><strong>Key Consideration for GUI Testing<\/strong><\/p>\n<p>Some key considerations need\u00a0to be kept in mind while testing the application\/system for its effectiveness which includes visibility, accessibility, and compatibility.<\/p>\n<p>A proper checklist should be maintained for detailed GUI testing:<\/p>\n<ul>\n<li>The GUI elements &#8211; it is important to check for the size, position, width, length and acceptance of characters or numbers. For instance, a user must be able to provide inputs in the input fields etc.<\/li>\n<li>Error Messages \/ Warning Messages &#8211; check if the error message is correctly written and is understandable.<\/li>\n<li>Clear demarcation of different sections on the\u00a0screen.<\/li>\n<li>Font used in an\u00a0application is readable or not.<\/li>\n<li>If the alignment of a text or image is proper according to the web page.<\/li>\n<li>Font color is aesthetically pleasing.<\/li>\n<li>If the images are clear and visible and are not pixelated.<\/li>\n<li>If the positioning of GUI elements for different screen resolution.<\/li>\n<\/ul>\n<p><strong>GUI Testing Approaches:<\/strong><\/p>\n<p><em><strong>1. Manual Based Testing<\/strong>:<\/em><br \/>\nUnder this approach, the screens of the application are checked manually by testers. They are being confirmed with the requirements that are stated in the business requirements. The UI is also matched with the designs that are provided during the documentation phase of the application.<br \/>\nFor example, if a tester has to test the calculator app with this approach then, he will add 2 numbers manually on it and will view the UI of the app and look for the minute alignments, borders and other things in it.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46313 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic2-300x152.png\" alt=\"pic2\" width=\"300\" height=\"152\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic2-300x152.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic2.png 481w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong><em>2. Automation Based Testing:<\/em><\/strong><\/p>\n<p>The GUI testing can be performed even with the automation approach. This is performed in 2 steps i.e, record and play.<\/p>\n<p>While doing this, the steps are captured\/recorded with the help of the automation tool while performing the\u00a0first round of testing. And during playback, that recorded steps script is run when the application is under test.<br \/>\nIf the position of any button or image changes that during the playback, it does not get tracked and the test fails.<\/p>\n<p>One of the tool,\u00a0which is used to perform this record and playback feature is QTP.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-46314 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic3-300x125.png\" alt=\"pic3\" width=\"300\" height=\"125\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic3-300x125.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic3-624x261.png 624w, \/blog\/wp-ttn-blog\/uploads\/2017\/02\/pic3.png 628w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>Tools commonly used for GUI Testing:<\/strong><\/p>\n<ol>\n<li><strong>\u00a0UI Automator<\/strong><br \/>\nThis is a tool that helps in getting the actual location\/name and other information of any GUI element while writing an automation test script.<br \/>\nFor example, if u want to write an automation test script for sign up flow, then how will you identify in the test script about which text box has to be used for name, email, password and other elements.<br \/>\nIt is the UI automation tool that helps you to get the complete details of a particular text box, button, checkbox etc. Now all these properties of the elements will\u00a0help\u00a0you to identify the elements and complete your script.<\/li>\n<li><strong>Perfect Pixel<\/strong><br \/>\nThis is a sort of Plugin that matches the complete screens view with the designs provided.<br \/>\nFor example: When you open your webpage feel like there is some minute difference in the spacing, text size or placement of the blocks, then you can use this tool to help you get the result.<br \/>\nJust follow these steps:<br \/>\na) Open the tool\/plugin<br \/>\nb) Add the design image of the page you want to test.<br \/>\nc) The image will appear as an overlay on your webpage.<br \/>\nd) Now, you can manage the opacity of the design as per your choice with the help of scroll provided on the tool.<br \/>\ne) In order to collapse\/minimize the tool, just double click on the tool logo. And to hide the design overlay, click on the eye icon.<br \/>\nThis is the easiest tool to work upon if you don\u2019t have the knowledge of Photoshop for testing the pixels.<\/li>\n<li><strong>Toggle Device Toolbar<\/strong><br \/>\nThis toolbar is the one that every tester might have used. If not, then start using it. It is very useful and awesome tool in terms of its working.<br \/>\nSometimes, there is a situation when every screen size device is not available for testing, in that case, we have a browser functionality which manages the virtual view of the devices. When you inspect any element on your webpage on the browser, you will find a toggle device in the toolbar (left top corner in Chrome, right top corner in Firefox). Clicking on it will redirect your webpage to the default selected device screen view.<br \/>\nYou can add more virtual devices in this toggle as per your choice.<br \/>\n<strong>Note<\/strong>: It might give 100% accurate result for screen size and supplied user agent but for rendering engine (means the code, a\u00a0browser uses to interpret HTML\/CSS and create the UI), you will have to use the real device.<\/li>\n<\/ol>\n<p><strong>Challenges in GUI Testing<\/strong><\/p>\n<p>It is well known that during development and initial phases of application testing, the GUI changes very frequently. So during the regression testing, it becomes very difficult to test and identify if appearing GUI is an issue or an enhancement. And this problem can be overcome by keeping a proper track of the documents regarding any of the changes (minor or major) in GUI testing.<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>Quality of the application completely depends on the look and feel and its interaction ability with the user along with its feature. GUI Testing can be tedious but it is important for the success of the product\/application. Focusing on GUI testing will help an\u00a0organization to deliver high-quality application faster.<\/p>\n<p><em>Note:\u00a0(Image soource: <\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Graphical User Interface (GUI) is the most crucial part of any application which makes the application stand out from the million of similar apps. A well-designed interface allows the user to easily interact with the device and run tasks smoothly.\u00a0It also allows a user to interact with the technologies using images rather than text. Outlined [&hellip;]<\/p>\n","protected":false},"author":1065,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[1],"tags":[2732,3997],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46311"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1065"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=46311"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/46311\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=46311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=46311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=46311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}