lecture 7 of 160 completed

One test, many datasets

Selenium has no built-in parameterisation, so this comes from your test runner. The pattern is the same, the mechanics differ by language.

What you'll learn

  • Why parameterisation comes from your test runner, not Selenium
  • How to generate one test per dataset
  • When a unit test is the better tool

A card validation suite can end up with eleven copies of the same test. Same steps, different card number. When the error message is reworded, that is eleven blocks to edit, and one will be missed.

Selenium itself has nothing to help here, because it is a browser control library and not a test runner. Parameterisation comes from whatever runner you chose, which is worth knowing before an interview.

In JavaScript with Mocha, a loop is all you need:

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 →