End-to-end tests and flaky testsProLesson 24 of 45, about 8 min
- 1
- 2
- 3
- 4
- 5
- 6
- 7
The app: Bench, a test runner
Benchharbor / e2ePlaywright, Chromium
harbor.test/signup
Create your Harbor account
Work emailPasswordCreate accountThe test database is reset before each run.
The test, the server log and the coverage
e2e/signup.spec.ts the testsleeps 2 s
1import { test, expect } from "@playwright/test";2 3test("a new team can sign up", async ({ page }) => {45 await page.goto("/signup");6 await page.getByLabel("Work email").fill(email);7 await page.getByLabel("Password").fill("correct-horse-42");8 await page.getByRole("button", { name: "Create account" }).click();91011});
Server log how long each sign-up tookno runs
Requests show here when the test runs.
The MagisterBench runs end-to-end tests too, with Playwright. This one drives a real browser through Harbor’s sign-up like a user: open the page, fill the form, press Create account, check the welcome page. Page, server and database all take part. Press Run, then tap the line that checks the result.
Step 1 of 7Run the sign-up test
- Run the test
- Tap the line that checks the result
You’re not signed in, so this lesson won’t be saved to your path. Sign in free to keep your XP.