lecture 9 of 160 completed

Checks that actually catch bugs

A weak assertion passes on a broken app. Here are the three weak ones you will write without noticing.

What you'll learn

  • The three weak assertions that pass on a broken app
  • How to assert the value a user depends on
  • How to name the bug a check would catch

Selenium does not give you assertions. You bring your own library, and you decide what to check. That freedom means you can write a test that passes on a completely broken app without realising it.

Here are the three weak checks that show up most often in code review.

Weak check 1: you check something exists, not what it says.

full course

Keep reading with the full course

The Foundations track and the first lessons in each framework are free. This lesson needs full course access. A course plan includes all lessons for Playwright, Cypress and Selenium.

See course plans →