CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/playwright-testing

Playwright E2E testing patterns — web-first assertions, user-visible locators, network interception, fixtures, authentication, and parallel execution

98

1.81x
Quality

99%

Does it follow best practices?

Impact

98%

1.81x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-5/

{
  "context": "Tests whether the agent proactively applies Playwright best practices when writing E2E tests for a form-heavy page. The task does not mention locator strategy, assertion patterns, API mocking, or configuration best practices -- the agent should apply these on its own.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Web-first assertions",
      "description": "All element checks use expect(locator).toBeVisible(), .toHaveText(), .toContainText(), .toBeEnabled(), .toBeDisabled(). No page.$(), page.textContent(), or manual boolean checks.",
      "max_score": 14
    },
    {
      "name": "getByLabel for form fields",
      "description": "Form inputs are located using page.getByLabel() matching the visible label text (e.g., getByLabel('Full name'), getByLabel('Email address')) -- not CSS selectors like page.locator('input[name=email]') or page.locator('#email').",
      "max_score": 14
    },
    {
      "name": "getByRole for button and checkbox",
      "description": "The submit button is located with getByRole('button', { name: 'Create Account' }) and the checkbox with getByRole('checkbox') or getByLabel('I agree to the terms') -- not CSS selectors.",
      "max_score": 10
    },
    {
      "name": "No explicit waits",
      "description": "No page.waitForTimeout() or page.waitForSelector(). Uses web-first assertions and auto-waiting.",
      "max_score": 10
    },
    {
      "name": "API mocking for error case",
      "description": "At least one test uses page.route() to mock the registration API returning 409 (email exists) to test the error banner display, rather than relying on actual backend state.",
      "max_score": 12
    },
    {
      "name": "waitForResponse on form submit",
      "description": "The happy-path test uses page.waitForResponse() (set up BEFORE clicking submit) to verify the API call completes successfully, or uses page.waitForURL to verify redirect.",
      "max_score": 8
    },
    {
      "name": "Validation error tests",
      "description": "Tests cover at least two validation scenarios (e.g., empty required field, password mismatch, invalid email format) and assert that error messages are visible.",
      "max_score": 10
    },
    {
      "name": "test.describe and beforeEach",
      "description": "Tests are grouped in test.describe with test.beforeEach navigating to /register.",
      "max_score": 6
    },
    {
      "name": "webServer configured",
      "description": "playwright.config.ts includes webServer to auto-start the dev server.",
      "max_score": 8
    },
    {
      "name": "Screenshot and trace config",
      "description": "Config includes screenshot: 'only-on-failure' and trace: 'on-first-retry'.",
      "max_score": 8
    }
  ]
}

evals

tile.json