Two Cursor Use Cases for Bugster
Bugster provides two specialized Cursor rules to enhance your development workflow:Test Generation
Manual activation - Generate comprehensive test specifications following Bugster’s YAML structure and best practices.
Quick Validation
Auto-activation - Automatically validate UI changes after modifying components or pages with a final E2E test.
Rule | When to Use | Activation | Purpose |
---|---|---|---|
Test Generation | Building test suites | Manual (@bugster-test-rules ) | Create comprehensive test specifications |
Quick Validation | After UI changes | Automatic (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.
.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.File name suggestion:
bugster-test-generation.mdc
.mdc
file in the .cursor/rules
directory of your project:
How to Use the Rule
This rule is set to
alwaysApply: false
, meaning it only activates when explicitly tagged in your Cursor chat.Manual Activation
To use the Bugster test generation rule, mention it explicitly in your Cursor chat:Best Practices
Explicit Requests
Always tag the rule when you want Bugster-compliant test generation.
Check Existing Tests
Review
.bugster/tests/
before generating new tests to avoid duplicates.Quality Focus
Request comprehensive tests rather than many simple ones.
File Structure
Ensure generated tests follow your app’s hierarchy in
.bugster/tests/
.Example Generated Test
When using the rule, Cursor will generate tests following this structure:Rule Customization
You can customize the rule for your specific project needs:- Framework-Specific
- Monorepo Structure
- Test Limits
Modify the
page_path
examples to match your framework:- Next.js App Router:
app/route/page.tsx
- Next.js Pages Router:
pages/route.tsx
- React Router:
src/pages/route.tsx
Troubleshooting
Rule not activating
Rule not activating
- Ensure you’re tagging the rule with
@bugster-test-rules
- Check that the rule file is saved in
.cursor/rules/
- Verify the rule has the correct
.mdc
extension
Wrong file paths generated
Wrong file paths generated
- Review your project structure and update the rule examples
- Ensure
page_path
examples match your framework conventions - Check that generated paths are relative, not absolute
Too many tests generated
Too many tests generated
- The rule limits to 5 tests by default
- Be more specific in your request to generate fewer tests
- Review existing tests before requesting new ones
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.
.mdc
file in the .cursor/rules
directory of your project:
Combining Both Rules
For optimal workflow, use both rules together:1
Setup
Add both rule files to your
.cursor/rules
directory:bugster-test-generation.mdc
(manual activation)bugster-quick-test.mdc
(auto-activation)
2
Development Flow
- Build your feature as requested
- Quick Test rule automatically validates the implementation
- Use Test Generation rule when you need comprehensive test suites
3
Team Consistency
Both rules ensure all team members follow the same Bugster standards and validation processes.
Start with the default rules and customize them as you learn your team’s testing patterns and preferences. The rules help maintain consistency across all contributors to your Bugster project.