- How to generate tests
- The required test morphology
- How to edit any test field and validate changes
- How to delete tests
Prerequisites
- Bugster CLI installed and authenticated.
- Run commands from your repo root (same folder containing
/.bugster/
). - Your app runs locally (if you plan to validate with
bugster run
).
1. Generate tests (3 ways)
Bugster supports three creation modes:If you want to… | Use | Why |
---|---|---|
Seed broad coverage fast | Automatic bugster generate | Highest coverage per minute |
Generate targeted scenarios | bugster generate --prompt | AI-guided generation with custom focus |
Capture a very specific scenario | Manual YAML | Full control over task/steps/expected_result |
Write/refine with an AI editor | Assisted (Claude Code/Cursor) | Faster authoring, inline edits |
1.1 Automatic (bulk) — bugster generate
Bugster can propose and create many tests across your app or for specific pages.
Commands:
- Pros: fast, broad initial coverage, zero overhead, customizable with
--prompt
for targeted scenarios. - Cons: if you need a very specific use case, it might not appear on the first pass (complement with a manual test or use
--prompt
for guidance).
1.2 Manual (YAML template)
For precise scenarios, create your own test explicitly. Requirements:- Content: follow the YAML morphology (see next section).
- File: place it under the Bugster tests folder, mirroring your app’s filesystem hierarchy.
page
= route (e.g., /dashboard/users
)page_path
= source file path (e.g., app/dashboard/users/page.tsx
)1.3 Assisted (Claude Code / Cursor)
Use AI coding assistants like Cursor or Claude to generate Bugster-compliant test specifications with intelligent guidance. Advantages:- AI-powered: Intelligent test scenario generation
- Compliant: Follows Bugster YAML structure when properly configured
- Fast: Quicker than manual YAML writing
- Guided: Built-in best practices and validation
See the Cursor Integration guide for complete setup instructions and usage patterns.
2. Test morphology in Bugster
Definition: the minimal structure Bugster expects in a test.
Test quality checklist:
- One clear task per test (avoid multi-goals).
- Steps are actionable (verbs first) and ordered.
expected_result
is observable (URL change, element visible, text equals).
expected_result
:
3. Editing an existing test
You can edit any Bugster-generated (or user-created) test, as long as you keep the YAML morphology (name
, page
, page_path
, task
, steps
, expected_result
).
- Rename the test for team clarity.
- Adjust the task to be more precise.
- Add/remove steps to better guide the agent.
- Update the expected_result if the verification changes.
- Old
- New
Recommendation: run the test again to confirm the changes are honored:
4. Deleting tests
You can delete any test with no restrictions:- Single file: remove the test file.
- Batch: delete a folder under
.bugster/tests/...
to remove all tests beneath it.
This does not disrupt Bugster’s functionality or your workflows.
5. File location and naming conventions
- Bugster tests folder:
/.bugster/tests/
- Hierarchy: mirror your app structure (based on
page_path
).
page_path: app/dashboard/users/page.tsx
, the recommended location is:
- use snake_case, lowercase, descriptive.
-
If
name: Navigation back to home from about page
, the recommended file name is: