Skip to content

Running Tests

Commands

CommandDescription
pnpm testRun all tests headless (all browsers)
pnpm test:headedRun with a visible browser window
pnpm test:uiPlaywright interactive UI mode
pnpm test:debugDebug mode with Playwright inspector
pnpm test:tag <name> [name...]Run tests for one or more tags
pnpm test:tagList all available tags

Filtering Tests

Filter tests by pattern, file, or browser:

bash
pnpm test -- --grep "dashboard"
pnpm test -- src/tests/smoke/app-loads.spec.ts
pnpm test -- --project=chromium
pnpm test -- --project=firefox
pnpm test -- --project=webkit

Test Groups

Tests are tagged by feature area using Playwright's tag API. Tags are defined as typed constants in src/tags.ts — each tag has a value and a description. Run pnpm test:tag with no arguments to list all available tags.

Tests can belong to multiple groups. Combine groups with OR logic:

bash
pnpm test:tag smoke model-browser
pnpm test -- --grep "@smoke|@model-browser"

Exclude a group:

bash
pnpm test -- --grep-invert @smoke

Tags are displayed in the Playwright and Allure reports and can be used to filter results.

To add a new group, add a constant to src/tags.ts and apply it to test files via the tag option on test.describe().

Code Quality

CommandDescription
pnpm lintRun ESLint
pnpm lint:fixRun ESLint with auto-fix
pnpm formatFormat all files with Prettier
pnpm format:checkCheck formatting without changing

ESLint is configured with TypeScript and Playwright-specific rules. Prettier handles all formatting. See eslint.config.js and .prettierrc for details.

Reports

After a test run:

bash
pnpm report                # Open Playwright HTML report
pnpm allure:generate       # Generate Allure report from results
pnpm allure:serve          # Serve Allure report with live reload
pnpm allure:open           # Open a generated Allure report

The latest reports from main are published to GitHub Pages:

UI test suite for halOP — the WildFly management console