Writing autoreg.md
autoreg.md is the natural-language specification that AutoReg reads to understand your application and enumerate test scenarios. It is the single input the AI agent needs to generate a full test suite.
Where it lives
Place autoreg.md in your project folder — the same folder you select when creating a new AutoReg project. The agent reads it automatically during init_playwright_test_generation.
myproject/
├── autoreg.md ← your spec
├── myproject.ar ← manifest (auto-created)
├── tests/ ← generated test files
└── plans/ ← generated planWhat to include
Write autoreg.md as free-form Markdown. The agent parses it with an LLM, so natural language works — structure helps but is not required.
Recommended sections
1. App overview
Describe what the application does in 2–4 sentences. Include the target URL.
## App Overview
This is a B2B SaaS project management tool at https://app.example.com.
Users can create projects, assign tasks, track progress, and generate reports.
There are three roles: Admin, Manager, and Viewer.2. Authentication
Include test credentials the agent can use. The agent fills these into login forms.
## Test Credentials
- Admin: admin@example.com / Admin1234!
- Manager: manager@example.com / Manager1234!
- Viewer: viewer@example.com / Viewer1234!3. Features to test
List each feature area. The agent enumerates scenarios from this list.
## Features
### Authentication
- Login with valid credentials (each role)
- Login with invalid password — expect error message
- Login with unknown email — expect error message
- Logout
### Projects
- Create a new project (Admin only)
- Edit project name and description
- Delete project — confirm modal appears
- View project list — sorting and pagination
### Tasks
- Create task with title, assignee, due date
- Mark task complete
- Filter tasks by status
- Drag-and-drop reorder (if applicable)4. Negative / edge cases
Call out cases you want explicit negative tests for.
## Edge Cases
- Submit empty forms — verify field-level validation messages
- Access admin routes as Viewer — expect 403 or redirect
- Upload file exceeding size limit — expect error
- Session expiry — verify redirect to login5. Known UI patterns
Mention anything unusual the agent should know (custom components, modals, multi-step flows).
## UI Notes
- The "Create Project" button is inside a floating action button (FAB) at bottom-right.
- Confirmation modals always have a red "Confirm" button and a grey "Cancel" button.
- Date pickers use a custom component — the input field has aria-label "Due date".Tips
- More detail = better selectors. Describe ARIA labels, button text, and field names exactly as they appear in the UI.
- Include the base URL. The agent navigates to it and takes a DOM snapshot before generating each test.
- List both happy-path and failure scenarios. The agent generates both
positiveandnegativecategory tests. - You can paste
autoreg.mdduring project creation. The New Project dialog has a spec field — paste your spec there and it is saved to disk automatically.
Minimal example
# MyApp E2E Spec
App at https://myapp.example.com.
## Credentials
- User: user@test.com / password123
## Scenarios
- Login with valid credentials
- Login with wrong password — error shown
- View dashboard after login
- Logout and verify redirect to /loginEven a minimal spec like this gives the agent enough to generate 4–6 test scenarios with real selectors.