QA
Senior~90 minFramework designConfigPage ObjectsFixturesTest dataCI

Build the Sauce Demo framework from scratch

Site: https://www.saucedemo.com, the real saucedemo.com, the public Sauce Labs demo store. Runs on GitHub Actions in your repo. Login: standard_user, locked_out_user, problem_user, performance_glitch_user / secret_sauce.

Interview scenario

"Here is an empty folder and Sauce Demo. Set up the automation framework you would put in front of a client: Playwright config, page objects, fixtures, test data, a couple of production-grade tests, and a README. Treat it like a real repo, not an exercise. This is the real saucedemo.com. Your config must work on CI, not only on your laptop."

What the framework must have

  1. playwright.config.ts you write yourself: testDir, baseURL from an environment variable with a default, retries, reporter, trace/screenshot on failure.
  2. pages/ with at least two page objects; fixtures.ts that extends test (for example a logged-in page or a ready page object).
  3. tests/ with at least two spec files and four tests in total, using only fixtures and page objects, grouped with test.describe or tagged @smoke/@regression.
  4. data/ or utils/ for test data and helpers; a README that says how to install and run.
  5. Everything green: in the browser for the practice apps, and on GitHub Actions with your own config for every app.
README.mdPlaywright · TypeScript

Runs with real Playwright on GitHub Actions in your own repo: the files are committed, the Lab run workflow starts with BASE_URL=https://www.saucedemo.com and your own playwright.config.ts, and the results come back here. Saved in this browser. Ctrl/⌘ + Enter runs.

Real-site labs run on GitHub Actions in a repo created in your name. Sign in to run.Sign in with GitHub

Sauce Demo

Real site · runs on GitHub ActionsOpen the site ↗

https://www.saucedemo.com can't be embedded here, so your code runs with real Playwright and Chromium on a GitHub Actions runner in your repo. Explore the site in a new tab while you write the test. Login: standard_user, locked_out_user, problem_user, performance_glitch_user / secret_sauce.

  1. 1. Commit

    Your files go to labs/workspace-saucedemo/ in your repo.

  2. 2. Run

    The Lab run workflow installs Playwright and runs your spec against the real site.

  3. 3. Verify

    Results, assertion steps and the HTML report come back; the checks grade your code.

Test output

Press Run on GitHub to commit your code and run it against the real site. Results appear here in a few minutes.

Reference solution

Try it yourself first. Then compare with the Playwright solution and the same framework in Selenium Java with TestNG.