UI testing
UI testing, also called GUI testing, is testing a software product through its user interface: clicking, typing and reading the screen the way a user does, then checking that each control behaves as specified and that the page looks as designed. A person or a script driving a real browser can run it, and it sits at the top of the test pyramid.
The longer version
UI testing asks two kinds of question of the same screen. The first is about behaviour: the button submits the form, the field rejects an invalid postcode with the right message, the menu opens and closes, the link goes where it says. That half is functional testing carried out through the interface, and a 2005 SmartBear post on unit and UI testing uses that phrase for it: functional testing via the user interface. The second is about appearance: the layout, spacing, type and colour match the approved design, each control shows its hover, focus and disabled states, and nothing overlaps, overflows or disappears at a narrow width. A failure of the second kind is a visual bug, where the function works and what the user sees is wrong. GUI testing, short for graphical user interface testing, is the older name for the same practice, from the days of desktop software, and the two are used interchangeably. Usability testing is a different practice: it watches real people try to reach their goals, and a screen can pass every UI test and still confuse them.
A UI test can be run by a person or by a script. A manual pass works through the screens from test cases or an exploratory charter, and it is the only way to judge a screen nobody has seen before. An automated pass drives a real browser. Playwright's documentation describes Playwright Test as an end-to-end test framework for modern web apps, running on the Chromium, WebKit and Firefox engines. Cypress's documentation says it can test anything that runs in a browser, with end-to-end tests and component tests, in Firefox and Chrome-family browsers including Edge. Selenium's describes WebDriver as driving a browser natively, as a user would, and notes that WebDriver is a W3C Recommendation. All three assert on the document: an element exists, holds this text, is enabled or checked. For appearance they compare pictures. Playwright Test, for example, captures a screenshot and compares it with a stored one through toHaveScreenshot, which is visual regression testing with its approved baseline, and its documentation warns that screenshots differ between browsers and platforms because of rendering, fonts and more.
In an automated suite, UI tests are the top of the test pyramid: the slowest tests, dependent on every layer beneath them and the first to break when the markup changes. Mike Cohn, who described the pyramid in Succeeding with Agile, calls testing everything through the user interface brittle, expensive and time consuming in his post The Forgotten Layer of the Test Automation Pyramid, and the usual advice follows from it. A business rule, such as how a discount is calculated, is checked in a unit test, and the UI test proves only that a person can apply the discount and see the new total. The flaky UI test has familiar causes: selectors tied to markup that changes with each redesign, waits that assume a speed the build server does not have, and test data shared between runs. A suite made mostly of UI tests is the inverted shape the pyramid entry calls the ice-cream cone.
Automation checks what it was told to check. A suite can pass on a page where the submit button sits under a cookie banner on a narrow phone, where grey text on a pale background is hard to read, or where an error message is accurate and means nothing to a customer, because no assertion asked. Screenshot comparison catches change only against an approved image, on the pages, states and viewports somebody captured, and it cannot judge whether a new screen is right. Keyboard operation, a visible focus indicator and screen reader output are checked partly by tools and finished by a person. So a manual pass on real browsers and devices stays part of UI testing however large the suite grows, and its findings are useful only when they arrive with their evidence: the page, an annotated screenshot, the browser and the viewport where the problem appeared. A finding that keeps coming back is then pinned by an automated test at the lowest level that would have caught it.
Common questions
What is UI testing in simple terms?
UI testing means checking a product through the screens its users see. A tester, or a script, clicks the buttons, fills in the fields and reads the result, then compares what happens and what appears with what the requirements and the design say. A control that does the wrong thing and a layout that breaks are both UI testing failures.
What is the difference between UI testing and GUI testing?
Both names describe testing a product through its graphical interface, and most teams treat them as one practice. GUI testing, for graphical user interface testing, is the older term, from desktop software with windows, menus and dialogs. UI testing is the name more often used for websites and web apps today.
What is automated UI testing?
Automated UI testing is a script that drives a real browser or app the way a user would, by clicking, typing and navigating, and then checks the result. Playwright, Cypress and Selenium are widely used frameworks for the web. The script runs on every build and catches regressions in flows that worked before, while new screens still need a person to judge them.
What is the difference between UI testing and unit testing?
A unit test calls one function or component directly, runs in milliseconds and fails at the code that broke. A UI test drives the whole product through its interface, takes seconds or minutes, and fails when the journey breaks anywhere along it. The test pyramid keeps many unit tests and few UI tests, and each check is written at the lowest level that can prove it.
What is the difference between UI testing and visual regression testing?
Visual regression testing is one technique inside UI testing. It compares screenshots of a page with an approved baseline and flags the pixels that changed. UI testing is wider: it also checks that controls behave correctly, and a manual pass judges screens for which no baseline exists yet.
Is UI testing the same as usability testing?
Usability testing watches real people try to complete tasks and asks whether the interface helps them. UI testing checks the interface against its requirements and its design. A screen can pass every UI test and still confuse the people using it, so a product usually needs both.
Can UI testing be fully automated?
Automation covers the checks that repeat, such as a sign-in or a checkout that has to keep working on every build. Whether a new design is right, whether text is readable on a real phone and whether an error message makes sense are judged by a person, so manual UI testing stays alongside the automated suite.
Bug reports that arrive ready to triage.
Collect replay, console, network and browser context with the Free plan.