Skip to main content
Transform Cursor into a Bugster expert that can both generate comprehensive test specifications and automatically validate your UI changes as you build.

Three Cursor Use Cases for Bugster

Bugster provides three specialized Cursor rules to enhance your development workflow:
RuleWhen to UseActivationPurpose
Test GenerationBuilding test suitesManual (@bugster-generate)Create comprehensive test specifications
Test UpdateMaintaining testsManual (@bugster-update)Update existing tests after code changes
Quick ValidationAfter UI changesAutomatic (on file save)Validate implementation meets requirements

Using Cursor with Bugster

Cursor rules provide persistent context about your Bugster project, ensuring consistent test generation and automatic validation that follows your standards and best practices.
  • Project rules are stored in your repository and shared with your team.
  • User rules apply to your personal Cursor environment.
We recommend creating project rules for your Bugster project so that all contributors generate tests following the same standards. Create rules files in the .cursor/rules directory of your project. See the Cursor Rules documentation for complete setup instructions.

Test Generation Rule

This rule provides Cursor with context to properly generate Bugster test specifications following the required YAML structure and best practices.

Installation

Install the official test generation rule using the Bugster CLI:
bugster plugin --agent cursor
This installs bugster-generate.mdc in your .cursor/rules/ directory.
View the official rule: Cursor Test Generation Rule

How to Use

Reference the rule in your Cursor chat to activate it:
@bugster-generate Create a test for the user login page

What It Does

  • Generates comprehensive test specifications in proper YAML format
  • Follows Bugster naming conventions and file structure
  • Creates tests in .bugster/tests/ with correct hierarchy
  • Validates all required fields are present
  • Limits generation to avoid test duplication
The rule automatically checks existing tests to avoid duplicates and follows your project’s file structure conventions.

Test Update Rule

This rule helps you update existing test specifications when your code changes or requirements evolve.

Installation

Install the official test update rule using the Bugster CLI:
bugster plugin --agent cursor
This installs bugster-update.mdc in your .cursor/rules/ directory.
View the official rule: Cursor Test Update Rule

How to Use

Reference the rule in your Cursor chat to activate it:
@bugster-update Update tests for the authentication flow based on recent changes

What It Does

  • Updates existing test specifications to match code changes
  • Maintains test structure while adapting to new requirements
  • Preserves test intent while updating implementation details
  • Ensures tests stay synchronized with your codebase
  • Follows the same YAML standards as test generation
Use this rule after refactoring components or updating user flows to keep your test suite current without starting from scratch.

Quick Test Rule

This rule automatically validates your UI changes by running a comprehensive E2E test after you modify components or pages. It helps ensure your implementation meets user requirements.
File name suggestion: bugster-quick-test.mdc
E2E tests are slow (30-300 seconds). This rule is designed to run sparingly - only as final verification after code changes.
Add this rule as a .mdc file in the .cursor/rules directory of your project:
---
alwaysApply: true
description: Auto-validate UI changes with quick test after modifying components or pages
globs:
  - "**/*.tsx"
  - "**/*.jsx" 
  - "**/page.tsx"
  - "**/page.jsx"
---
# Bugster Quick Test Rules

## Context
Bugster is an E2E testing agent that executes UI tests in browsers. Tests are slow (30-300 seconds), so use sparingly.

## Use Case
**Validate from the UI that generated code respects user requirements** - use as final verification step after code generation.

## Auto-Trigger Behavior
**This rule should AUTOMATICALLY activate when:**
- Creating new UI components
- Modifying existing React components  
- Implementing user-facing features
- Making changes to pages or layouts

## When to Use
- **Only once at the end** of code generation process
- At the end of every change in the UI
- After implementing features that affect UI behavior
- To verify multiple aspects in a single comprehensive test
- **Never abuse** - execution takes up to 5 minutes

## Command Format
Always use these flags:

```bash
bugster run --prompt "{comprehensive validation description}" --silent --headless --output quick_validation.json
```

Add `--base-url http://localhost:PORT` if you opened the app in a new terminal.

## Prompt Guidelines
- **Be comprehensive** - validate multiple points in one test since you only get one shot
- Focus on core functionality the user requested
- Include key user flows and expected behaviors
- Mention specific UI elements or interactions to verify

## Example
```bash
bugster run --prompt "Test the new user registration form - verify all fields accept input, form submits successfully, validation works for empty fields, and user gets redirected to dashboard after signup" --silent --headless --base-url http://localhost:3000 --output quick_validation.json
```

## Rules
- **Maximum 1 execution per code generation session**
- Always include `--silent --headless --output quick_validation.json`
- Pack multiple validations into single comprehensive prompt
- Use only as final verification step

Combining All Rules

For optimal workflow, use all three rules together:
1

Setup

Install the official rules and add the quick test rule to your .cursor/rules directory:
bugster plugin --agent cursor
Then add bugster-quick-test.mdc (see Quick Test Rule section above) for auto-validation.
2

Development Flow

  1. Build your feature as requested
  2. Quick Test rule automatically validates the implementation
  3. Use Test Generation rule to create comprehensive test suites
  4. Use Test Update rule when refactoring or updating features
3

Team Consistency

All three rules ensure team members follow the same Bugster standards and validation processes.
The plugin command installs both generation and update rules automatically. Add the quick validation rule manually for auto-testing after code changes.