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.

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 →