TechPro
Office address BhauAutomation VTP Cygnus Pune bhauautomationlab@gmail.com

UI Testing

What is UI Testing?

UI Testing (User Interface Testing) is the process of checking whether the visible part of an application works correctly and looks as expected from the user’s point of view.

In simple words, UI Testing checks everything a user sees and interacts with, such as buttons, text boxes, menus, links, forms, images, pop-ups, and page navigation.

Simple Example

For a login page, UI Testing checks:

Username field → Password field → Login button → Error message → Dashboard

We verify that the elements are visible, usable, correctly placed, and perform the expected action.

Why is UI Testing Important?

UI is the main point where users interact with an application.

UI Testing helps us make sure that:

  • Buttons work correctly
  • Forms accept the right data
  • Links open the correct pages
  • Text and messages are displayed correctly
  • Menus and navigation work properly
  • Error messages appear when needed
  • Pages look correct on different screen sizes
  • The application provides a smooth user experience

UI Testing – Types

  1. Functional UI Testing — Checks whether UI features work correctly.
  2. Usability Testing — Checks whether the application is easy to use.
  3. Visual Testing — Checks layout, design, fonts, and appearance.
  4. Responsive Testing — Checks UI on different screen sizes.
  5. Cross-Browser Testing — Checks UI on different browsers.
  6. Accessibility Testing — Checks whether the UI is accessible to all users.
  7. UI Regression Testing — Ensures existing UI features still work after changes.
  8. Negative UI Testing — Checks how UI handles invalid or unexpected input.
  9. Validation Testing — Checks input fields and validation messages.
  10. End-to-End UI Testing — Tests the complete user journey from start to finish.
 

UI Testing – Interview Questions & Answers

1. What is UI Testing?

Answer: UI Testing checks whether the application’s user interface works correctly and provides the expected user experience.

2. What do you test in UI Testing?

Answer: We test buttons, text fields, links, forms, menus, dropdowns, pop-ups, navigation, messages, images, and page layouts.

3. What are the main types of UI Testing?

Answer: Functional, Usability, Visual, Responsive, Cross-Browser, Accessibility, Regression, Negative, Validation, and End-to-End Testing.

4. What is Functional UI Testing?

Answer: It checks whether UI elements perform their expected functions. For example, clicking Login should open the Dashboard.

5. What is Visual Testing?

Answer: It checks the visual appearance of the application, such as layout, alignment, fonts, spacing, and images.

6. What is Responsive UI Testing?

Answer: It checks whether the application looks and works properly on desktop, tablet, and mobile screen sizes.

7. What is Cross-Browser Testing?

Answer: It verifies that the application works correctly on different browsers such as Chrome, Firefox, Edge, and Safari.

8. What is UI Regression Testing?

Answer: It checks that existing UI functionality still works after new changes are added.

9. What is Negative UI Testing?

Answer: It checks how the application behaves when users enter invalid, incorrect, or unexpected data.

10. Can UI Testing be automated?

Answer: Yes. Tools like Playwright, Selenium, Cypress, and WebdriverIO can be used for UI automation.

11. What is a Locator?

Answer: A locator is used by automation tools to identify and interact with elements on a webpage, such as buttons, text fields, and links.

12. What is a flaky UI test?

Answer: A flaky test is one that sometimes passes and sometimes fails without any relevant application change.

13. What is the difference between UI Testing and API Testing?

Answer: UI Testing checks the application through the user interface, while API Testing checks requests, responses, data, and communication between services.

14. What is Accessibility Testing?

Answer: It checks whether the application can be used effectively by people with different accessibility needs.

15. Give a real-time example of UI Testing.

Answer: In an e-commerce application:

Login → Search Product → Add to Cart → Checkout → Payment → Order Confirmation

We verify that every step works correctly.