lecture 10 of 150 completed

The same suite against local, staging and production

One suite has to run in several places without edits. The trick is making tests know nothing about where they are.

What you'll learn

  • How one suite runs against several environments
  • Where configuration belongs, and where secrets belong
  • Why a test must not know where it is running

Some teams end up with three copies of their test suite, one per environment. They drift apart over a year. A bug fix lands in the staging copy and never reaches the production one, and nobody notices until the same bug ships twice.

One suite, many environments, is the only version of this that survives.

The base of it you already know: baseUrl in config, overridden at run time.

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 →