liveBook · Manning

User-interaction testing

As explained in BDD in Action, Second Edition

A UI test verifies software behavior through its user interface rather than through internal program interfaces.

User-interaction testing verifies software behavior through the user interface, reproducing end-user actions instead of calling internal program interfaces directly. It is especially useful for checking web interactions, end-to-end journeys, and behavior implemented only in the UI. section 10.0 section 10.1

Use UI tests selectively because they provide valuable evidence but carry execution and maintenance costs:

  • Use them to demonstrate features, document user journeys, and give stakeholders confidence through visible behavior. section 13.0 section 10.1
  • Prefer non-UI tests for business rules, calculations, and other behavior that can be checked through application code or a REST API. section 10.2
  • Limit browser-based coverage because slow execution, resource overhead, browser failures, and environment problems can weaken suite confidence. section 13.0 section 10.5
  • Improve reliability by adding meaningful element identifiers and waiting explicitly for asynchronous application states. section 10.5

A balanced acceptance strategy

Automate a user journey through a web application with Selenium WebDriver, capturing visible interactions as documentation, while checking calculations and business rules through non-UI tests. Add explicit or fluent waits when the interface updates asynchronously. section 10.0 section 10.2 section 10.5

Figure 10.1 A typical BDD project will have many more non-UI automated acceptance tests than UI ones.

Compare the typical balance of automated acceptance coverage: many non-UI tests support a smaller, targeted set of UI tests. section 10.2

How BDD in Action, Second Edition covers it

How deep it goes
Explains benefits, trade-offs, tool choices, testability hooks, and waits, while deferring most business-rule coverage to non-UI tests.
Examples
Uses browser-based user journeys, stakeholder demonstrations, screenshots, element identifiers, and explicit or fluent wait conditions.
What it assumes
Assumes layered acceptance testing and distinguishes business-flow concerns from technical UI implementation.
What you can do after
Apply UI acceptance testing through Selenium WebDriver while selecting faster non-UI tests for rules and calculations.
How it connects
Connects UI testing with acceptance testing, BDD, Selenium WebDriver, Cypress, business rules, REST APIs, and integration or unit tests.

Also explained in

Compare how 2 books explain user-interaction testing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of BDD in Action, Second Edition. The section links point to the parts of the book it draws on.