Test Structure
yaml
goal: Description of what this test verifies
base_url: https://your-app.com
statements:
- URL: /starting-page
- intent: Step described in natural language
- intent: Another step
- VERIFY: Expected outcome
teardown:
- intent: Clean up step| Field | Required | Description |
|---|---|---|
goal | Yes | Test description (used as the Playwright test name) |
base_url | No | Base URL for the app under test. Can also be set via use: { baseURL } in playwright.config.ts |
statements | Yes | List of test steps |
teardown | No | Steps that always run after the test (like finally) |
For the kinds of steps that can appear in statements and teardown, see Statement Types.
Custom Test Name
Override the Playwright test name (defaults to goal):
yaml
name: Login with valid credentials
goal: Verify login flow works
base_url: https://example.com
statements:
- URL: /
- ...Tags
Add Playwright tags for filtering with --grep:
yaml
goal: Login test
base_url: https://example.com
tags:
- smoke
- auth
statements:
- URL: /
- ...Run: npx shiplight test --grep @smoke
Playwright Fixtures
Pass options to test.use():
yaml
goal: Mobile French layout
base_url: https://example.com
use:
viewport:
width: 375
height: 812
locale: fr-FR
statements:
- URL: /
- ...The use: block also configures the Shiplight Fixture: authentication, Chrome extension support, and the AI agent.