lecture 12 of 170 completed

API and UI together: designing the boundary

Arrange through the API, assert through the screen. Getting this boundary right is the largest speed win available.

What you'll learn

  • Where the boundary between API and UI belongs
  • Why setup failures must be loud
  • Which mistakes hollow out a hybrid suite

A delete test that creates its contact through the form takes eight seconds and can fail for reasons that have nothing to do with deleting. The same test, arranging through the API, takes under a second and only fails when deletion is broken.

Multiply by a suite and this is usually the single largest speed win available. It is also a design decision that goes wrong in a specific way, so it needs a rule.

The rule: arrange through the API, act and assert through the UI.

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →