# Changelog
Source: https://docs.bugster.dev/changelog
All notable changes to Bugster CLI
### Added
* **`bugster generate --prompt`** - Generate tests directly from natural language prompts without needing existing spec files
### Added
* **Optional `credential_id` field** to the Test model to enhance test configuration capabilities
### Changed
* **Default maximum concurrent tests** changed from 5 to 3 for better resource management
* **Added `--quick` option** to the prompt parameter in the `run` command
### Fixed
* **Simplified log visibility condition** in `should_show_detailed_logs` function for improved debugging experience
### Added
* **`bugster destructive --output` option** to save results to a JSON file, enabling easier integration with other tools and workflows
* **`bugster run --prompt` option** for creating quick, on-the-fly tests without pre-existing spec files
* **PowerShell installer script** for Bugster CLI on Windows
* **Windows installation instructions** to the documentation
### Changed
* **Enhanced PowerShell installer** to automatically check for and install Node.js and npm if missing
### Removed
* **Legacy CI workflow configuration file**
### Changed
* **`bugster config` command flags** now uses separate flags: `--bypass-protection-interactive` for guided setup and `--bypass-protection-secret` for direct secret input
### Added
* **Credentials validation** in `bugster init` - prevents empty username/password entries
* **Localhost reminder** in `bugster run` - warns users to ensure app is running before tests
* **CI/CD integration warning** in `bugster init` - clear instructions on which files to commit
* **Enhanced messaging system** with proper console message methods
### Changed
* **Improved URL prompt** in `bugster init` - clarifies localhost usage and CI/CD auto-changes
* **Better credentials explanation** - explains when authentication gateway credentials are needed
* **Config.yaml now includes commit reminder comment** for CI/CD integration
### Added
* **`bugster config` command** - Access and manipulate the data inside config.yaml to avoid human error
* `--bypass-protection` flag: Guides users on how to get the x-vercel-bypass-secret by redirecting them with the Deeplink
* **`bugster install` command** - Handle outside integrations with your Bugster account for users who don't want to switch context during setup
* `--github` flag: Redirects users to the Github App Installation Link
### Changed
* **Destructive Agent Limits** - Up to 4 as default, with future parametrization based on subscription tiers
* **Prioritization of UI crashers** instead of Form Destroyers (FD will run when all UI Crashers are ok)
### Added
* **`bugster auth` command** for setting up or cleaning existing API key
* **`--parallel` flag** for `bugster run` command (accepts both `--parallel` and `--max-concurrent`)
### Changed
* **Max test limit increased to 10**
### Changed
* **Added platform flags** to `bugster init` for faster setup
### Changed
* **Added flags** to `bugster init` for executing automatically
### Fixed
* **Patch update command**
### Changed
* **New architecture** for `bugster destructive` unblocking longer executions
### Added
* **Initial monorepo support**
* Works with most monorepo setups including basic Turborepo configurations
* Detects changes in individual apps within the monorepo
* Note: Currently does not track changes in shared packages (e.g., common components installed via pnpm in each app's node\_modules)
### Changed
* **`bugster generate` default settings** - Can be executed multiple times without adding `--force` explicitly
* **Improved test generation intelligence** - Both `bugster generate` and `bugster update` now analyze existing test specs context to avoid creating duplicate or similar tests
### Changed
* **Force chromium installation** on install script
* **Remove the question loop** on credentials during `bugster init`
### Changed
* **Enhanced `--page` flag** in `bugster generate` now accepts relative or absolute file paths instead of page folder names
* **Added validation** for the `--page` flag to ensure provided paths exist, are files, and have valid JavaScript/TypeScript extensions (`.js`, `.jsx`, `.ts`, `.tsx`)
### Added
* **`--stream-results`** as the default behaviour for `bugster run`
* **`--max-concurrent = 5`** as the default behaviour for `bugster run`
* **`--page` flag** for `bugster generate` for spec generation of specific pages
* **`--count` option** for `bugster generate` to control the number of test specs generated per page (min: 1, max: 30)
### Added
* **Vercel protection bypass** to `bugster destructive`
### Added
* **`run_id`** to `bugster destructive` for test run association
### Added
* **`bugster destructive`** - Our new agent for raising bugs
### Added
* **`preferences` section** to the configuration file
* **`always_run` option** to select up to 3 specs that will always run
### Changed
* **Improved `bugster generate` architecture** resulting in a 30% speed increase
### Added
* **Vercel-bypass-automation support** - You can now use the secret within Bugster config while keeping your branch protected
### Added
* **Enhanced `bugster generate`** specs generation capacity up to 20 specs for comprehensive coverage
### Changed
* **Improved specs generation algorithm** for better coverage and more realistic test scenarios
### Added
* **`bugster issues` command** to get failed runs with debugging context from recent executions
* **`bugster upgrade` command** to update CLI to the latest version directly from the command line
### Changed
* **Improved specs generation algorithm** for better coverage and more realistic test scenarios
### Fixed
* **Small bug** in the console message during `bugster init`
### Added
* **`--only-affected` flag** for `bugster run` to execute only specs affected by code changes
* **`--max-concurrent` flag** for `bugster run` supporting up to 5 parallel test executions
* **Component-level tracking** for `bugster update` command
* **GitHub integration** for running specs on Vercel preview deployments
* **Cross-platform installer scripts** for Windows, macOS, and Linux with automatic dependency management
### Changed
* **Enhanced `bugster update` command** now works at component granularity instead of file level
* **Improved parallel test execution** with better resource management
* **Optimized change detection algorithm** for more accurate affected test identification
* **Rich console output** with color-coded messages and progress indicators
* **Enhanced error handling** with detailed debugging information
### Fixed
* **Performance improvements** for large codebases with many components
* **Better handling** of component dependency tracking
* **Reduced false positives** in change detection
### Added
* **`bugster sync` command** to retrieve and manage test specs across different branches
* **`bugster auth` command** for secure API key management with GUI integration
* **`bugster update` command** to automatically update test specs when codebase changes
* **Project creation integration** with Bugster GUI dashboard for execution tracking
* **Branch-based specs synchronization**
### Changed
* **Enhanced `bugster init` command** now creates projects in the GUI dashboard
### Fixed
* **Authentication improvements**
* **Project initialization reliability**
* **Cross-branch synchronization edge cases**
### Added
* **Initial CLI commands**: `bugster init`, `bugster generate`, and `bugster run`
* **Next.js application support** with automatic framework detection
* **Test specs generation** (up to 5 test specs per application)
* **Basic test execution engine** with browser automation
* **Project configuration system** with YAML-based config files
* **Core specs format and parsing capabilities**
[Unreleased]: https://github.com/Bugsterapp/bugster-cli/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.13...v0.5.0
[0.4.13]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.12...v0.4.13
[0.4.12]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.2...v0.4.12
[0.4.2]: https://github.com/Bugsterapp/bugster-cli/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.30...v0.4.1
[0.3.30]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.26...v0.3.30
[0.3.26]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.25...v0.3.26
[0.3.25]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.24...v0.3.25
[0.3.24]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.23...v0.3.24
[0.3.23]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.22...v0.3.23
[0.3.22]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.21...v0.3.22
[0.3.21]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.20...v0.3.21
[0.3.20]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.19...v0.3.20
[0.3.19]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.15...v0.3.19
[0.3.15]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.14...v0.3.15
[0.3.14]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.13...v0.3.14
[0.3.13]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.12...v0.3.13
[0.3.12]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.11...v0.3.12
[0.3.11]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.10...v0.3.11
[0.3.10]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.9...v0.3.10
[0.3.9]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.7...v0.3.9
[0.3.7]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.6...v0.3.7
[0.3.6]: https://github.com/Bugsterapp/bugster-cli/compare/v0.3.0...v0.3.6
[0.3.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/Bugsterapp/bugster-cli/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/Bugsterapp/bugster-cli/releases/tag/v0.1.0
# Auth
Source: https://docs.bugster.dev/commands/auth
Configure and manage your Bugster API key for CLI authentication
The `bugster auth` command allows you to configure and manage your Bugster API key for CLI authentication.
## Basic Usage
```bash theme={null}
bugster auth
```
## Command Overview
Configure or update your Bugster API key for authentication with the Bugster platform.
### When to Use
* When setting up Bugster for the first time
* When switching between organizations or teams
* If your API key expires or gets rotated
* When API key authentication fails
### Key Features
* Interactive API key setup
* Secure storage in `~/.bugsterrc`
* Environment variable support via `BUGSTER_CLI_API_KEY`
* API key validation and verification
API keys start with the `bugster_` prefix and are required for all Bugster operations.
## Command Syntax
```bash theme={null}
bugster auth [options]
```
### Options
Set the Bugster API key directly without interactive prompts. The key must start with 'bugster\_'.
Remove the existing API key from local storage.
## Examples
### Interactive Setup
```bash theme={null}
bugster auth
```
This opens an interactive prompt to enter your API key.
### Direct API Key Setup
```bash theme={null}
bugster auth --api-key bugster_org_abc123def456...
```
### Clear Existing Authentication
```bash theme={null}
bugster auth --clear
```
## Authentication Storage
Your API key is stored securely in:
* **Local file**: `~/.bugsterrc`
* **Environment variable**: `BUGSTER_CLI_API_KEY` (optional)
Keep your API key secure and never commit it to version control. The environment variable takes precedence over the local file.
# Destructive
Source: https://docs.bugster.dev/commands/destructive-agent
Run AI-powered destructive agents to find potential bugs in your changed pages
The `bugster destructive` command runs AI-powered destructive agents to find potential bugs by simulating edge cases, unexpected user behavior, and malicious inputs that could break your application.
## Basic Usage
```bash theme={null}
bugster destructive
```
## Command Overview
Executes specialized AI agents designed to stress-test your application by attempting to break it through aggressive interactions, malicious inputs, and edge case scenarios.
### When to Use
* **Before major releases** to catch edge case bugs
* On staging environments to stress-test changes
* After significant code modifications
* When you want to find vulnerabilities proactively
### Key Features
* AI agents simulate malicious and edge case user behavior
* Only targets pages with recent code changes (git diff)
* Records videos of destructive attempts for debugging
* Multiple specialized agent types with different attack vectors
* More aggressive than regular testing approaches
**NEVER run against production environments.** Destructive agents can cause data corruption, submit forms, delete data, or trigger irreversible actions. Use only on test/staging environments.
## Command Syntax
```bash theme={null}
bugster destructive [options]
```
## How It Works
The destructive command:
1. **Change Detection**: Identifies pages with recent code changes using git diff
2. **Agent Selection**: Deploys specialized destructive agents based on page types
3. **Aggressive Testing**: Agents attempt to break functionality through various methods
4. **Result Recording**: Captures videos and logs of all destructive attempts
5. **Bug Analysis**: Reports potential vulnerabilities and edge case failures
## Agent Types
**Priority**: Highest
Attempts to crash UI components through:
* Rapid clicking and interaction spam
* Invalid input combinations
* Boundary value testing
* Component state corruption
**Priority**: High
Targets forms with malicious inputs:
* SQL injection attempts
* XSS payload testing
* Buffer overflow attempts
* Invalid data type submissions
## Execution Options
Run agents in headless mode without visible browser UI. Recommended for CI/CD environments.
Maximum number of concurrent agents to run simultaneously. Higher values increase testing speed but use more resources.
Alias for `--parallel`. Specifies the maximum number of agents to run concurrently.
Maximum number of destructive agents to execute. Range: 1-30. Higher values increase bug discovery chances.
Browser engine to use for destructive testing. Supports chromium, firefox, and webkit.
## Output Options
Stream real-time results to the Bugster dashboard as agents complete their destruction attempts.
Disable streaming to dashboard. Results will only be available locally.
Override the base URL from configuration. Essential for testing staging environments.
Enable detailed logging of agent execution and attack patterns.
Run agents silently with minimal output. Reduces noise in automated environments.
## Examples
### Complete Destructive Testing
```bash theme={null}
bugster destructive
```
Runs all available destructive agents on pages with recent changes.
### Pre-release Validation
```bash theme={null}
bugster destructive --limit 15 --parallel 5
```
Comprehensive destructive testing with maximum coverage before major releases.
### Quick Vulnerability Scan
```bash theme={null}
bugster destructive --limit 3 --headless
```
Fast security and stability check with minimal resource usage.
### Staging Environment Testing
```bash theme={null}
bugster destructive --base-url https://staging.myapp.com --limit 10
```
Test staging environment with comprehensive destructive scenarios.
### CI/CD Integration
```bash theme={null}
bugster destructive --headless --stream-results --silent
```
Automated destructive testing optimized for continuous integration pipelines.
## Usage Patterns
```bash theme={null}
bugster destructive --limit 15
```
Comprehensive destructive testing before major releases.
```bash theme={null}
bugster destructive --limit 3 --headless
```
Fast vulnerability and stability validation.
```bash theme={null}
bugster destructive --headless --stream-results
```
Automated testing in continuous integration pipelines.
```bash theme={null}
bugster destructive --parallel 8
```
Maximum concurrent destruction for stress testing.
## Safety Guidelines
* **Never run against production environments**
* Use dedicated test databases and isolated environments
* Ensure all data is disposable or properly backed up
* Test on staging environments that mirror production
* Agents may submit forms with test data
* Potential for data deletion or corruption
* May trigger irreversible actions
* Always use test credentials and mock data
* All destructive attempts are automatically recorded
* Videos help understand what caused detected issues
* Review recordings to learn about attack patterns
* Use videos for security team analysis
## Result Analysis
After execution, you'll receive:
* **Vulnerability Reports**: Detailed analysis of potential security issues
* **Edge Case Failures**: Documentation of unexpected behavior patterns
* **Video Recordings**: Visual evidence of successful attacks or crashes
* **Agent Logs**: Detailed execution traces for debugging
* **Severity Ratings**: Prioritized list of discovered issues
## Best Practices
Run destructive agents after `bugster update` to test newly modified pages. Higher `--limit` values increase the chance of finding edge case bugs, and videos are automatically saved for any issues found.
Destructive testing is most effective as a final validation step before releases. Combine with regular testing for comprehensive coverage, and always review video recordings to understand root causes.
# Generate
Source: https://docs.bugster.dev/commands/generate
Generate AI-powered tests from your codebase with bugster generate
The `bugster generate` command analyzes your codebase with AI and generates intelligent test specifications automatically. This powerful automation tool significantly reduces the manual work required to set up comprehensive test coverage.
## Basic Usage
```bash theme={null}
bugster generate
```
## Command Overview
Analyzes your codebase structure, user flows, and components to create intelligent test specifications that cover critical functionality and edge cases.
### When to Use
* After adding new features or pages to your application
* When you want comprehensive test coverage for specific components
* To create initial test suite for existing projects
* Before major releases to ensure thorough testing
### Key Features
* AI-powered analysis of your app structure and user flows
* Generates test specs in `.bugster/tests/` directory
* Supports filtering by specific pages/components
* Custom prompts to guide test generation
* Safe to run multiple times - won't duplicate existing tests
Can take several minutes for large codebases during the initial analysis phase.
Full codebase analysis and AI-powered generation is currently available for Next.js and React applications. For other frameworks, you can still generate tests using [coding agents](/guides/coding-agents/cursor) (Cursor or Claude Code) with the plugin rules.
## Command Syntax
```bash theme={null}
bugster generate [options]
```
## How It Works
The generate command:
1. **Codebase Analysis**: Scans your application structure and identifies key components
2. **AI Processing**: Uses AI to understand user flows and critical functionality
3. **Test Generation**: Creates intelligent test scenarios based on the analysis
4. **File Output**: Saves test specifications as YAML files with human-readable steps
5. **Caching**: Stores analysis results for faster subsequent runs
## Options
Number of test specs to generate per page. Range: 1-30. Higher values create more comprehensive test scenarios.
Generate specs only for specific page files. Provide comma-separated relative paths to target specific components.
Custom prompt to guide AI test generation with specific instructions and focus areas. Must be used together with `--page`.
Show detailed logs during analysis. (Deprecated - use --debug instead)
## Examples
### Complete Codebase Analysis
```bash theme={null}
bugster generate
```
Analyzes the entire codebase and generates comprehensive test coverage.
### Generate Specific Number of Tests
```bash theme={null}
bugster generate --count 10
```
Creates exactly 10 test scenarios per page for thorough coverage.
### Target Specific Pages
```bash theme={null}
bugster generate --page "pages/auth.tsx,pages/settings.tsx"
```
Generates tests only for the specified page files.
### Custom Test Focus with Page Filtering
```bash theme={null}
bugster generate --page "pages/product.tsx" --prompt "Focus on edge cases and error handling"
```
Uses AI to emphasize specific testing scenarios for targeted pages. The `--prompt` flag requires `--page` to be specified.
## Page Filtering Strategies
```bash theme={null}
bugster generate --page "pages/dashboard.tsx"
```
Focus on one specific page for detailed testing.
```bash theme={null}
bugster generate --page "pages/auth.tsx,pages/settings.tsx"
```
Target multiple specific pages simultaneously.
```bash theme={null}
bugster generate --page "components/forms/login.tsx"
```
Generate tests for specific reusable components.
```bash theme={null}
bugster generate --page "pages/admin/"
```
Target all pages within a specific directory.
## Output Structure
Generated tests are organized in the `.bugster/tests/` directory:
```
.bugster/tests/
├── pages/
│ ├── auth.yaml # Authentication page tests
│ └── dashboard.yaml # Dashboard functionality tests
└── components/
└── forms/
└── login.yaml # Login component tests
```
## Example Generated Test
Here's an example of what a generated test specification looks like:
```yaml theme={null}
name: "User Login Flow"
description: "Test successful user authentication"
steps:
- action: navigate
url: "/login"
- action: fill
selector: '[data-testid="email"]'
value: "user@example.com"
- action: fill
selector: '[data-testid="password"]'
value: "password123"
- action: click
selector: '[data-testid="login-button"]'
- action: assert
selector: '[data-testid="dashboard"]'
condition: "visible"
```
## Best Practices
Use `--page` to focus on recently modified files for efficient test creation.
Combine `--page` and `--prompt` for targeted, customized test generation.
Run regularly as your codebase evolves - tests won't be duplicated.
Higher `--count` values generate more comprehensive test scenarios.
The first run analyzes your entire app structure and caches results for faster subsequent runs. Remember that custom prompts require the `--page` flag to specify which components to target.
# Init
Source: https://docs.bugster.dev/commands/init
Set up Bugster CLI in your project and authenticate with your account
The `bugster init` command guides you through setting up a new Bugster project. It creates configuration files, helps you configure your application, and sets up test credentials for automated testing.
## Basic Usage
```bash theme={null}
bugster init
```
## Command Overview
Sets up Bugster configuration in your repository for the first time, creating the necessary project structure and configuration files.
### When to Use
* Once per repository - typically done by one team member
* When starting a new project with Bugster
* If you need to reconfigure project settings
### Key Features
* Interactive project setup
* Creates `.bugster/` directory with project configuration
* Configures application URL and credentials
* Safe to re-run (will ask before overwriting existing config)
The configuration must be committed to git for CI/CD integration and requires an API key for authentication.
## Command Syntax
```bash theme={null}
bugster init [options]
```
## Configuration Process
When you run `bugster init`, the following steps occur:
1. **Authentication Check**: Verifies you're authenticated with the Bugster API (run `bugster auth` first if not)
2. **Project Setup**: Creates `.bugster/` directory and configuration files
3. **Application Configuration**: Collects your application URL and settings
4. **Credential Setup**: Configures login credentials for testing
5. **Verification**: Tests the configuration to ensure it works
## Options
Bugster API key for authentication. Must start with 'bugster\_'. If not provided, will prompt for authentication.
Custom name for your project. Used for identification in the Bugster dashboard.
Base URL of your application where tests will be executed.
Username for login credentials used in automated tests.
Password for login credentials used in automated tests.
Name for the credential entry in your configuration.
Skip credential setup entirely. You can configure credentials later.
Protection bypass secret for deployment platforms like Vercel or Netlify.
## Examples
### Interactive Setup
```bash theme={null}
bugster init
```
Guides you through the complete setup process with interactive prompts.
### Quick Setup with Parameters
```bash theme={null}
bugster init --project-name "My E-commerce App" --url http://localhost:3000
```
### Setup with Credentials
```bash theme={null}
bugster init --user admin@example.com --password secret123 --credential-name staging
```
### Skip Credential Configuration
```bash theme={null}
bugster init --no-credentials
```
Sets up the project without configuring any login credentials.
## Project Structure
After running the command, the following structure is created:
```
.bugster/
├── config.yaml # Main project configuration
└── credentials/ # Encrypted credential storage
└── admin.yaml # Default credential file
```
Always commit the `.bugster/` directory to version control. The configuration is required for CI/CD integration and team collaboration.
## Example Configuration
After initialization, your `config.yaml` might look like:
```yaml theme={null}
project_id: "proj_abc123"
project_name: "My E-commerce App"
base_url: "https://staging.myapp.com"
default_credentials: "admin"
```
# Shell
Source: https://docs.bugster.dev/commands/interactive-mode
Interactive CLI session with smart autocomplete and instant testing
The `bugster` shell provides a persistent, interactive environment for running tests and commands. Type natural language to test instantly, browse commands with `/`, and navigate files with `@`.
## Quick Start
```bash theme={null}
bugster
```
## Core Concepts
**Command Browser**
Type `/` to browse and autocomplete all Bugster commands
**File Navigator**
Type `@` to interactively select test or source files
**Inline Tests**
Type 5+ words to instantly run a test
## Usage Examples
```bash theme={null}
# Start shell
bugster
# Browse and run command
/generate --page @
# Quick inline test (5+ words required)
test login form with invalid email addresses
# Run specific test file
/run @
# Exit
/exit
```
## Key Features
* **No `bugster` prefix needed** - Direct command execution
* **Command history** - Use ↑/↓ arrows to navigate previous commands
* **Smart file filtering** - `/run @` shows only tests, `/generate --page @` excludes tests
* **Persistent session** - Stay in context across multiple operations
* **Instant execution** - Natural language (5+ words) runs tests immediately
## Keyboard Shortcuts
| Key | Action |
| ------------ | ---------------------- |
| `/` | Command browser |
| `@` | File browser |
| `↑` `↓` | Navigate history/items |
| `Enter` | Execute/Select |
| `Ctrl+C` × 2 | Exit shell |
## Common Commands
```bash theme={null}
/generate # Generate tests
/run # Run all tests
/run --fast # Run tests in fast mode
/update # Update test specs
/validate # Validate config
```
Use the shell for active development sessions. It's faster than one-off commands and maintains your workflow context.
Inline tests require **at least 5 words**. Shorter phrases won't execute as tests.
# Overview
Source: https://docs.bugster.dev/commands/overview
Complete overview of Bugster CLI commands and capabilities
# Bugster CLI Overview
The Bugster CLI is a powerful AI-powered command-line tool designed to generate, execute, and maintain end-to-end tests for web applications. It provides an intuitive interface to interact with the Bugster platform directly from your development environment.
## Installation
Before using the Bugster CLI, you'll need to install it. See the [installation guide](/installation) for detailed instructions for your operating system.
## Available Commands
The CLI includes the following commands:
| Command | Description |
| -------------------------------------------- | --------------------------------------------------------------------- |
| [`auth`](/commands/auth) | Configure and manage your Bugster API key for CLI authentication |
| [`init`](/commands/init) | Set up Bugster CLI in your project and authenticate with your account |
| [`generate`](/commands/generate) | Generate AI-powered tests from your codebase |
| [`run`](/commands/run) | Execute your test specifications with browser automation |
| [`update`](/commands/update) | Keep your tests synchronized with code changes |
| [`destructive`](/commands/destructive-agent) | Run AI-powered destructive agents to find potential bugs |
## Getting Help
For help with any command, use the `--help` flag:
```bash theme={null}
bugster --help # General CLI help
bugster init --help # Help for the init command
bugster generate --help # Help for the generate command
```
## Command Syntax
The Bugster CLI follows a consistent command structure:
```
bugster [options]
```
Most commands accept various options that modify their behavior. These options are typically provided using the `--option-name value` format or boolean flags like `--headless`.
## Workflow Example
A typical workflow with the Bugster CLI might look like:
1. **Authenticate**: `bugster auth`
2. **Initialize project**: `bugster init`
3. **Generate tests**: `bugster generate`
4. **Run tests**: `bugster run`
5. **Update tests**: `bugster update` (after code changes)
6. **Advanced testing**: `bugster destructive` (before releases)
## Command Categories
### Setup Commands
Essential commands for initial project configuration:
Configure your API key and authenticate with Bugster
Initialize Bugster in your repository with configuration
### Core Testing Workflow
Commands you'll use regularly in your development process:
AI-powered test generation from your codebase
Run tests with automated browser instances
Keep tests synchronized with code changes
### Advanced Testing
Specialized testing capabilities for comprehensive validation:
AI agents that find bugs through edge cases and unexpected behavior
## Best Practices
Start with `bugster auth` and `bugster init` to set up your project. Then use `bugster generate` to create your initial test suite.
For the best experience, run `bugster update` after making code changes and `bugster run --only-affected` to validate your modifications.
# Plugin
Source: https://docs.bugster.dev/commands/plugin
Install Bugster rules for AI coding agents to generate tests in your editor
The `bugster plugin` command installs test generation rules for AI coding agents like Cursor or Claude Code, enabling them to create and update Bugster test specifications without leaving your editor.
## Basic Usage
```bash theme={null}
bugster plugin
```
## Command Overview
Installs rule files that teach your AI coding agent how to generate and maintain Bugster test specifications directly in your development environment.
### When to Use
* After setting up Bugster in your project for the first time
* When switching to a new AI coding agent
* To update rules when new versions are released
* When setting up a new team member's development environment
### Key Features
* Interactive agent selection (Cursor or Claude Code)
* Installs both generation and update rules
* Safe installation with overwrite protection
* Downloads official rules from Bugster repository
* Works seamlessly with your existing workflow
Requires internet connection to download the latest rule files from the official Bugster GitHub repository.
## Command Syntax
```bash theme={null}
bugster plugin [options]
```
## Options
Specify the coding agent to install rules for. Accepts `cursor` or `claude`. Skips the interactive selection prompt.
Overwrite existing rule files without confirmation. Useful for updating to the latest rule versions.
## What Gets Installed
The command installs two rule files specific to your coding agent:
1. **Generate Rule**: Creates new test specifications from your codebase
2. **Update Rule**: Updates existing test specs based on code changes
**Installation Location**: `.cursor/rules/`
Files installed:
* `bugster-generate.mdc` - Test generation rule
* `bugster-update.mdc` - Test update rule
**Source**: [Cursor Plugin Rules](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/cursor)
**Installation Location**: `.claude/rules/`
Files installed:
* `BUGSTER_GENERATE.md` - Test generation rule
* `BUGSTER_UPDATE.md` - Test update rule
**Source**: [Claude Code Plugin Rules](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/claude)
## Examples
### Interactive Installation
```bash theme={null}
bugster plugin
```
Prompts you to select your coding agent and installs the appropriate rules.
### Install for Cursor
```bash theme={null}
bugster plugin --agent cursor
```
Directly installs Bugster rules for Cursor without prompting.
### Install for Claude Code
```bash theme={null}
bugster plugin --agent claude
```
Installs Bugster rules for Claude Code with no interactive prompt.
### Force Update Existing Rules
```bash theme={null}
bugster plugin --agent cursor --force
```
Overwrites existing rule files to update to the latest versions.
## Using the Rules in Your Editor
Launch Cursor or Claude Code in your project directory where Bugster is configured.
In your AI chat, mention `@bugster-generate` or `@bugster-update` to activate the corresponding rule.
Your coding agent will now understand how to create and update Bugster test specifications.
Ask your AI agent to create tests for specific files, components, or user flows.
## Example Prompts
```
@bugster-generate Create tests for src/components/LoginForm.tsx
```
Generates comprehensive test coverage for a specific component.
```
@bugster-update Update tests for the authentication flow based on recent changes
```
Updates existing test specs to reflect code modifications.
```
@bugster-generate Generate comprehensive test coverage for the checkout process
```
Creates multiple test scenarios for complex user flows.
```
@bugster-generate Create edge case tests for the payment form validation
```
Focuses on specific testing scenarios with detailed instructions.
## Rule Capabilities
AI understands your code structure and creates relevant test scenarios automatically.
Generates properly formatted test specs that work with `bugster run`.
Updates existing tests when your code changes without duplicating specs.
Follows Bugster conventions for selectors, assertions, and test structure.
## Workflow Integration
After installation, your typical workflow becomes:
1. Write or modify application code
2. Reference `@bugster-generate` in your AI chat
3. Ask your coding agent to create tests for the changes
4. Review and commit the generated test specs
5. Run tests with `bugster run`
Run `bugster plugin --force` periodically to ensure you have the latest rule versions with improved test generation capabilities.
The rules require your coding agent to have access to your project files. Ensure your editor has proper permissions to read the `.bugster/` directory.
## Best Practices
* **Version Control**: Commit the rule files to your repository so the entire team benefits
* **Regular Updates**: Use `--force` to update rules when Bugster releases new versions
* **Consistent Usage**: Reference the rules consistently across your team for uniform test quality
* **Combine with Generate**: Use plugin rules for targeted test creation and `bugster generate` for comprehensive coverage
# Run
Source: https://docs.bugster.dev/commands/run
Execute your test specifications with browser automation
The `bugster run` command executes your test specifications using an AI agent in automated browser instances. It provides comprehensive test execution with real browser automation and intelligent result analysis.
## Basic Usage
```bash theme={null}
bugster run
```
## Command Overview
Executes test specifications using AI-powered browser automation to validate your application's functionality across different scenarios and user flows.
### When to Use
* **Before deploying** to validate functionality
* In CI/CD pipelines for automated testing
* During development to catch regressions
* To verify fixes after bug reports
### Key Features
* AI agent executes tests in real browser instances
* Supports parallel execution for faster results
* Automatic video recording for failed tests
* Real-time streaming to dashboard
* Quick ad-hoc testing with text prompts
Requires your application to be running and accessible on the configured URL before executing tests.
## Command Syntax
```bash theme={null}
bugster run [path] [options]
```
## How It Works
The run command:
1. **Test Discovery**: Scans for test specifications in `.bugster/tests/` directory
2. **Browser Initialization**: Launches browser instances (visible or headless)
3. **AI Execution**: AI agent interprets and executes test steps
4. **Result Analysis**: Captures screenshots, videos, and detailed logs
5. **Reporting**: Streams results to dashboard and generates reports
## Execution Options
Run tests in headless mode without visible browser UI. Ideal for CI/CD environments.
Maximum number of concurrent tests to run simultaneously. Higher values speed up execution but use more resources.
Alias for `--parallel`. Specifies the maximum number of tests to run concurrently.
Maximum number of tests to execute. Useful for quick validation or debugging specific test counts.
Browser engine to use for test execution. Supports chromium, firefox, and webkit.
Set the browser viewport size in WIDTHxHEIGHT format (e.g., 1920x1080, 1280x720, 375x667 for mobile).
Run an instant test from a text description (max 1000 characters). Creates and executes a test without needing YAML files.
Alias for `--prompt`. Run a quick test from natural language description.
## Filtering Options
Run only tests for files/directories that have been modified. Perfect for PR workflows and focused testing.
Override the base URL from configuration. Useful for testing against different environments.
## Output Options
Save detailed test results to a JSON file. Essential for CI/CD integration and test reporting.
Stream real-time results to the Bugster dashboard for live monitoring.
Disable streaming to dashboard. Results will only be available locally.
Enable detailed logging output for debugging test execution issues.
Run in silent mode with minimal output. Reduces noise in CI/CD logs.
## Examples
### Complete Test Suite
```bash theme={null}
bugster run
```
Runs all available tests with default settings and visible browser.
### Headless CI/CD Execution
```bash theme={null}
bugster run --headless --stream-results
```
Perfect for automated testing in continuous integration pipelines.
### Parallel Execution
```bash theme={null}
bugster run --parallel 8 --headless
```
Runs up to 8 tests concurrently for maximum speed.
### Target Specific Directory
```bash theme={null}
bugster run auth/ --verbose
```
Runs only authentication tests with detailed debugging output.
### Quick Ad-hoc Testing
```bash theme={null}
bugster run --prompt "Test user login with valid credentials and verify dashboard loads"
```
Creates and runs an instant test from natural language description.
### Environment Testing
```bash theme={null}
bugster run --base-url https://staging.myapp.com --limit 5
```
Tests against staging environment with a limited number of tests.
### Custom Viewport Size
```bash theme={null}
bugster run --viewport-size 1920x1080
```
Run tests with a specific browser viewport size. Useful for testing responsive designs or specific screen resolutions.
## Quick Test Prompts
```bash theme={null}
bugster run --prompt "Test user login with valid credentials and verify dashboard loads"
```
Complete login flow validation.
```bash theme={null}
bugster run --prompt "Add product to cart, proceed to checkout, and verify total calculation"
```
Shopping workflow testing.
```bash theme={null}
bugster run --prompt "Test contact form with invalid email and verify error messages"
```
Form error handling validation.
```bash theme={null}
bugster run --prompt "Test navigation menu on mobile device and verify all links work"
```
Mobile-specific functionality testing.
## Common Usage Patterns
```bash theme={null}
bugster run
```
Run all tests with visible browser for development.
```bash theme={null}
bugster run --headless --output results.json
```
Automated testing with result export.
```bash theme={null}
bugster run --limit 5 --parallel 3
```
Fast subset testing for quick feedback.
```bash theme={null}
bugster run auth/ --verbose
```
Detailed logging for specific test categories.
## Test Results
After execution, you'll receive:
* **Pass/Fail Status**: Clear indication of test outcomes
* **Screenshots**: Visual evidence of test execution
* **Video Recordings**: Automatic recording for failed tests
* **Detailed Logs**: Step-by-step execution information
* **Performance Metrics**: Timing and resource usage data
## Best Practices
Use `--only-affected` in PR workflows to test only changed functionality. Combine `--parallel` with `--headless` for maximum execution speed in CI/CD environments.
Quick prompt tests are limited to 1000 characters and run with maximum concurrency of 1. They're perfect for exploratory testing and quick validation scenarios.
# Update
Source: https://docs.bugster.dev/commands/update
Keep your tests synchronized with code changes using bugster update
The `bugster update` command automatically maintains your test specifications by analyzing code changes and updating, creating, or deleting tests accordingly to keep them synchronized with your evolving codebase.
## Basic Usage
```bash theme={null}
bugster update
```
## Command Overview
Analyzes git changes in your codebase and intelligently updates your test suite to reflect modifications, additions, and deletions in your application code.
### When to Use
* **After modifying existing features** to keep tests in sync
* **In Pull Request workflows** to automate test maintenance
* When you've added new pages or components
* After deleting or refactoring code sections
### Key Features
* Compares against git changes to determine updates needed
* Creates new tests, modifies existing ones, or deletes obsolete tests
* Saves current state for future incremental comparisons
* Works with both staged and unstaged changes
* Intelligent selective updating of relevant test sections
The update command requires a git repository with committed changes for comparison and automatically saves update state after successful runs.
Automatic test synchronization is currently available for Next.js and React applications. For other frameworks, you can still update tests using [coding agents](/guides/coding-agents/cursor) (Cursor or Claude Code) with the plugin rules.
## Command Syntax
```bash theme={null}
bugster update [options]
```
## How It Works
The update command:
1. **Change Analysis**: Compares current code against git history or saved state
2. **Impact Assessment**: Identifies which tests are affected by code changes
3. **Test Maintenance**: Updates, creates, or deletes test specifications as needed
4. **State Saving**: Records current state for future incremental updates
5. **Validation**: Ensures test specifications remain valid and executable
## Update Types
Updates existing test specs when code changes:
* Function signature changes → updated test steps
* UI modifications → adjusted interaction flows
* Logic updates → revised assertion patterns
Suggests new test specs for added code:
* New components → generates component test files
* New pages → creates page-specific test scenarios
* New features → develops feature test coverage
Removes obsolete test specs:
* Removed pages → deletes corresponding tests
* Deleted components → removes component tests
* Refactored code → cleans up outdated specs
## Scope Options
Only update existing test specifications. No new test suggestions or deletions will be performed.
Only suggest new test specifications for added files. No updates to existing tests or deletions.
Only delete obsolete test specifications for removed files. No updates or new suggestions.
## Comparison Options
Compare against the default branch (main/master) instead of HEAD. Perfect for Pull Request workflows.
Compare against the commit from the last update run. Enables incremental updates for active development.
Show detailed logs during analysis. (Deprecated - use --debug instead)
## Examples
### Complete Test Maintenance
```bash theme={null}
bugster update
```
Handles all types of changes: updates, additions, and deletions.
### Safe Updates Only
```bash theme={null}
bugster update --update-only
```
Only modifies existing tests without creating new ones or deleting any.
### New Feature Testing
```bash theme={null}
bugster update --suggest-only
```
Generates tests only for newly added code and features.
### Post-refactor Cleanup
```bash theme={null}
bugster update --delete-only
```
Removes obsolete tests after code refactoring or deletion.
### Branch Comparison
```bash theme={null}
bugster update --against-default
```
Compares against main/master branch to catch all changes in feature branch.
### Incremental Updates
```bash theme={null}
bugster update --against-last-update
```
Only processes changes since the last update run for efficient maintenance.
## Workflow Integration
```bash theme={null}
bugster update --update-only
```
Ensure tests stay current before committing changes.
```bash theme={null}
bugster update --against-default
```
Automate test maintenance in GitHub Actions/CI.
```bash theme={null}
bugster update
```
Complete maintenance after feature development.
```bash theme={null}
bugster update --against-last-update
```
Regular incremental test maintenance.
## Update Scenarios
```bash theme={null}
# After completing feature development
bugster update
# For PR review
bugster update --against-default
```
Maintains tests throughout feature development lifecycle.
```bash theme={null}
# In GitHub Actions
bugster update --against-default --update-only
```
Automated test maintenance in CI/CD pipelines.
```bash theme={null}
# After major refactoring
bugster update --delete-only
# Then update remaining tests
bugster update --update-only
```
Systematic test cleanup after code restructuring.
## Validation Workflow
After running update, follow this validation process:
1. **Review Changes**: Examine generated test modifications
2. **Run Tests**: Execute updated tests with `bugster run --only-affected`
3. **Validate Coverage**: Ensure new features have adequate test coverage
4. **Commit Updates**: Add updated test specifications to version control
## Limitations
Cannot use both `--against-default` and `--against-last-update` simultaneously. Choose one comparison method per execution.
## Best Practices
Use `--against-last-update` for incremental updates during active development. Combine with `bugster run --only-affected` for complete change validation workflow.
Always review generated changes before committing to your repository. The `--against-default` flag is perfect for PR workflows to catch all branch changes comprehensively.
# Framework Compatibility
Source: https://docs.bugster.dev/framework-compatibility
Detailed framework and routing support information for Bugster CLI
Bugster supports all major JavaScript frameworks and generates automated tests for your web applications. This page provides detailed information about supported frameworks and routing patterns.
**Framework Differences**: Next.js and React have enhanced routing analysis features for the `generate` and `update` commands. Angular, Svelte, Vue, and other frameworks use AI agent-assisted test generation with Cursor or Claude Code.
## Supported Frameworks
}>
Enhanced routing analysis support
Enhanced routing analysis support
AI agent-assisted test generation
## Framework Implementation Differences
**Enhanced Routing Analysis**
Next.js and React applications benefit from advanced routing analysis in the `generate` and `update` commands. Bugster automatically:
* Detects and analyzes your application's routing structure
* Generates tests for all discovered routes
* Updates test suites when routes change
* Handles dynamic routes and nested layouts
This routing-aware approach ensures comprehensive test coverage across your application.
**AI Agent-Assisted Test Generation**
For Angular, Svelte, Vue, and other JavaScript frameworks, the `generate` and `update` commands work through AI coding assistants like Cursor or Claude Code:
* Tests are created and updated with AI assistance using Agent rules
* Leverages your coding assistant's understanding of your application
* Flexible approach that works with any framework or routing pattern
This approach provides maximum flexibility and works across all JavaScript frameworks and configurations.
Learn how to set up Bugster with Cursor for AI-assisted test generation
## Next.js Support
Bugster provides enhanced routing analysis for Next.js applications across different routing patterns.
### Supported Routing Patterns
**Pages Router** (`/pages` directory - Next.js 12 and legacy versions)
```javascript pages/index.js theme={null}
// pages/index.js
export default function Home() {
return Welcome to the homepage
}
```
```javascript pages/about.js theme={null}
// pages/about.js
export default function About() {
return About page
}
```
```javascript pages/blog/[slug].js theme={null}
// pages/blog/[slug].js
export default function BlogPost({ params }) {
return Blog post: {params.slug}
}
```
Bugster automatically detects all pages in your `/pages` directory and generates tests for static and dynamic routes.
**App Router** (`/app` directory - Next.js 13+) with file-based routing
```javascript app/page.js theme={null}
// app/page.js
export default function HomePage() {
return Welcome to the homepage
}
```
```javascript app/about/page.js theme={null}
// app/about/page.js
export default function AboutPage() {
return About page
}
```
```javascript app/blog/[slug]/page.js theme={null}
// app/blog/[slug]/page.js
export default function BlogPost({ params }) {
return Blog post: {params.slug}
}
```
Bugster understands the new App Router structure and generates tests for all route segments, including nested layouts and dynamic routes.
## React.js Support
Bugster provides enhanced routing analysis for React 18+ applications using React Router DOM.
### Supported Routing Patterns
**Code-based routing** - Routes defined programmatically in your code
```javascript Create React App - JavaScript theme={null}
// src/App.js
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Home from './components/Home';
import About from './components/About';
import Contact from './components/Contact';
function App() {
return (
} />
} />
} />
} />
);
}
export default App;
```
```typescript Vite - TypeScript theme={null}
// src/App.tsx
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Home from './components/Home';
import About from './components/About';
import Contact from './components/Contact';
function App(): JSX.Element {
return (
} />
} />
} />
} />
);
}
export default App;
```
Bugster analyzes your route definitions and generates tests for all declared routes, including dynamic parameters.
**File-based routing** - React Router v7 with file-based route definitions
```typescript React Router v7 theme={null}
// app/routes.ts
import type { RouteConfig } from "@react-router/dev/routes";
export default [
{
path: "/",
file: "routes/home.tsx",
},
{
path: "/about",
file: "routes/about.tsx",
},
{
path: "/blog/:slug",
file: "routes/blog.$slug.tsx",
},
] satisfies RouteConfig;
```
```typescript Home Route theme={null}
// app/routes/home.tsx
export default function Home() {
return Welcome to the homepage
;
}
```
```typescript Dynamic Route theme={null}
// app/routes/blog.$slug.tsx
import { useParams } from "@react-router/react";
export default function BlogPost() {
const { slug } = useParams();
return Blog post: {slug}
;
}
```
Bugster supports React Router v7's file-based routing system and automatically discovers routes from your configuration.
### React Router Versions
**Fully Supported** - Standard routing patterns with `` and `` components.
```javascript theme={null}
import { BrowserRouter, Routes, Route } from 'react-router-dom';
```
**Fully Supported** - Both code-based and file-based routing patterns.
```typescript theme={null}
import type { RouteConfig } from "@react-router/dev/routes";
```
### React Router Limitations
For enhanced routing analysis, the following patterns are not supported:
* Custom routers or dynamic routing systems with routes scattered across multiple files
* Alternative routing libraries (TanStack Router, Wouter, Reach Router)
* Complex routing factories that generate routes programmatically at runtime
If your React application uses unsupported routing patterns, you can use AI agent-assisted test generation with Cursor or Claude Code instead, which works with any navigation structure.
## Other Frameworks
Angular, Svelte, Vue, and other JavaScript frameworks are supported with AI agent-assisted test generation:
**Fully Supported** - All Angular configurations work with Bugster's AI agent-assisted test generation.
* Angular 12+ applications
* Angular Router or any routing solution
* Angular CLI or custom build configurations
* Standalone components and NgModules
Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Angular application.
**Fully Supported** - All Svelte configurations work with Bugster's AI agent-assisted test generation.
* Svelte applications
* Any routing solution
* Vite or custom build configurations
* SPA modes
Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Svelte application.
**Fully Supported** - All Vue configurations work with Bugster's AI agent-assisted test generation.
* Vue 2 and Vue 3 applications
* Vue Router or any routing solution
* Vite, Vue CLI, or custom build configurations
* Options API and Composition API
Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for your Vue application.
**Fully Supported** - Bugster works with any JavaScript framework through AI agent assistance.
Supported frameworks include but are not limited to:
* Nuxt
* SvelteKit
* Preact
* Remix
* Vanilla JavaScript applications
* And any other JavaScript framework or library
Use Cursor or Claude Code with Bugster Agent rules to generate and update tests for any framework.
## Getting Started with Your Framework
Check that your project uses one of the supported frameworks and routing patterns listed above.
Follow the [installation guide](/installation) to set up Bugster CLI on your system.
Run the quickstart command in your project directory:
```bash theme={null}
bugster quickstart --api-key=YOUR_API_KEY
```
Execute the generated tests:
```bash theme={null}
bugster run
```
## Need Help?
Follow our quickstart guide to set up Bugster with your framework
Get help from the community and Bugster team
## Command Behavior Summary
**Next.js & React**: Enhanced routing analysis automatically discovers and generates tests for all routes.
**Angular, Svelte, Vue & Others**: AI agent-assisted generation using Cursor or Claude Code with Bugster Agent rules.
**All Frameworks**: Test execution works identically across all frameworks. No differences in how tests run.
# CI/CD Integration
Source: https://docs.bugster.dev/guides/cicd/cicd-integration
Integrate Bugster into your CI/CD pipeline to automatically run tests on pull requests
Bugster integrates seamlessly with your CI/CD pipeline to automatically run tests against preview deployments on every pull request. This ensures your application works correctly before merging changes.
Currently supported deployment platforms: **Vercel**, **Railway**, and **Netlify**.
## Prerequisites
Before setting up CI/CD integration, ensure you have:
* A Bugster organization and project configured
* A GitHub repository with your application code
* Your application deployed on Vercel, Railway, or Netlify
* Admin access to your GitHub repository and deployment platform project
## Integration Steps
Install the Bugster GitHub App in your organization to enable repository access and pull request integration.
1. Navigate to your Bugster organization settings
2. Go to **Integrations** → **GitHub**
3. Click **Install GitHub App**
4. Select your organization and repositories
5. Complete the installation process
Verify the GitHub App appears in your organization's installed apps.
Connect your GitHub repository to your Bugster project to enable automated test execution.
1. In your Bugster project dashboard, go to **Settings** → **Integrations**
2. Click **Connect Repository**
3. Select your GitHub repository from the list
4. Confirm the integration
Ensure the GitHub repository matches the one where you installed the Bugster GitHub App.
Set up your deployment platform integration based on where your application is hosted:
Enable Bugster to access your Vercel preview deployments using Protection Bypass:
1. In Vercel, navigate to your project's [Deployment Protection settings](https://vercel.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fsettings%2Fdeployment-protection\&title=Deployment+Protection+settings)
2. Navigate to **Protection Bypass for Automation**
3. Click **Add Secret** to generate a bypass token
4. Copy the generated secret
5. In Bugster, go to **Project Settings** → **Config YAML**
6. Add the secret to your configuration:
```yaml theme={null}
vercel:
protection_bypass: "your-generated-secret-here"
```
Complete Vercel integration guide with troubleshooting
Railway integration activates automatically when you connect your GitHub repository:
1. Ensure your Railway project is connected to your GitHub repository
2. Verify preview deployments are enabled in Railway
3. No additional configuration required
Railway integration works seamlessly with your existing GitHub connection.
Railway integration documentation
Configure Netlify webhook notifications for deployment events:
1. In Netlify, go to your project **Settings** → **Notifications > Emails and Webhooks**
2. Add HTTP POST request notifications for:
* Deploy succeed
* Deploy started
* Deploy failed
3. Get the webhook URL from Bugster Project Settings → Integrations → Netlify Integration
4. Add the webhook URL to each notification type
Complete Netlify integration with screenshots
Verify everything works by creating a test pull request.
1. Create a new branch in your repository
2. Make a small change to your application
3. Open a pull request
4. Wait for Bugster to automatically run tests
5. Check the PR for Bugster results and status updates
You should see Bugster test results appear as a check in your pull request within a few minutes.
## Advanced Configuration
### Organization Preferences
Configure how Bugster behaves across your organization and projects:
Control whether Bugster's destructive agent runs on pull requests:
1. Go to **Organization Settings** → **General**
2. Find **Bugster Destructive** option
3. Toggle to enable/disable destructive testing on PRs
The destructive agent tests edge cases and error scenarios that might break your application.
Choose when Bugster runs tests on your pull requests:
**Available options:**
* **On every commit** (default): Runs tests each time you push changes
* **Once per PR**: Runs tests only when the PR is first opened
Configure in **Organization Settings** → **General** → **Run on Every PR Deployment**
Select which environments Bugster should test:
1. Navigate to **Organization Settings** → **General**
2. Find **Run on Environments**
3. Choose from:
* Production only
* Preview only
* Both environments
### Email Notifications
Get notified when tests fail in your deployments:
1. Go to **Organization Settings** → **General**
2. Enable **Send Email Alerts for Failed Tests**
3. Configure recipient preferences
## Troubleshooting
**Possible causes:**
* GitHub App not installed or missing repository permissions
* Repository not connected to Bugster project
* Platform integration not configured properly
**Solutions:**
* Verify GitHub App installation and permissions
* Re-connect repository in project settings
* Check platform-specific configuration:
* **Vercel**: Verify protection bypass configuration
* **Railway**: Ensure preview deployments are enabled
* **Netlify**: Check webhook notifications are configured
**Possible causes:**
* Platform authentication blocking access
* Invalid configuration settings
* Preview deployment not ready or failed
**Solutions:**
* **Vercel**: Verify protection bypass secret is correct
* **Railway**: Check deployment status and environment variables
* **Netlify**: Verify webhook URL is configured and deployments are successful
* Ensure preview URL is accessible and deployment completed
**Possible causes:**
* Tests not configured in Bugster project
* Test generation failed
* CI/CD pipeline issues
**Solutions:**
* Verify tests exist in your Bugster project
* Check Bugster logs for errors
* Review GitHub Actions/deployment logs
## Next Steps
With CI/CD integration complete, you can:
* [Customize test configurations](/guides/configuration/customize-config-yaml)
* [Manage your test suite](/guides/test-management/manage-tests)
* [Set up team collaboration](/commands/team-collaboration)
# Integrate with Claude Code
Source: https://docs.bugster.dev/guides/coding-agents/claude-code
Configure Claude Code to be your Bugster test generation assistant
Transform Claude Code into a Bugster expert that can generate and maintain comprehensive test specifications directly in your editor.
## Three Claude Code Use Cases for Bugster
Bugster provides specialized Claude Code integrations to enhance your development workflow:
**Plugin installation** - Enable Claude Code to interface with a browser for interactive testing and debugging.
**Manual activation** - Generate comprehensive test specifications following Bugster's YAML structure and best practices.
**Manual activation** - Update existing test specifications based on code changes and new requirements.
| Integration | When to Use | Activation | Purpose |
| :------------------------ | :-------------------------- | :--------------------------- | :--------------------------------------- |
| **Browser Testing Skill** | Interactive browser testing | Plugin installation | Interface with browser for live testing |
| **Test Generation** | Building test suites | Manual (`@BUGSTER_GENERATE`) | Create comprehensive test specifications |
| **Test Update** | Maintaining tests | Manual (`@BUGSTER_UPDATE`) | Update existing tests after code changes |
## Browser Testing Skill
Enable Claude Code to seamlessly interface with a browser using Bugster's AI browser testing framework. This skill allows Claude Code to perform interactive browser testing directly from the editor.
### Installation
Run the following command in Claude Code:
```bash theme={null}
/plugin marketplace add Bugsterapp/agent-test
```
Then install the browser testing plugin:
```bash theme={null}
/plugin install browser-testing@browser-testing-tools
```
Restart Claude Code for the changes to take effect.
### Manual Installation
If you prefer using the interactive interface:
Type `/plugin` in Claude Code
Select option **3. Add marketplace**
Enter the marketplace source:
```text theme={null}
https://github.com/Bugsterapp/agent-test.git
```
* Press enter to select the `browser-testing` plugin
* Hit enter again to select **Install now**
Restart Claude Code for changes to take effect
### What It Does
The Browser Testing Skill enables Claude Code to:
* Launch and control browser instances directly from the editor
* Perform interactive testing and debugging
* Execute browser automation tasks
* Test web applications in real-time
Use this skill when you need Claude Code to interact with your web application during development, testing, or debugging sessions.
View the official plugin: [Bugster Browser Testing Skill](https://github.com/Bugsterapp/agent-test)
## Test Generation Rule
This rule provides Claude Code 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:
```bash theme={null}
bugster plugin --agent claude
```
This installs `BUGSTER_GENERATE.md` in your `.claude/rules/` directory.
View the official rule: [Claude Code Test Generation Rule](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/claude)
### How to Use
Reference the rule in your Claude Code chat to activate it:
```text Basic Usage theme={null}
@BUGSTER_GENERATE Create a test for the user login page
```
```text Specific Feature theme={null}
@BUGSTER_GENERATE Generate tests for the shopping cart checkout flow
```
```text Multiple Tests theme={null}
@BUGSTER_GENERATE Create 3 tests for the dashboard analytics 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:
```bash theme={null}
bugster plugin --agent claude
```
This installs `BUGSTER_UPDATE.md` in your `.claude/rules/` directory.
View the official rule: [Claude Code Test Update Rule](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/claude)
### How to Use
Reference the rule in your Claude Code chat to activate it:
```text Update After Changes theme={null}
@BUGSTER_UPDATE Update tests for the authentication flow based on recent changes
```
```text Specific File theme={null}
@BUGSTER_UPDATE Refresh tests for app/checkout/page.tsx to match new UI
```
```text Bulk Update theme={null}
@BUGSTER_UPDATE Update all dashboard tests to reflect new navigation structure
```
### 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.
## Combining Test Generation and Update Rules
For optimal workflow, use both rules together:
Install the official rules using the Bugster CLI:
```bash theme={null}
bugster plugin --agent claude
```
This installs both `BUGSTER_GENERATE.md` and `BUGSTER_UPDATE.md` in your `.claude/rules/` directory.
1. Use **Test Generation rule** to create comprehensive test suites for new features
2. Use **Test Update rule** when refactoring or updating existing features
3. Reference the rules with `@BUGSTER_GENERATE` or `@BUGSTER_UPDATE` in your Claude Code chat
Both rules ensure team members follow the same Bugster standards and test quality across your project.
The plugin command installs both generation and update rules automatically, making it easy to maintain consistent test coverage as your codebase evolves.
# Integrate with Cursor
Source: https://docs.bugster.dev/guides/coding-agents/cursor
Configure Cursor to be your Bugster test generation assistant
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:
**Manual activation** - Generate comprehensive test specifications following Bugster's YAML structure and best practices.
**Manual activation** - Update existing test specifications based on code changes and new requirements.
**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-generate`) | Create comprehensive test specifications |
| **Test Update** | Maintaining tests | Manual (`@bugster-update`) | Update existing tests after code changes |
| **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.
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](https://docs.cursor.com/context/rules) 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:
```bash theme={null}
bugster plugin --agent cursor
```
This installs `bugster-generate.mdc` in your `.cursor/rules/` directory.
View the official rule: [Cursor Test Generation Rule](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/cursor)
### How to Use
Reference the rule in your Cursor chat to activate it:
```text Basic Usage theme={null}
@bugster-generate Create a test for the user login page
```
```text Specific Feature theme={null}
@bugster-generate Generate tests for the shopping cart checkout flow
```
```text Multiple Tests theme={null}
@bugster-generate Create 3 tests for the dashboard analytics 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:
```bash theme={null}
bugster plugin --agent cursor
```
This installs `bugster-update.mdc` in your `.cursor/rules/` directory.
View the official rule: [Cursor Test Update Rule](https://github.com/Bugsterapp/bugster-cli/tree/main/plugins/cursor)
### How to Use
Reference the rule in your Cursor chat to activate it:
```text Update After Changes theme={null}
@bugster-update Update tests for the authentication flow based on recent changes
```
```text Specific File theme={null}
@bugster-update Refresh tests for app/checkout/page.tsx to match new UI
```
```text Bulk Update theme={null}
@bugster-update Update all dashboard tests to reflect new navigation structure
```
### 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:
````mdx theme={null}
---
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:
Install the official rules and add the quick test rule to your `.cursor/rules` directory:
```bash theme={null}
bugster plugin --agent cursor
```
Then add `bugster-quick-test.mdc` (see Quick Test Rule section above) for auto-validation.
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
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.
# Advanced Configuration
Source: https://docs.bugster.dev/guides/configuration/customize-config-yaml
Change your config.yaml to customize project settings and test execution preferences
# Bugster Configuration File
Learn how to customize Bugster's behavior through the `config.yaml` file to adapt the setup according to your project's preferences and workflows.
The configuration file allows you to control everything from test execution preferences to authentication settings, giving you full control over how Bugster runs in your environment.
## Project Information
```yaml config.yaml theme={null}
project_name: bugster-nextjs-example
project_id: bugster-nextjs-example-1756145574
base_url: "http://localhost:3000"
```
Auto-assigned by Bugster when you initialize your project.
Unique identifier generated by Bugster for linking test results, dashboards, and CI jobs.
Do not edit `project_name` or `project_id` fields in the config file. They are used internally by the system for linking test results, dashboards, and CI jobs.
The URL where your application is running. This is the field you can modify.
**Default:** `http://localhost:3000` - ideal when developing locally.
**Use cases:**
* Point to other environments (staging, preprod, prod)
* Adjust the port if your local server runs on something other than 3000 (e.g., `http://localhost:5173`)
* Run against `https://staging.myapp.com` before a release to confirm flows work in pre-production
In CI/CD pipelines, Bugster automatically overwrites this with the Vercel preview URL, so you don't need to change it for PR checks.
## Project Authentication
```yaml config.yaml theme={null}
# credentials:
# - id: admin
# username: ${BUGSTER_USERNAME}
# password: ${BUGSTER_PASSWORD}
```
Define login accounts used by tests.
Friendly alias like `admin`, `viewer`, `editor`.
Username provided via environment variables, not hardcoded.
Password provided via environment variables, not hardcoded.
Create environment variables following our dedicated guide. We do not recommend storing testing credentials directly in the config file.
For more details, see: [Add Credentials, Roles and Permissions](/guides/test-management/credentials-and-roles).
## Vercel Preview Protection
```yaml config.yaml theme={null}
# x-vercel-protection-bypass: ${VERCEL_BYPASS_SECRET}
```
Use when your Vercel previews are protected. Add your bypass secret so Bugster can test non-interactively.
**Use case:** CI runs against vercel.app previews that normally require login.
To generate the bypass secret, navigate to your project's [Deployment Protection settings](https://vercel.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fsettings%2Fdeployment-protection\&title=Deployment+Protection+settings) in Vercel.
## Test Execution Preferences
All preferences are commented by default. Uncomment lines to activate specific settings.
```yaml config.yaml theme={null}
# preferences:
# tests:
# always_run:
# - .bugster/tests/test1.yaml
# limit: 5
# headless: false
# silent: false
# verbose: false
# only_affected: false
# parallel: 5
# output: bugster_output.json
```
### Always Run Tests
```yaml config.yaml theme={null}
always_run:
- .bugster/tests/smoke/login.yaml
- .bugster/tests/smoke/checkout.yaml
```
Guarantee critical flows (like login/checkout) always run, even if you limit or filter other tests.
### Test Limits
```yaml config.yaml theme={null}
limit: 10
```
Restrict how many tests run in a session.
**Benefits:**
* Fast PR checks
* Limiting credits usage in CI pipelines
### Browser Mode
```yaml config.yaml theme={null}
headless: true
```
Run without a visible browser (`true`) or with UI (`false`).
**Recommendations:**
* CI environments: `true`
* Local debugging: `false`
### Logging Control
```yaml config.yaml theme={null}
silent: true
```
Produces cleaner CI logs by reducing output verbosity.
```yaml config.yaml theme={null}
verbose: true
```
Provides detailed logs for debugging purposes.
### Smart Test Selection
```yaml config.yaml theme={null}
only_affected: true
```
Instead of running all tests (or up to the limit), Bugster only runs tests affected by recent changes based on git diff.
**Features:**
* Works both locally and on PRs
* `always_run` tests will still execute regardless
### Parallel Execution
```yaml config.yaml theme={null}
parallel: 6
```
Number of tests to run simultaneously. Increase for faster pipelines.
Setting parallel execution too high may overload shared services. Start with small values and scale up once stable.
### Output Configuration
```yaml config.yaml theme={null}
output: .artifacts/bugster_output.json
```
Write structured JSON results for dashboards, artifacts, or CI reports.
**Use cases:**
* Dashboard integration
* CI artifact storage
* Piping results into coding agents (see [Claude Code / Cursor Use Case](/guides/coding-agents))
## CLI Overrides
CLI flags always override YAML configuration values.
**Example:**
```bash theme={null}
bugster run --only-affected --parallel=8
```
This command will ignore the `only_affected` and `parallel` values in your YAML configuration.
## Common Configuration Scenarios
### Local Debugging
Perfect for watching flows in a real browser during development:
```yaml config.yaml theme={null}
preferences:
tests:
headless: false
verbose: true
parallel: 5
limit: 15
output: bugster_output.json
```
**Use case:** Watch flows in a real browser, run \~15 tests, and export results as JSON for use with a coding agent.
### CI for Pull Requests
Optimized for fast feedback with minimal resource usage:
```yaml config.yaml theme={null}
preferences:
tests:
headless: true
only_affected: true
always_run:
- .bugster/tests/smoke/login.yaml
parallel: 6
silent: true
```
**Use case:** Fast PR checks that protect core flows while keeping runtime and credits low.
## Best Practices
* Always uncomment lines you want active
* Store sensitive data (credentials, secrets) in environment variables, not plain text
* Use version control for your config.yaml file (excluding sensitive data)
* Start with small parallel values, scale up once stable
* Use `only_affected` + `always_run` for efficient PR checks
* Set appropriate `limit` values to control resource usage
* Adjust `base_url` for different environments (local, staging, production)
* Use environment-specific configuration files when needed
* Export results with `output` for flaky test tracking or coding agent integrations
## Next Steps
Learn how to configure credentials and user roles for comprehensive testing
Discover how to create, organize, and manage your test suites effectively
# Destructive Agent Testing
Source: https://docs.bugster.dev/guides/destructive-testing
Use AI agents to break your application and find bugs in changed pages
Run AI-powered destructive agents like `form_destroyer` and `ui_crasher` to find potential bugs in your recent code changes by attempting to break your application.
## Basic Usage
```bash theme={null}
# Run destructive agents on all changed pages
bugster destructive
# Run in headless mode for faster execution
bugster destructive --headless
# Limit number of agents (default: 5)
bugster destructive --limit 10
```
## Common Scenarios
### After Feature Development
You just built a new checkout flow and want to stress-test it:
```bash theme={null}
# Run destructive testing with moderate scope
bugster destructive --limit 8
# Run multiple agents in parallel for speed
bugster destructive --max-concurrent 5
```
### Pre-Release Testing
Before deploying, run comprehensive destructive testing:
```bash theme={null}
# Extended testing session
bugster destructive --limit 15 --verbose
# Export results for review
bugster destructive --output destructive-results.json
```
## Key Options
Maximum number of destructive agents to run.
Number of agents running simultaneously for faster execution.
Run agents without browser UI for faster, unattended testing.
Save detailed results to JSON file for analysis or CI integration.
Destructive agents can generate unusual data and trigger error states. Always run in development or staging environments, never production.
## Next Steps
Integrate destructive testing into your daily development workflow
Explore all destructive agent command options and flags
Destructive testing is most effective when combined with regular testing. Use it to discover edge cases that traditional tests might miss.
# Integrate Hooks
Source: https://docs.bugster.dev/guides/hooks/integrate-hooks
Run setup and cleanup code before and after your tests
Hooks allow you to run setup and cleanup code before and after your tests. They are TypeScript/JavaScript functions that execute in your project's context, enabling you to:
* Create test data before tests run
* Clean up data after tests complete
* Pass dynamic values to your test steps
## Hook Structure
Add hooks to your test YAML file:
```yaml test.yaml theme={null}
name: My Test
task: Verify feature works correctly
expected_result: Feature should work
hooks:
before:
- helper: createTestUser
args: ["John", "Doe"]
as: userId
- helper: createOrder
args: ["{{userId}}", "Premium Plan"]
as: orderId
after:
- helper: deleteOrder
args: ["{{orderId}}"]
- helper: deleteUser
args: ["{{userId}}"]
```
## Hook Definition Fields
Name of the exported function to call.
Path to TypeScript file containing the helper function.
Array of arguments to pass to the function.
Variable name to store the result for later use.
## Creating Helper Functions
### Default Location
Create a `.bugster/hooks.ts` file in your project:
```typescript .bugster/hooks.ts theme={null}
export async function createTestUser(
firstName: string,
lastName: string,
): Promise {
// Create user via API or database
const response = await fetch("https://api.example.com/users", {
method: "POST",
body: JSON.stringify({ firstName, lastName }),
});
const user = await response.json();
return user.id; // This becomes available as {{userId}}
}
export async function deleteUser(userId: string): Promise {
await fetch(`https://api.example.com/users/${userId}`, {
method: "DELETE",
});
}
```
### Custom File Locations
You can specify helpers from any TypeScript file in your project:
```yaml theme={null}
hooks:
before:
- helper: getStoreBySlug
file_path: apps/e2e/helpers/stores.ts
args: ["acme-electronics"]
as: storeId
- helper: createProductWithParams
file_path: apps/e2e/helpers/products.ts
args: ["{{productName}}", "{{price}}", "{{storeId}}"]
as: productId
```
## Template Variables
Use `{{variableName}}` to reference values from previous hooks:
### Simple Access
```yaml theme={null}
- helper: createOrder
args: ["{{userId}}", 100]
as: orderId
```
### Nested Object Access
```yaml theme={null}
- helper: getShippingAddress
args: ["{{customerId}}"]
as: address
- helper: createShipment
args: ["{{address.zipCode}}", "{{address.country}}"]
```
### Array Access
```yaml theme={null}
- helper: getAvailableCoupons
as: coupons
- helper: applyCoupon
args: ["{{coupons[0].code}}"]
```
## Passing Hook Data to Tests
Hook results are passed to the test as `hook_context`. Reference them in your test steps using `{{data.variableName}}`:
```yaml theme={null}
name: Create and verify product
hooks:
before:
- helper: generateProductName
as: productName
task: Create a product named {{data.productName}} and verify it appears in the catalog
expected_result: Product {{data.productName}} should be visible in the products table
```
## Execution Behavior
### Before Hooks
Before hooks run sequentially before test execution. If any before hook fails,
the test fails with the hook error. Results are stored in context for
subsequent hooks.
### After Hooks
After hooks run after test completion, regardless of test result. Failures are
logged but don't affect the test result. Use after hooks for cleanup
operations.
## Complete Example
```yaml test.yaml theme={null}
name: Customer applies discount coupon to cart
page: /checkout
hooks:
before:
# Get store data
- helper: getStoreBySlug
file_path: apps/e2e/helpers/stores.ts
args: ["acme-electronics"]
as: storeId
# Get related entities (using previous result)
- helper: getDefaultCategoryByStoreId
file_path: apps/e2e/helpers/categories.ts
args: ["{{storeId}}"]
as: category
- helper: getPaymentMethodByStoreName
file_path: apps/e2e/helpers/payments.ts
args: ["acme-electronics"]
as: paymentMethod
# Create test data
- helper: createProductByApi
file_path: apps/e2e/helpers/products.ts
args:
[
"{{productName}}",
"{{category}}",
"{{paymentMethod.id}}",
"{{storeId}}",
]
as: productId
- helper: createCustomerWithParams
file_path: apps/e2e/helpers/customers.ts
args: ["{{email}}", "{{firstName}}", "{{storeId}}"]
as: customerId
after:
# Clean up in reverse order
- helper: removeCartItemsByApi
file_path: apps/e2e/helpers/cart.ts
args: ["{{customerId}}", "{{cartId}}"]
- helper: deleteProductByApi
file_path: apps/e2e/helpers/products.ts
args: ["{{productId}}", "{{storeId}}"]
task: Verify customer can apply discount coupon to cart with existing product
steps:
- Login as test.user@example.com with password SecurePass123!
- Select store Acme Electronics
- Navigate to Products section
- Search for the created product by name
- Click on product card to open details
- Click Add to Cart button
- Navigate to Checkout
- Enter coupon code in discount field
- Click Apply button
expected_result: Discount appears in cart summary with updated total
```
## Requirements
Node.js must be installed for hooks to run. TypeScript helpers require `tsx`
which is installed automatically via npx.
For path aliases in tsconfig.json, install `tsconfig-paths`:
```bash theme={null}
npm install -D tsconfig-paths
```
## Troubleshooting
Create `.bugster/hooks.ts` in your project root or specify the correct `file_path` for each hook.
If you're using path aliases in your tsconfig.json, install `tsconfig-paths`:
```bash theme={null}
npm install -D tsconfig-paths
```
Ensure your helper function returns a value. Check that you're returning the
correct data type.
Check your helper function for errors. Verify that any external APIs or databases are accessible.
# Local Development Workflow
Source: https://docs.bugster.dev/guides/local-development
Best practices for running Bugster during development to validate features and catch issues early
Learn how to integrate Bugster into your daily development workflow for faster feedback, better UX validation, and confident feature delivery.
Discover the most effective ways to use Bugster locally while developing, from quick smoke tests to comprehensive UX validation with AI feedback.
## Development Workflow Overview
You just finished implementing a new checkout flow.
```javascript theme={null}
const Payment = (paymentData) => {
// Your new feature code
}
```
Test your new checkout flow immediately to catch obvious issues:
```bash theme={null}
# Test only what changed
bugster run --only-affected
# Or test specific checkout flows
bugster run --quick "Test the new checkout"
```
The destructive agent tries to break your new checkout functionality, giving you issues if found:
```bash theme={null}
# Agent attempts to break your checkout flow
bugster destructive
```
Make sure your checkout changes didn't break other flows:
```bash theme={null}
# Test only what might be affected by your changes
bugster run --only-affected
```
## Common Local Testing Scenarios
### 1. Quick Feature Validation
After implementing a new feature, quickly test it to ensure it works:
```bash theme={null}
# Test only affected areas (based on git changes)
bugster run --only-affected
# Quick smoke test with limited tests
bugster run --limit 5 --headless
```
Use `--only-affected` to run only tests related to your recent changes, saving time and credits during development.
### 2. Comprehensive Regression Testing
Before committing major changes, run a broader test suite:
```bash theme={null}
# Full regression in background (headless)
bugster run --headless --parallel 8 --limit 20
# All tests with detailed logging for debugging
bugster run --verbose --limit 15
# Silent run for clean output
bugster run --silent --parallel 6
```
### 3. Interactive Development Testing
When you want to watch tests run and debug issues:
```bash theme={null}
# Watch tests in real browser with detailed logs
bugster run --headless --verbose --limit 10
# Debug specific test scenarios
bugster run --headless --parallel 1 --verbose
```
You might want to use `--headless` when first learning, but prefer headless mode for better concentration during development.
## Additional Testing Options
### Destructive Agent
The agent tries to break your interface and reports issues:
```bash theme={null}
# Run destructive testing
bugster destructive
```
### Natural Language Testing
Ask Bugster to test something specific using natural language:
```bash theme={null}
# Test a component you just built
bugster run --quick "Test this component I just built"
# Test specific functionality
bugster run --quick "Check if the search works with empty results"
```
## Next Steps
Customize your config.yaml for optimal local development settings
Learn how to integrate Bugster with Cursor for AI-powered development
This workflow optimizes for fast feedback during development. For production testing strategies, see our [CI/CD Integration Guide](/integrations/github).
# Add credentials, roles & permissions
Source: https://docs.bugster.dev/guides/test-management/credentials-and-roles
Configure authentication profiles for different user roles in your tests using environment variables and secure credential management.
Adding credentials, roles, and permissions in Bugster is simple and explicit.
Define multiple credential profiles in config.yaml, keep secrets in environment variables, reference a profile per test with credential\_id, and—if you use the GitHub App—mirror the same variables in your project settings for CI runs.
Bugster doesn’t grant permissions itself; your application enforces them. Bugster simply logs in with the chosen profile so each test runs under the correct role
* Bugster CLI installed and authenticated.
* Access to your app's user accounts with different permission levels.
* For CI/CD: Bugster GitHub App installed or access to CI secret management.
## 1. Add credentials in config.yaml
Create one entry per login profile (each maps to an app role). Use env vars—don't hard-code secrets.
```yaml theme={null}
# bugster/config.yaml
project_name: nextjs-app-demo
project_id: nextjs-app-demo-1755891784
base_url: "http://localhost:3001"
credentials:
- id: user
username: ${BUGSTER_USERNAME}
password: ${BUGSTER_PASSWORD}
- id: superadmin
username: ${BUGSTER_USERNAME_SUPERADMIN}
password: ${BUGSTER_PASSWORD_SUPERADMIN}
```
`id` is the handle you'll reference from tests (e.g., `superadmin`).
## 2. Provide secrets locally (.bugster/.env)
Add the variables to your local Bugster env file.
```bash theme={null}
# .bugster/.env
BUGSTER_USERNAME=user@bugster.dev
BUGSTER_PASSWORD=Password
BUGSTER_USERNAME_SUPERADMIN=superadmin@bugster.dev
BUGSTER_PASSWORD_SUPERADMIN=PasswordSuperadmin
```
## 3. Use a credential in a test
Point the test to the desired profile via `credential_id`.
```yaml theme={null}
name: Home page navigation - Hello component
page: /
page_path: app/page.tsx
credential_id: superadmin
task: Navigate from home page to dashboard
steps:
- Visit the home page
- Verify that the Hello component is rendered on the screen
- Verify that no dashboard navigation links or buttons are present on the page
expected_result: User should see the Hello component rendered instead of dashboard navigation
```
The value must match a `credentials[].id` in `config.yaml`.
## 4. If you use the Bugster GitHub App (CI/CD)
For cloud runs to authenticate, mirror these env vars in your project's settings or your CI secrets.
Open your project in `app.bugster.dev` → Settings.
Add the same keys/values you used locally (e.g., `BUGSTER_USERNAME_SUPERADMIN`, `BUGSTER_PASSWORD_SUPERADMIN`).
Save and re-run your job/PR.
## 5. Quick validation
Run a test that specifies `credential_id` and watch the login succeed:
```bash theme={null}
bugster run .bugster/tests/path/to/test.yaml
```
If a variable is missing/empty, fix it in `.bugster/.env` or CI secrets and re-run.
## 6. Best practices
**Security & Organization:**
* **One profile per app role.** Name ids by role (`user`, `manager`, `superadmin`) for clarity.
* **Never commit secrets.** Keep them in env files or CI secret stores, not in Git.
* **Keep least privilege.** Tests that don't need admin rights should use `user`, not `superadmin`.
* **Document intent.** Add a short comment near each credential entry describing what the role can do.
### Example with role documentation
```yaml theme={null}
credentials:
# Standard user - can view own data, basic operations
- id: user
username: ${BUGSTER_USERNAME}
password: ${BUGSTER_PASSWORD}
# Manager - can view team data, approve requests
- id: manager
username: ${BUGSTER_USERNAME_MANAGER}
password: ${BUGSTER_PASSWORD_MANAGER}
# Super admin - full system access, user management
- id: superadmin
username: ${BUGSTER_USERNAME_SUPERADMIN}
password: ${BUGSTER_PASSWORD_SUPERADMIN}
```
# File Upload Testing
Source: https://docs.bugster.dev/guides/test-management/file-upload
Learn how Bugster can upload any type of file to your application during test execution with a simple workflow.
This guide explains how to enable file uploads during test runs. Bugster can upload any type of file to your application during a test. See use cases below for examples.
**The workflow is simple**: upload the files you want Bugster to use during the test, tell Bugster which file you want to use, and you're ready to go.
## Workflow
Go to your project in the Bugster App → Settings → File Management and upload your test files.
Upload any files you want to use during testing. Supported formats include documents, images, code files, etc.
Add the `files:` field at the root level of your test and list the exact filenames as they appear in the File Management section.
```yaml theme={null}
name: Upload file attachment
page: /upload
files:
- sample.csv
task: Upload a CSV file through the file picker
steps:
- Navigate to the upload page
- Click the "Choose File" button
- Select a file to upload
- Verify "sample.csv" appears in the file list
expected_result: File is successfully attached and visible in the UI
```
File names are case-sensitive and must match exactly as they appear in the File Management section.
Execute your test normally. Bugster automatically handles file attachment during test execution.
```bash theme={null}
bugster run .bugster/tests/upload-test.yaml
```
Bugster will automatically attach the specified file to any file picker in your UI during the test.
## File management
All test files are stored in the Bugster App under Project → Settings → File Management. This centralized approach ensures:
* **Universal availability**: Files work in local development and CI/CD
* **Team collaboration**: Shared access across team members
* **Secure storage**: Files are stored securely with direct URL access
* **Easy management**: Upload, view, and delete files through the web interface
Files uploaded to the File Management are automatically available for all test environments without additional configuration.
## Test examples
### Single file upload
Test uploading a single file through a file picker:
```yaml theme={null}
name: Document upload via file picker
page: /documents
files:
- contract.pdf
task: Upload a PDF document using the file picker
steps:
- Navigate to the documents page
- Click the "Upload Document" button
- Select a file from the picker
- Wait for upload progress to complete
- Verify "contract.pdf" appears in the document list
expected_result: Document is successfully uploaded and listed
```
### Multiple file upload
Test uploading multiple files simultaneously:
```yaml theme={null}
name: Bulk file upload
page: /gallery
files:
- photo1.jpg
- photo2.jpg
- photo3.jpg
task: Upload multiple images to gallery
steps:
- Navigate to the gallery page
- Click "Add Photos" button
- Select multiple files for upload
- Verify all three images appear in the upload queue
- Wait for batch upload to complete
expected_result: All three photos are successfully added to the gallery
```
### Image upload with preview
Test image uploads that show preview functionality:
```yaml theme={null}
name: Profile picture upload
page: /profile
files:
- avatar.png
task: Upload and preview profile picture
steps:
- Navigate to the profile page
- Click "Change Avatar" button
- Select "avatar.png" from the file picker
- Wait for the upload to process
- Verify the image preview is displayed
expected_result: New avatar is shown in the profile section
```
## File naming and organization
File references in YAML are case-sensitive and must include the file extension.
### Naming best practices
* Use descriptive names: `user-avatar.png` instead of `img1.png`
* Include file extensions: `data.csv`, `report.pdf`
* Avoid spaces and special characters: use hyphens or underscores
* Keep names concise but meaningful
Use the exact filename as it appears in the Bugster App File Management interface.
## Best practices
* **Use synthetic data**: Never include real user data or PII in test files
* **Keep files lightweight**: Use small files for faster test execution
* **Test edge cases**: Include files with different formats, sizes, and names
* **Upload to File Management**: All files must be uploaded through the web interface
* **Verify upload states**: Test loading indicators and progress bars
* **Check error handling**: Test with invalid file types or oversized files
* **Validate UI feedback**: Ensure success messages and file lists update correctly
* **Test accessibility**: Verify keyboard navigation and screen reader support
* **Centralized storage**: All files are managed through File Management interface
* **Team sharing**: Files are accessible to all team members
* **Clean up regularly**: Remove unused files to keep storage organized
* **Use Copy YAML**: Leverage the copy button for accurate file references
## Troubleshooting
### Common issues and solutions
**Problem:** Test fails with "file not found" error.
**Solution:**
1. Verify the file is uploaded in Bugster App → Project → Settings → File Management
2. Check the filename matches exactly (case-sensitive)
3. Ensure the file extension is included in the YAML reference
```yaml theme={null}
files:
- sample.csv # ✅ Correct: includes extension
- sample # ❌ Wrong: missing extension
```
**Problem:** Clicking the upload button doesn't open the file picker.
**Solution:**
1. Verify user authentication and permissions
2. Check that any required form fields are completed
3. Ensure the UI is in the correct state for file uploads
4. Look for disabled states or loading conditions
```yaml theme={null}
steps:
- Log in with valid credentials
- Navigate to the upload page
- Fill in required form fields
- Click the "Choose File" button
```
**Problem:** Test selects a different file than expected.
**Solution:**
1. Use the "Copy YAML" button in the File Management for exact filename
2. Verify no duplicate filenames exist in your file storage
3. Check that the filename in YAML matches the uploaded file exactly
```yaml theme={null}
files:
- Frame1410087848.png # ✅ Exact filename from File Management
```
## Advanced scenarios
### Testing file validation
Test your application's file validation logic:
```yaml theme={null}
name: File type validation
page: /upload
files:
- invalid.txt
- valid-image.jpg
task: Test file type validation
steps:
- Navigate to upload page
- Attempt to upload "invalid.txt"
- Verify error message appears
- Upload "valid-image.jpg"
- Verify successful upload
expected_result: Invalid files are rejected with clear error messages
```
### Testing file size limits
```yaml theme={null}
name: File size limit validation
page: /upload
files:
- large-file.pdf
task: Test file size restrictions
steps:
- Navigate to upload page
- Attempt to upload "large-file.pdf"
- Verify size limit error message
- Check that upload is prevented
expected_result: Large files are rejected with appropriate error message
```
Your file upload tests are now ready! Upload files to the File Management, reference them in your YAML, and run tests with file upload capabilities.
# Generating and managing tests
Source: https://docs.bugster.dev/guides/test-management/manage-tests
How to create, modify, and remove tests in Bugster.
Generating tests in Bugster is simple and flexible. The approach depends on your framework: Next.js and React have enhanced automatic generation with routing analysis, while Angular, Svelte, Vue, and other frameworks use AI-assisted generation. All frameworks support manual YAML creation for precise scenarios. Once created, tests are easy to edit and delete as your application evolves.
**Framework-specific generation**: Next.js and React use `bugster generate` with routing analysis. Angular, Svelte, Vue, and other frameworks use AI assistance with Cursor or Claude Code.
In this guide you will learn:
1. [How to generate tests](#1-generate-tests-3-ways)
2. [The required test morphology](#2-test-morphology-in-bugster)
3. [How to edit any test field and validate changes](#3-editing-an-existing-test)
4. [How to delete tests](#4-deleting-tests)
* 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, with availability depending on your framework:
| If you want to… | Use | Available For | Why |
| :------------------------------- | :---------------------------- | :-------------- | :------------------------------------------------ |
| Seed broad coverage fast | Automatic `bugster generate` | Next.js & React | Highest coverage per minute with routing analysis |
| Generate targeted scenarios | `bugster generate --prompt` | Next.js & React | AI-guided generation with custom focus |
| Capture a very specific scenario | Manual YAML | All frameworks | Full control over task/steps/expected\_result |
| Write/refine with an AI editor | Assisted (Claude Code/Cursor) | All frameworks | AI-powered generation with Agent rules |
### 1.1 Automatic (bulk) — `bugster generate`
**Available for:** Next.js and React applications with enhanced routing analysis.
Bugster can **propose and create** many tests across your app or for specific pages using automatic route discovery.
**Commands:**
```bash theme={null}
# Bulk auto-generation (across some pages)
bugster generate
# Generate for specific pages (using source file paths)
bugster generate --page path/to/page.tsx path/to/another/page.tsx
# Generate N tests distributed across pages
bugster generate --count 10
# Combine: 13 tests for a specific page
bugster generate --count 13 --page path/to/page.tsx
# Generate with custom AI guidance (requires --page)
bugster generate --page path/to/page.tsx --prompt "Focus on edge cases and error handling"
# Combine count, page, and custom prompt
bugster generate --count 5 --page path/to/page.tsx --prompt "Test form validation and user input scenarios"
```
* **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:**
1. **Content:** follow the **YAML morphology** (see next section).
2. **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`)
**Suggested template (copy/paste):**
```yaml theme={null}
name: User details page navigation
page: /dashboard/users
page_path: app/dashboard/users/page.tsx
task: Navigate from users list to a specific user's details page
steps:
- Navigate to the dashboard users page
- Click on a specific user from the list
- Verify that the user is redirected to the user details page
- Verify that the user details are displayed correctly
expected_result: User should be redirected to the specific user's details page
```
**Run your manual test to validate it:**
```bash theme={null}
bugster run relative_path_to_my_test.yaml
```
### 1.3 Assisted (Claude Code / Cursor)
**Available for:** Angular, Svelte, Vue, and other frameworks (including Nuxt, SvelteKit, Remix, Preact, and more).
Use AI coding assistants like Cursor or Claude Code to generate Bugster-compliant test specifications with intelligent guidance using Bugster Agent rules.
**Advantages:**
* **AI-powered**: Intelligent test scenario generation
* **Compliant**: Follows Bugster YAML structure using Agent rules
* **Fast**: Quicker than manual YAML writing
* **Flexible**: Works with any framework or routing pattern
* **Guided**: Built-in best practices and validation
See the complete setup instructions for using Bugster with Cursor or Claude Code
## 2. Test morphology in Bugster
> Definition: the minimal structure Bugster expects in a test.
```yaml theme={null}
name: Title of the test
page: Main page path of the test in /folder/subfolder format, e.g. "/dashboard/users"
page_path: Source path of the page, e.g. app/dashboard/users/page.tsx
credential_id (optional): The credential/role/permission you want Bugster to use.
task: The goal the test must achieve
steps:
- General or specific steps
- What you want the agent to do to achieve the task
- Because there can be multiple paths to the same goal
expected_result: What the agent should verify to confirm the goal was achieved
```
**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).
Here's an example of a good vs. a bad `expected_result`:
```yaml ❌ Vague theme={null}
expected_result: The page works
```
```yaml ✅ Observable theme={null}
expected_result: The URL includes "/users/123" and an element with text "User details" is visible
```
**Example:**
```yaml theme={null}
name: User details page navigation
page: /dashboard/users
page_path: app/dashboard/users/page.tsx
task: Navigate from users list to a specific user's details page
steps:
- Navigate to the dashboard users page
- Click on a specific user from the list
- Verify that the user is redirected to the user details page
- Verify that the user details are displayed correctly
expected_result: User should be redirected to the specific user's details page
```
## 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.
**Before/after example:**
```yaml theme={null}
name: User details page navigation
page: /dashboard/users
page_path: app/dashboard/users/page.tsx
task: Navigate from users list to a specific user's details page
steps:
- Navigate to the dashboard users page
- Click on a specific user from the list
- Verify that the user is redirected to the user details page
- Verify that the user details are displayed correctly
expected_result: User should be redirected to the specific user's details page
```
```yaml theme={null}
name: User details view
page: /dashboard/users
page_path: app/dashboard/users/page.tsx
task: Navigate from users list to any user's details page
steps:
- Navigate to the dashboard users page
- Click on any user from the list
- Verify that the user is redirected to the user details page
expected_result: User should be redirected to any user's details page
```
Recommendation: run the test again to confirm the changes are honored:
```bash theme={null}
bugster run relative_path_to_my_test.yaml
```
## 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`).
**Mapping example:**
If your test declares `page_path: app/dashboard/users/page.tsx`, the recommended location is:
```
.bugster/tests/dashboard/users/test.yaml
```
**File naming:**
* use **snake\_case**, lowercase, descriptive.
* If `name: Navigation back to home from about page`, the recommended file name is:
```
navigation_back_to_home_from_about_page.yaml
```
# OTP authentication
Source: https://docs.bugster.dev/guides/test-management/otp-authentication
Configure one-time password (OTP) authentication for Bugster to test apps with email-based login codes.
Bugster authenticates to your app like a real user to run tests. Besides [username/password](/guides/test-management/credentials-and-roles), Bugster supports **OTP (One-Time Password)**—temporary codes sent via email during login.
Bugster provides a managed email address with access to incoming OTPs. You create an account in your app using this email.
## Setup
Contact Bugster support or check your dashboard to obtain your dedicated OTP email address.
Register a new user in your application using the Bugster OTP email.
```yaml theme={null}
credentials:
- id: otp-user
email: ${BUGSTER_OTP_EMAIL}
auth_type: otp
```
```bash theme={null}
# .bugster/.env
BUGSTER_OTP_EMAIL=your.bugster.email@...
```
If using CI/CD, go to **Projects → Settings → Environment Variables** and add:
```
BUGSTER_OTP_EMAIL=your.bugster.email@...
```
## Use OTP in tests
Add these fields to any test requiring OTP authentication:
```yaml theme={null}
name: Dashboard access
page: /dashboard
credential_id: otp-user
requires_login: true
task: Verify dashboard loads after OTP login
steps:
- Navigate to dashboard
- Verify content is displayed
expected_result: Dashboard renders successfully
```
All tests with the same `credential_id` and `requires_login: true` share one authenticated session. Bugster logs in once, then reuses the session for subsequent tests. See [Session Persistence](/guides/test-management/session-persistence) for details.
## Next steps
Configure username/password authentication
Share login sessions across tests
# Persist login sessions across tests
Source: https://docs.bugster.dev/guides/test-management/session-persistence
Configure tests to share authenticated sessions, eliminating redundant logins and speeding up your test suite.
When you have multiple tests that require authentication, Bugster can log in once and reuse that session across all tests that need it. This eliminates redundant login steps, speeds up your test suite, and makes tests more reliable.
Tests with `requires_login: true` share an authenticated session. Bugster logs in once using the specified `credential_id`, then each subsequent test starts already authenticated—no repeated login flows.
## Prerequisites
Before using session persistence, you need:
1. **Credentials configured** in your `config.yaml` — see [Add credentials, roles & permissions](/guides/test-management/credentials-and-roles)
2. **Environment variables** set with your login secrets
## Configure a test to require login
Add two fields to your test YAML:
```yaml theme={null}
name: Dashboard data export
page: /dashboard
page_path: app/dashboard/page.tsx
credential_id: user
requires_login: true
task: Export dashboard data as CSV
steps:
- Navigate to the dashboard
- Click the export button
- Select CSV format
- Verify the download starts
expected_result: CSV file download should begin automatically
```
The ID of the credential profile to use for authentication. Must match a `credentials[].id` in your `config.yaml`.
Set to `true` to indicate this test needs an authenticated session. Bugster will ensure the user is logged in before the test begins.
## How session persistence works
Bugster detects `requires_login: true` and `credential_id: user`. It performs the login flow using the credentials from `config.yaml`.
After successful authentication, Bugster stores the session (cookies, tokens, local storage) for reuse.
Any other test with the same `credential_id` and `requires_login: true` will start with the cached session—no login flow needed.
Session persistence works per `credential_id`. If you have tests using different credentials (e.g., `user` vs `admin`), Bugster maintains separate sessions for each.
**Sessions are regenerated on each `bugster run` command.** The cached session only persists within a single test run. When you execute `bugster run` again, Bugster will perform a fresh login for the first test that requires it.
## Example: Multiple tests sharing a session
Here's how a typical test suite might look with session persistence:
### config.yaml
```yaml theme={null}
project_name: my-app
project_id: my-app-123
base_url: "http://localhost:3000"
credentials:
- id: user
username: ${BUGSTER_USERNAME}
password: ${BUGSTER_PASSWORD}
- id: admin
username: ${BUGSTER_ADMIN_USERNAME}
password: ${BUGSTER_ADMIN_PASSWORD}
```
### Test 1: View profile (user)
```yaml theme={null}
name: View user profile
page: /profile
credential_id: user
requires_login: true
task: View and verify profile information
steps:
- Navigate to profile page
- Verify username is displayed
- Verify email is displayed
expected_result: Profile page shows correct user information
```
### Test 2: Edit profile (user)
```yaml theme={null}
name: Edit user profile
page: /profile/edit
credential_id: user
requires_login: true
task: Update profile display name
steps:
- Navigate to profile edit page
- Change display name
- Save changes
- Verify success message
expected_result: Profile updates successfully with confirmation message
```
### Test 3: Admin dashboard (admin)
```yaml theme={null}
name: Admin user management
page: /admin/users
credential_id: admin
requires_login: true
task: View user list in admin panel
steps:
- Navigate to admin users page
- Verify user list is displayed
- Check pagination works
expected_result: Admin can see and navigate the user list
```
In this example, **Test 1** and **Test 2** share the same `user` session—Bugster logs in once. **Test 3** uses a different credential (`admin`), so it gets its own login session.
## When to use session persistence
* Your test interacts with authenticated-only pages
* You're testing features behind a login wall
* You want to verify user-specific data or permissions
* You're running multiple tests that all need the same authenticated state
* The test is for public/unauthenticated pages
* You're testing the login flow itself
* The test explicitly needs to start logged out
## Performance benefits
Session persistence significantly reduces test execution time:
| Scenario | Without persistence | With persistence |
| ------------------------ | --------------------------- | ---------------- |
| 10 tests requiring login | 10 login flows (\~30s each) | 1 login flow |
| Total login overhead | \~5 minutes | \~30 seconds |
**Pro tip:** Group tests by `credential_id` when running your suite. This maximizes session reuse and minimizes total execution time.
## Troubleshooting
* Verify `credential_id` matches exactly with a `credentials[].id` in `config.yaml`
* Check that environment variables are set correctly in `.bugster/.env`
* Ensure the login page and flow haven't changed
* Confirm both tests have `requires_login: true`
* Verify both tests use the same `credential_id`
* Check if your app has aggressive session timeouts
* Double-check the `credential_id` in your test file
* Verify environment variables point to the correct credentials
* Ensure you're not mixing up credential IDs between environments
## Next steps
Set up multiple credential profiles for different user roles
Learn how to organize and run your test suite effectively
# How to update your tests
Source: https://docs.bugster.dev/guides/test-management/update-test-suite
Sync your suite with product changes by creating, modifying, and removing tests via `bugster update`.
Keep your test suite synchronized with code changes. The approach depends on your framework: Next.js and React can use the automatic `bugster update` command, while Angular, Svelte, Vue, and other frameworks use AI-assisted updates with Cursor or Claude Code.
**Framework-specific updates**: Next.js and React use `bugster update` command with automatic routing analysis. Angular, Svelte, Vue, and other frameworks use AI assistance with Cursor or Claude Code Agent rules.
In this guide you will learn:
* How to keep your test suite synchronized with your codebase.
* How to use different update modes for local development and CI workflows (Next.js & React).
* How to use AI-assisted updates for other frameworks (Angular, Svelte, Vue & Others).
- Bugster CLI installed and authenticated.
- Run commands from your repo root (the directory containing `/.bugster/`).
- For Next.js & React PR automation: the Bugster GitHub App is installed on the repo (document required permissions) and PR previews are available if your flow depends on them.
## Framework-Specific Approaches
**Automatic `bugster update` Command**
Next.js and React applications can use the `bugster update` command to automatically:
* Create tests for new functionality
* Modify tests impacted by code changes
* Delete tests for removed features
Available both locally on demand and automatically on pull requests via the GitHub App.
Continue reading below for detailed usage instructions.
**AI-Assisted Updates with Cursor or Claude Code**
For Angular, Svelte, Vue, and other frameworks (including Nuxt, SvelteKit, Remix, Preact, and more), test updates are handled through AI coding assistants:
* Use Cursor or Claude Code with Bugster Agent rules
* AI assistant analyzes your code changes and updates tests accordingly
* Provides intelligent suggestions for test modifications
* Works with any framework or routing pattern
See the complete setup instructions for using Bugster with Cursor or Claude Code
## Usage Modes (Next.js & React)
### Local (manual)
**Available for:** Next.js and React applications with enhanced routing analysis.
Run `bugster update` when you're confident about local changes and ready to sync them. The command analyzes **committed changes only** - both staged and unstaged files are ignored. Only differences between commits are considered for test updates.
```bash Full update theme={null}
# Full update (create/modify/delete as needed)
bugster update
```
```bash Scope behavior theme={null}
# Only modify existing tests
bugster update --update-only
# Only create new tests
bugster update --suggest-only
# Only remove obsolete tests
bugster update --delete-only
```
**Scope flag precedence:** If multiple scope flags are provided, the command will error and ask you to specify only one scope option.
### Automatic on Pull Requests
**Available for:** Next.js and React applications with the Bugster GitHub App installed.
When you open a Pull Request, Bugster's E2E agent runs `bugster update` first. New commits or force-pushes will **amend the existing Update PR** rather than creating a new one.
Bugster opens a secondary PR targeting your feature branch with the suggested test suite changes.
The original PR gets a comment with the test results and a link to the "Bugster Update PR".
You approve and merge the "Bugster Update PR".
Once the test updates are in, you can merge your feature branch.
Remember to review the Bugster Update PR **before** merging your feature.
Here is a summary of the flow:
```text theme={null}
You create a PR → bugster update runs → Bugster opens "Update PR" →
Bugster comments results in original PR → you review/merge Update PR → merge feature PR
```
## Comparison Baselines (Next.js & React)
Choose the comparison model that fits your development stage:
| Baseline | Use When | Command |
| :-------------------- | :------------------------------------ | :------------------------------------- |
| Last commit (default) | Small, isolated edits | `bugster update` |
| Default branch | Before PR / comprehensive sweep | `bugster update --against-default` |
| Since last update | Tight inner loop without reprocessing | `bugster update --against-last-update` |
### Last commit (default)
*When to use: Small, isolated edits*
```bash theme={null}
bugster update
```
**Scope:** Compares your latest commit against the previous commit. Only sees files changed in your most recent commit.
### Against default branch
*When to use: Before PR / comprehensive sweep*
```bash theme={null}
bugster update --against-default
```
**Scope:** Compares your current branch against the merge-base with the default branch (e.g., `main`). Sees all changes in your feature branch.
### Since last update
*When to use: Tight inner loop without reprocessing*
```bash theme={null}
bugster update --against-last-update
```
**Scope:** Compares changes since the last time you ran `bugster update`. The "last update" state is stored in `.bugster/state/last-update-hash` and tracks the commit hash from your previous update.
## Recommended Workflow (Next.js & React)
| Scenario | Command | Use Case |
| :------------------------ | :------------------------------------- | :------------------------------ |
| During active development | `bugster update --against-last-update` | Tight feedback loop |
| Before opening a PR | `bugster update --against-default` | Final, comprehensive sweep |
| For small, isolated edits | `bugster update` | Default mode usually sufficient |
## Workflow for Other Frameworks
For Angular, Svelte, Vue, and other frameworks:
| Scenario | Approach | Use Case |
| :------------------ | :------------------------------------------------- | :--------------------------------------------- |
| Test updates needed | Use Cursor or Claude Code with Bugster Agent rules | AI-assisted test updates based on code changes |
| Review and refine | AI coding assistant + manual review | Ensure tests match your changes |
| Commit test changes | Standard git workflow | Keep tests in sync with code |
## Examples (Next.js & React)
Here are common scenarios and the commands to use for Next.js and React applications.
```bash theme={null}
# Create/modify/delete as needed for just-touched files
bugster update
```
```bash theme={null}
# Full branch comparison before PR
bugster update --against-default
```
```bash theme={null}
# Tight inner loop; don't reprocess old changes
bugster update --against-last-update
```
```bash theme={null}
# Limit to modifications only (no new/deleted tests)
bugster update --update-only
```
```bash theme={null}
# Generate suggestions for new areas only
bugster update --suggest-only
```
```bash theme={null}
# Purge tests tied to removed features
bugster update --delete-only
```
```bash theme={null}
# Combine scope + baseline
bugster update --against-default --update-only
```
## Review Tips
**For Next.js & React:**
* Always review the Update PR diff before merging.
* Keep descriptive commit messages (e.g., `bugster: update tests for billing portal flow`).
* If a change looks incorrect, adjust the code or the test, rerun `bugster update`, and re-review.
**For Angular, Svelte, Vue & Others:**
* Review AI-generated test updates in your coding assistant.
* Ensure tests accurately reflect your code changes.
* Commit test updates alongside your feature changes.
## Summary
**Next.js & React**: Use the `bugster update` command to keep your test suite aligned with code changes—locally or automatically on every PR.
**Angular, Svelte, Vue & Others**: Use AI-assisted updates with Cursor or Claude Code Agent rules for intelligent test synchronization.
# Platform Workflow & Migration
Source: https://docs.bugster.dev/guides/workflow/platform-workflow
Understand how the Bugster platform works end-to-end. Create tests from the CLI or the web app, organize them into suites, and run them across environments.
Bugster is a full platform that connects your local development environment with a collaborative web app. The **web app is the source of truth** for your test suite, while the **CLI** lets developers pull tests locally, edit them with coding agents, and push changes back.
This guide covers the complete workflow, from creating your first test to running suites across environments, and includes a migration path for existing CLI users.
## How Bugster Works
Bugster has two interfaces that work together:
| Interface | Who it's for | What it does |
| :---------- | :--------------------------------- | :-------------------------------------------------------------------------------------- |
| **Web App** | Everyone (QA, product, developers) | Create tests, organize suites, schedule runs, watch live execution, manage environments |
| **CLI** | Developers | Pull tests locally, edit with coding agents, run tests, push changes back |
The web app is the single source of truth. Multiple team members can create and edit tests from either interface, and everything stays in sync through `bugster push` and `bugster pull`.
## Creating Tests
You have three approaches to creating tests, depending on your role and preference.
### Option 1: Coding Agents (CLI)
Developers can use [Cursor](/guides/coding-agents/cursor) or [Claude Code](/guides/coding-agents/claude-code) to create and edit tests in YAML format with human-readable instructions. The workflow is:
Bring the latest tests from Bugster into your local environment:
```bash theme={null}
bugster pull
```
This creates (or updates) the `.bugster/` folder with all tests, configuration, and metadata.
Your coding agent can read and modify tests in the `.bugster/` folder. Tests are YAML files with natural language instructions that any developer can understand.
```text theme={null}
@bugster-generate Create a test for the checkout flow
```
```text theme={null}
@bugster-update Update the login test to handle MFA
```
```text theme={null}
@BUGSTER_GENERATE Create a test for the checkout flow
```
```text theme={null}
@BUGSTER_UPDATE Update the login test to handle MFA
```
Install the coding agent rules first with `bugster plugin --agent cursor` or `bugster plugin --agent claude`. See the full setup in the [Cursor integration guide](/guides/coding-agents/cursor) or [Claude Code integration guide](/guides/coding-agents/claude-code).
Validate your tests before pushing:
```bash theme={null}
bugster run
```
You can also run a quick one-off test in natural language:
```bash theme={null}
bugster run --quick "Verify the signup form validates email format"
```
Sync your local test changes back to Bugster so they appear in the web app:
```bash theme={null}
bugster push
```
### Option 2: Web App
QA engineers, product managers, and anyone on the team can create tests directly in the web app without touching a terminal. The web app includes an embedded browser so you can watch tests execute in real time.
There are three ways to create tests in the web app:
Describe what you want to test in plain English, just like asking an assistant. Bugster's AI agent interprets your intent and generates the test.
**Example prompt:**
> Test that a new user can sign up with email, verify their account, and see the onboarding wizard.
For more control, specify the task, steps, and expected result explicitly. This gives the agent precise guidance on what to do and what to verify.
**Example:**
* **Task:** Verify the password reset flow
* **Steps:**
1. Navigate to the login page
2. Click "Forgot password"
3. Enter a registered email address
4. Submit the form
* **Expected result:** A confirmation message appears saying "Reset link sent to your email"
If you already have a test suite in another test management platform (TestRail, Zephyr, qase, etc.), you can migrate your existing tests into Bugster. Reach out to the team and we can help you import your suite.
### Option 3: CLI Quick Tests
Run one-off tests directly from the terminal using natural language, without creating a YAML file:
```bash theme={null}
bugster run --quick "Check that the pricing page loads and shows three plan options"
```
This is useful for quick validation during development. See the [local development guide](/guides/local-development) for more patterns.
## Test Suites
Group related tests into suites for organized execution. Suites let you:
* **Run tests together** as a logical group (e.g., "Checkout flow", "Admin panel")
* **Schedule runs** on a recurring basis (daily, hourly, or custom)
* **Trigger from CI/CD** to run automatically on every deploy or pull request
* **Track results** across runs to spot regressions over time
Create and manage suites from the web app dashboard. Any test created from either the CLI or the web app can be added to a suite.
## Multi-App & Multi-Environment
Bugster supports testing flows that span multiple applications and environments.
| Concept | What it means |
| :--------------- | :--------------------------------------------------------------------------------------- |
| **Apps** | Different web applications in your organization (e.g., customer portal, admin dashboard) |
| **Environments** | Deployment targets for each app (e.g., staging, production, local) |
Define your apps and environments in the web app under **Settings**, then switch between them when running tests. This lets you:
* Run the same suite against staging before promoting to production
* Test cross-app flows that navigate between different URLs
* Maintain separate credentials per environment
## CLI and Web App Sync
The `push` and `pull` commands keep your local `.bugster/` folder and the web app in sync. This enables a collaborative workflow where multiple team members work on the same test suite.
```mermaid theme={null}
flowchart LR
CLI["Local CLI\n.bugster/"]
Web["Web App\n(source of truth)"]
Web -- "bugster pull" --> CLI
CLI -- "bugster push" --> Web
```
* **`bugster pull`** downloads the latest suite from the web app into your local `.bugster/` folder
* **`bugster push`** uploads your local changes back to the web app
* Tests created in the web app appear locally after a pull
* Tests created or edited locally with coding agents appear in the web app after a push
Always pull before making local changes to avoid overwriting updates from other team members.
The `.bugster/` folder can be added to `.gitignore` if you prefer not to commit tests to your repository. Since the web app is the source of truth, every developer can pull the latest suite with `bugster pull` at any time.
## Migration Guide for Existing Users
If you're already using Bugster CLI, migrating to the full platform takes about 5 minutes.
Update to the latest version:
```bash theme={null}
curl -fsSL https://cli.bugster.dev/install | sh
```
```bash theme={null}
curl -fsSL https://cli.bugster.dev/install | sh
```
```powershell theme={null}
irm https://cli.bugster.dev/install.ps1 | iex
```
See the [installation guide](/installation) for details.
Sync your existing local tests to the Bugster web app:
```bash theme={null}
bugster push
```
All your YAML tests from `.bugster/tests/` now appear in the web app dashboard.
Verify your tests appear in the web app by opening the dashboard.
Go to **Settings** in the web app and configure your apps and environments. Define at least one app with its base URL and one environment (e.g., staging).
If you haven't already, add your testing credentials in the web app under **Settings**. This ensures tests running from the web app can authenticate.
If you already have credentials in your local `config.yaml`, they'll continue to work for CLI runs. Add them to the web app as well for web-based execution.
Your tests are now synced. You can continue using the CLI with coding agents, create tests in the web app, organize suites, and schedule runs.
## Integrate Bugster CLI
If you're new to Bugster and want to start from the CLI, here's how to connect it to your development environment:
```bash theme={null}
curl -fsSL https://cli.bugster.dev/install | sh
```
```bash theme={null}
curl -fsSL https://cli.bugster.dev/install | sh
```
```powershell theme={null}
irm https://cli.bugster.dev/install.ps1 | iex
```
This opens a browser window for authentication, then pulls your `.bugster/` folder with all tests and creates rules for your coding agents.
```bash theme={null}
bugster auth
```
Link Bugster to this project and set up your local test suite:
```bash theme={null}
bugster init --project-id your-project-id
```
This installs Bugster-specific rules into your coding agent so it knows how to create and edit tests following the correct YAML structure and best practices.
```bash theme={null}
bugster plugin --agent cursor # or --agent claude
```
Once installed, your coding agent can read and modify tests in the `.bugster/` folder. Just ask it to create or update tests as needed. See the [Cursor integration guide](/guides/coding-agents/cursor) or [Claude Code integration guide](/guides/coding-agents/claude-code) for usage details.
```bash theme={null}
bugster run # Execute tests locally
bugster pull # Bring the latest suite from the web app
bugster push # Sync local changes back to the web app
```
## Next Steps
Set up Cursor as your test generation assistant
Set up Claude Code for test generation
Run tests automatically on every deploy
# MVP Roadmap with Bugster
Source: https://docs.bugster.dev/guides/your-qa-roadmap
Get your first E2E test suite running in under a week. Critical flows tested, running locally, ready for CI.
**Goal:** 3-5 critical flows tested. Running locally. Ready for CI.
## Step 1: Define Your Critical Paths
Get your team together for 30 minutes. Ask:
1. **What do users pay for?** → #1 critical path
2. **What blocks users from value?** → Usually auth
3. **What wakes you up at 3am?** → That's critical
| Priority | Flow Type | Example |
| -------- | ---------- | ----------------------------- |
| P0 | Auth gate | Login, Signup |
| P0 | Core value | Create project, Make purchase |
| P1 | Conversion | Upgrade plan, Invite team |
Write down 3-5 flows. No more. If you can't pick 5, pick 3.
## Step 2: Setup Bugster
```bash theme={null}
curl -sSL https://bugster.dev/install.sh | bash
```
```powershell theme={null}
irm https://bugster.dev/install.ps1 | iex
```
See [Installation Guide](/installation) for troubleshooting.
```bash theme={null}
bugster auth
bugster init
```
See [Auth](/commands/auth) and [Init](/commands/init) command reference.
## Step 3: Configure Authentication
Create a test user in your app, then add credentials:
```yaml config.yaml theme={null}
credentials:
- id: user
username: ${BUGSTER_USERNAME}
password: ${BUGSTER_PASSWORD}
```
Store secrets in `.env` (add to `.gitignore`):
```bash .env theme={null}
BUGSTER_USERNAME=test@yourcompany.dev
BUGSTER_PASSWORD=TestPassword123!
```
See [Credentials and Roles](/guides/test-management/credentials-and-roles) for multiple roles and advanced setup.
## Step 4: Write Your First Test
```bash theme={null}
bugster plugin --agent cursor # or --agent claude
```
Then: `@bugster-generate Create a test for user login`
See [Plugin Command](/commands/plugin) for details.
```yaml .bugster/tests/auth/login.yaml theme={null}
name: User login
page: /login
credential_id: user
task: Log in to the application
steps:
- Enter credentials and submit
expected_result: User sees the dashboard
```
Run it:
```bash theme={null}
bugster run .bugster/tests/auth/login.yaml
```
See [Run Command](/commands/run) for all options.
## Step 5: Cover Critical Paths
Write one test per critical path. Organize in folders:
```
.bugster/tests/
├── auth/login.yaml
├── core/create-project.yaml
└── billing/upgrade-plan.yaml
```
```bash theme={null}
bugster run # Run all tests
```
## Checklist
* [ ] 3-5 critical paths identified
* [ ] Bugster installed and initialized
* [ ] Test user created with credentials in `.env`
* [ ] All critical path tests passing locally
## What's Next
Run tests on PRs
Customize settings
Expand coverage
# Introduction
Source: https://docs.bugster.dev/index
The autonomous QA agent that tells you what is broken
## Welcome to Bugster CLI Documentation
Set up Bugster CLI on your system
Complete walkthrough from setup to first test
Explore all available CLI commands
Set up automated testing on pull requests
# Installation
Source: https://docs.bugster.dev/installation
Install Bugster CLI and start AI-powered end-to-end testing
Bugster CLI generates and runs AI-powered end-to-end tests for web applications.
## Requirements
Required for browser automation
Required for Linux distributions
**Operating Systems**:
* macOS (compatible)
* Linux: Ubuntu 22+, Ubuntu 24+, Debian 12+, and any distribution with GLIBC ≥ 2.35
* Windows (compatible)
}>
Pages and App Router supported.
React Router DOM v6/v7 supported.
All major Vue configurations supported.
All major Angular configurations supported.
All major Svelte configurations supported.
All major JavaScript frameworks supported.
**Framework behavior note**: Next.js and React have enhanced features for the `generate` and `update` commands. Other frameworks use standard implementation.
View detailed framework support and routing compatibility information
}>
Vercel deployments compatible.
}>
Netlify deployments compatible.
## Installation
### Installation
Install Bugster CLI using Homebrew on macOS or Linux:
```bash theme={null}
brew install Bugsterapp/homebrew-tap/bugster
```
### Updating
To update Bugster to the latest version:
```bash theme={null}
brew upgrade bugster
```
### Installation
Install Bugster CLI globally using npm:
```bash theme={null}
npm install -g @bugster/bugster-cli
```
**Note**: You need Node.js 18+ installed. Verify your Node.js version with `node --version`.
### Updating
To update Bugster to the latest version:
```bash theme={null}
npm update -g @bugster/bugster-cli
```
### Automated Installation
Install Bugster CLI using the automated installer script on macOS or Linux:
```bash theme={null}
curl -sSL https://bugster.dev/install.sh | bash
```
### Reset your terminal session
After installation, make sure to reset your terminal so PATH changes take effect. You can either close and reopen your terminal, or run:
```bash theme={null}
source ~/.zshrc # zsh
source ~/.bashrc # bash
```
### Recommended Method
The recommended way to install Bugster CLI on Windows is by using the PowerShell installer. Open a PowerShell terminal and run the following command:
```powershell theme={null}
irm https://bugster.dev/install.ps1 | iex
```
This command downloads and executes the official installer script, which will:
1. Determine the correct version for your system.
2. Download the binary from the latest GitHub Release.
3. Unzip and place it in a standard user directory (`%LOCALAPPDATA%\Programs\bugster`).
4. Add the installation directory to your user's `PATH` environment variable.
After installation, you must **open a new terminal window** for the `bugster` command to be available.
### Manual Installation
If you prefer not to run the script, you can install the CLI manually:
Go to the [latest GitHub Release](https://github.com/Bugsterapp/bugster-cli/releases/latest).
Download the `bugster-windows.zip` file.
Extract the `bugster.exe` file to a directory of your choice (e.g., `C:\Program Files\bugster`).
Manually add that directory to your system's or user's `PATH` environment variable.
### Verify Installation
```bash theme={null}
bugster --version
```
## Troubleshooting
```bash theme={null}
node --version
# Should show v18.0.0 or higher
```
```bash theme={null}
ldd --version
# Should show GLIBC 2.35 or higher
```
**Symptom:** Installation fails with permission errors, even when using `sudo`.
**Cause:** The `~/.local` directory may have been created by another process with root ownership, preventing your user from writing to `~/.local/bin`.
**Solution:**
```bash theme={null}
ls -ld ~/.local ~/.local/bin
```
If the owner is `root` instead of your username, proceed to the next step.
```bash theme={null}
sudo chown -R $(whoami) ~/.local
```
Run the installer again **without** sudo:
```bash theme={null}
curl -sSL https://bugster.dev/install.sh | bash
```
**Alternative solution:** Install directly to `/usr/local/bin`:
```bash theme={null}
# Download the binary manually first, then:
sudo cp bugster /usr/local/bin/
```
If you encounter compatibility issues on Linux, ensure your distribution has GLIBC 2.35 or higher. Supported distributions include Ubuntu 22+, Ubuntu 24+, Debian 12+, and other modern distributions.
**Symptom:** After running the installer, `bugster.exe` is not found in the installation directory (`%LOCALAPPDATA%\Programs\bugster`), or it disappears shortly after installation.
**Cause:** Because the executable is downloaded from the internet and is not digitally signed by a major publisher, Windows Defender or other antivirus software may automatically quarantine or delete it as a security precaution.
**Solution:**
1. Open **Windows Security** > **Virus & threat protection**.
2. Go to **Protection history** to see if `bugster.exe` was quarantined. If so, you can restore it and allow it on your device.
To prevent this from happening in the future, add an exclusion:
* Under **Virus & threat protection settings**, click **Manage settings**.
* Scroll down to **Exclusions** and click **Add or remove exclusions**.
* Click **Add an exclusion**, select **Folder**, and paste the following path: `%LOCALAPPDATA%\Programs\bugster`
**Symptom:** After a successful installation, you type `bugster --help` and get an error like `'bugster' is not recognized...`.
**Cause:** The terminal session where you ran the installer has an old copy of the `PATH` variable. The changes made by the installer will only be loaded by new terminal sessions.
**Solution:**
Close your current terminal window and **open a new one**. The command should now work correctly.
**What gets installed**: Bugster CLI, Playwright browsers, and all required dependencies are installed automatically. Python is no longer required for Bugster versions > 0.3.26.
Follow our quickstart guide to set up your first project
# GCP Cloud Build
Source: https://docs.bugster.dev/integrations/cloud-build
Integrate Bugster with Google Cloud Build using custom webhooks
Automatically trigger Bugster tests when your Google Cloud Build deployments complete. This integration uses Bugster's custom webhook API to run tests on your deployed applications.
## Overview
The GCP Cloud Build integration works by adding a webhook step to your `cloudbuild.yaml` file that calls Bugster's API after your deployment succeeds. This approach gives you full control over when tests are triggered in your build pipeline.
This integration uses the same [Custom Integration API](/integrations/custom) that powers other Bugster integrations.
## Quick Start
We've created a complete example repository to help you get started quickly:
Complete Next.js application with Cloud Build configuration for Bugster integration
## Prerequisites
You must have the [Bugster GitHub App](https://github.com/apps/bugster-dev) installed and connected to your repository before using this integration.
Visit your [Bugster Dashboard](https://app.bugster.dev) → Project Settings → GitHub Integration to install the GitHub App if you haven't already.
## Configuration
Create or update your `cloudbuild.yaml` file to include the Bugster webhook step:
```yaml cloudbuild.yaml theme={null}
steps:
# Your existing build steps here
# ...
# Bugster webhook step
- name: 'curlimages/curl'
entrypoint: 'curl'
args:
- '-X'
- 'POST'
- 'https://api.bugster.app/webhooks/integrations/custom'
- '-H'
- 'Content-Type: application/json'
- '-H'
- 'X-API-KEY: ${_BUGSTER_API_KEY}'
- '--data'
- |
{
"deployment_state": "success",
"project_id": "${_PROJECT_ID}",
"organization_id": "${_ORG_ID}",
"branch": "${_BRANCH_NAME}",
"environment_url": "${_DEPLOYMENT_URL}",
"environment": "production"
}
options:
logging: CLOUD_LOGGING_ONLY
```
Add this step **after** your deployment is complete and your application is accessible at the target URL.
Navigate to your Bugster dashboard and collect:
* **API Key**: Settings > API Keys
* **Project ID**: Project Settings > General
* **Organization ID**: Settings > Organization
All three values can also be found in **Project Settings > Integrations** for convenience.
In Google Cloud Console, go to **Cloud Build > Triggers** and configure these substitution variables:
| Variable | Example Value | Description |
| ------------------ | ----------------------------- | ------------------------------------- |
| `_BUGSTER_API_KEY` | `bugster_xxx` | Your Bugster API key |
| `_PROJECT_ID` | `my-project-1234567890` | Bugster project identifier |
| `_ORG_ID` | `org_abc123def456ghi789jkl` | Bugster organization identifier |
| `_DEPLOYMENT_URL` | `https://preview.example.com` | Public URL where your app is deployed |
| `_BRANCH_NAME` | `main` | Target branch for the trigger |
Set these variables once in your Cloud Build trigger configuration - they'll be available for all builds.
1. Go to **Cloud Build > Triggers > Create Trigger**
2. Select your GitHub repository
3. Set **Event** to "Pull request"
4. Set **Target branch** to `main` (or your preferred branch)
5. Set **Configuration** to "Cloud Build configuration file"
6. Set **Configuration file location** to `/cloudbuild.yaml` (or your file path)
7. Add the substitution variables from Step 3
8. Save the trigger
Your trigger is now configured to run Bugster tests on every pull request to the main branch.
## How It Works
A developer opens a pull request against your main branch.
Google Cloud Build detects the pull request and starts the build process using your `cloudbuild.yaml` configuration.
Your application builds and deploys to the specified environment (e.g., preview URL, staging environment).
The curl step in your Cloud Build configuration sends a webhook to Bugster with the deployment details.
Bugster receives the webhook, accesses your deployed application at the provided URL, and runs your test suite automatically.
## Advanced Configuration
### Custom Environment Variables
You can customize the webhook payload based on your deployment setup:
```yaml cloudbuild.yaml theme={null}
# Example for staging environment
- name: 'curlimages/curl'
entrypoint: 'curl'
args:
- '--data'
- |
{
"deployment_state": "success",
"project_id": "${_PROJECT_ID}",
"organization_id": "${_ORG_ID}",
"commit_sha": "${COMMIT_SHA}",
"environment_url": "https://${_BRANCH_NAME}-${SHORT_SHA}.example.com",
"environment": "staging"
}
```
### Conditional Webhook Execution
Only trigger Bugster for specific branches or conditions:
```yaml cloudbuild.yaml theme={null}
# Only run Bugster webhook for main branch
- name: 'curlimages/curl'
entrypoint: 'bash'
args:
- '-c'
- |
if [ "${_BRANCH_NAME}" = "main" ]; then
curl -X POST 'https://api.bugster.app/webhooks/integrations/custom' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: ${_BUGSTER_API_KEY}' \
--data '{
"deployment_state": "success",
"project_id": "${_PROJECT_ID}",
"organization_id": "${_ORG_ID}",
"branch": "${_BRANCH_NAME}",
"environment_url": "${_DEPLOYMENT_URL}",
"environment": "production"
}'
fi
```
## Troubleshooting
* Verify your `_BUGSTER_API_KEY` is correct and hasn't expired
* Check that the API key has proper permissions in your Bugster dashboard
* Ensure the `X-API-KEY` header is properly formatted in your `cloudbuild.yaml`
* Confirm your `_DEPLOYMENT_URL` is publicly accessible
* Verify your repository has the `.bugster` configuration folder
* Check that `deployment_state` is set to `"success"`
* Ensure your `_PROJECT_ID` and `_ORG_ID` are correct
* Check Cloud Build logs for specific curl error messages
* Verify all substitution variables are properly configured
* Ensure the `curlimages/curl` image is accessible in your project
* Confirm variables are defined in your Cloud Build trigger settings
* Check variable names match exactly (including underscores)
* Verify you're using `${VARIABLE_NAME}` syntax in your YAML file
## Example Repository
For a complete working example, check out our [Bugster Cloud Build Quickstart repository](https://github.com/Bugsterapp/bugster-quickstart/tree/main/platforms/gcp/cloud-build) which includes:
* A Next.js sample application
* Complete `cloudbuild.yaml` configuration
* Bugster test setup in the `.bugster` folder
* Detailed README with setup instructions
# Custom Integration
Source: https://docs.bugster.dev/integrations/custom
Integrate Bugster with any deployment platform using our webhook API
Create a custom integration with Bugster to run tests on your preferred deployment infrastructure. Perfect for teams using platforms not covered by our built-in integrations.
## Overview
The custom integration uses Bugster's webhook API to trigger test runs when your deployments are ready. This approach gives you full control over when and how Bugster tests are executed in your deployment pipeline.
The custom integration is the same API that powers our GitHub Actions integration behind the scenes.
## API Endpoint
```bash cURL theme={null}
curl -X POST 'https://api.bugster.app/webhooks/integrations/custom' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: your_bugster_api_key' \
-d '{
"deployment_state": "success",
"project_id": "my-project-1234567890",
"organization_id": "org_abc123def456ghi789jkl",
"commit_sha": "abc123def456",
"environment_url": "https://your-app.example.com",
"environment": "production"
}'
```
## Required Parameters
Your Bugster API key. Get this from **Settings > API Keys** in your Bugster dashboard.
Your Bugster project identifier. Find this in **Settings > General** of your project in your Bugster dashboard.
Your Bugster organization identifier. Find this in **Settings > General** of your project in your Bugster dashboard.
The URL where your application is deployed and where Bugster should run tests. Required when `deployment_state` is `"success"`.
## Optional Parameters
Current state of your deployment. Bugster only runs tests when set to `"success"`.
**Possible values:**
* `"success"` - Deployment completed successfully, trigger tests
* `"in_progress"` - Deployment is still running, don't run tests
* `"cancelled"` - Deployment was cancelled, don't run tests
* `"error"` - Deployment failed, don't run tests
The Git commit SHA for this deployment. Use either `commit_sha` OR `branch`, not both.
The Git branch name for this deployment. Use either `branch` OR `commit_sha`, not both.
The deployment environment name (e.g., "production", "staging", "preview").
## Response
```json Success theme={null}
{
"status": "processed",
"message": "Custom integration event processed for org: org_abc123def456ghi789jkl, project: my-project-1234567890"
}
```
```json Error theme={null}
{
"status": "error",
"message": "Invalid project_id",
"code": "INVALID_PROJECT"
}
```
## Prerequisites
To use this integration, you must:
1. Install the [Bugster GitHub App](https://github.com/apps/bugster-dev)
2. Select the repository you want to integrate
3. Commit the `.bugster` folder to the branch you're deploying
Without these prerequisites, the webhook will not trigger test runs.
## Integration Steps
Navigate to your Bugster dashboard and collect:
* **API Key**: Settings > API Keys
* **Project ID**: Settings > General (in your project)
* **Organization ID**: Settings > General (in your project)
Keep your API key secure. Never commit it to version control or expose it in client-side code.
Add the API call to your deployment script or CI/CD pipeline. The webhook should be called **after** your deployment succeeds and your application is accessible.
```bash Shell Script theme={null}
#!/bin/bash
# After successful deployment
curl -X POST 'https://api.bugster.app/webhooks/integrations/custom' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: $BUGSTER_API_KEY' \
-d '{
"deployment_state": "success",
"project_id": "'$PROJECT_ID'",
"organization_id": "'$ORG_ID'",
"branch": "'$GIT_BRANCH'",
"environment_url": "'$DEPLOYMENT_URL'"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://api.bugster.app/webhooks/integrations/custom', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': process.env.BUGSTER_API_KEY
},
body: JSON.stringify({
deployment_state: 'success',
project_id: process.env.PROJECT_ID,
organization_id: process.env.ORG_ID,
commit_sha: process.env.GIT_COMMIT,
environment_url: process.env.DEPLOYMENT_URL,
environment: 'production'
})
});
```
```python Python theme={null}
import requests
import os
response = requests.post(
'https://api.bugster.app/webhooks/integrations/custom',
headers={
'Content-Type': 'application/json',
'X-API-KEY': os.environ['BUGSTER_API_KEY']
},
json={
'deployment_state': 'success',
'project_id': os.environ['PROJECT_ID'],
'organization_id': os.environ['ORG_ID'],
'commit_sha': os.environ['GIT_COMMIT'],
'environment_url': os.environ['DEPLOYMENT_URL'],
'environment': 'production'
}
)
```
Deploy your application and verify that:
1. The webhook is called successfully
2. Bugster receives the deployment notification
3. Test runs appear in your Bugster dashboard
You can monitor webhook calls in your Bugster dashboard under **Project Settings > Integrations**.
## Best Practices
**Environment-specific testing**: Use the `environment` parameter to run different test suites for staging vs production deployments.
**Error handling**: Always check the webhook response and implement retry logic for failed requests.
**Only call on success**: Set `deployment_state` to `"success"` only when your deployment is complete and accessible. Bugster cannot test broken deployments.
## Example Implementations
See our [GCP Cloud Build integration guide](/integrations/cloud-build) for a real-world example of using the custom integration API.
## Troubleshooting
**Error message:** `"Skipping event: Repository does not have .bugster configuration folder"`
This means your repository is missing the `.bugster` folder with test configurations. To fix this:
1. Run `bugster quickstart --api-key=YOUR_API_KEY` in your repository
2. Follow the prompts to set up your test configuration
3. Commit the generated `.bugster/` folder to your repository
4. Redeploy and trigger the webhook again
The `.bugster` folder must be present in the repository branch you're deploying for tests to run.
* Verify `deployment_state` is set to `"success"`
* Ensure `environment_url` is accessible and returns a valid response
* Check that your API key, project ID, and organization ID are correct
* Confirm the `.bugster` configuration folder exists in your repository
* Confirm your API key is valid and hasn't expired
* Ensure the `X-API-KEY` header is properly formatted
* Check that your API key has the necessary permissions
* Verify your project ID and organization ID in the Bugster dashboard
* Ensure you're using the correct IDs for the environment you're targeting
# GitHub
Source: https://docs.bugster.dev/integrations/github
Automatically run tests on deployments with GitHub App integration
Connect Bugster to your GitHub repository to automatically run tests on pull requests and preview deployments.
## What It Enables
Tests run automatically on every pull request
Tests against preview deployments from any platform
Pass/fail status reported directly in GitHub
Results visible to all team members
## Installation
Visit [Bugster Dashboard](https://app.bugster.dev) → Your Project → GitHub Integration
Click **"Connect Organization"** and authorize the Bugster GitHub App
Choose the repository you want to integrate with Bugster
Add your `.bugster/` folder to the repository:
```bash theme={null}
git add .bugster/
git commit -m "Add Bugster CLI configuration"
git push origin main
```
## Platform Setup
Configure Vercel protection bypass for automated testing access
Ensure your preview deployments have the necessary environment variables for testing
Detailed Vercel configuration and protection bypass setup
Ensure Railway preview deployments are enabled for your project
Configure necessary environment variables for your Railway previews
Complete Railway integration and deployment configuration
Set up Netlify webhook notifications for deployment events
Configure the webhook URL from your Bugster project settings
Complete Netlify integration with webhook configuration
Store your Bugster API key in GitHub repository secrets
Add the Bugster GitHub Action to your workflow file
Complete GitHub Actions integration with official Bugster action
Include Bugster webhook step in your cloudbuild.yaml
Set up Bugster credentials in Cloud Build trigger settings
Complete GCP Cloud Build integration with webhook configuration
Collect your Bugster API key, project ID, and organization ID
Call Bugster webhook API after successful deployment
Complete custom integration using Bugster webhook API
## How It Works
### Pull Request Workflow
1. **PR Created** → GitHub notifies Bugster
2. **Preview Deployed** → Platform creates preview URL
3. **Tests Execute** → Bugster runs tests against preview
4. **Results Reported** → Status check appears in GitHub PR
### Test Execution
**New Pull Request**: Full test suite execution
**Push to PR Branch**: Affected tests only (smart detection)
**Preview URL Ready**: Tests run against latest deployment
**Affected Tests**: Only tests related to changed files
**Always-Run Tests**: Critical tests that always execute
**Smart Limits**: Respects configured test limits
## GitHub Status Checks
Results appear as status checks in your pull requests:
### Status Types
All tests passed successfully
One or more tests failed
Tests are currently running
### Detailed Results
Click the status check to view:
* Individual test results
* Failure reasons and screenshots
* Execution videos for debugging
* Performance metrics and timing
## Troubleshooting
**Issue**: No status checks appearing on PRs
**Solution**: Reinstall the GitHub App with proper repository permissions
**Issue**: No test execution triggered
**Solutions**:
* Ensure `.bugster/` folder is committed to repository
* Verify GitHub App has access to the correct repository
* Check that preview deployments are working
**Issue**: Tests fail to connect to preview deployment
**Solutions**:
* Ensure deployment is complete and URL is publicly accessible
* **Vercel**: Configure protection bypass correctly
* **Railway**: Verify deployment settings and environment variables
* **Netlify**: Check webhook configuration and deployment status
* **GitHub Actions/Cloud Build/Custom**: Verify environment URL is accessible
* Check that environment variables are properly configured
## Best Practices
**Commit configuration**: Always commit `.bugster/config.yaml` and test files
**Branch protection**: Require Bugster status checks before merging
**Environment consistency**: Match preview and production configurations
**PR testing**: Let tests complete before code review
**Failure handling**: Investigate and fix test failures promptly
**Test maintenance**: Keep tests updated with code changes
## Next Steps
Complete Vercel integration and deployment configuration
Complete Railway integration and deployment configuration
Complete Netlify integration with webhook configuration
Use official GitHub Action for workflow integration
Integrate with GCP Cloud Build pipelines
Build custom integration with webhook API
# GitHub Actions
Source: https://docs.bugster.dev/integrations/github-actions
Integrate Bugster with GitHub Actions using our official action
Automatically trigger Bugster tests from your GitHub workflows using the official Bugster GitHub Action. Perfect for running tests after deployments or on pull requests.
## Overview
The [Bugster GitHub Action](https://github.com/marketplace/actions/bugster-dev) sends deployment notifications to Bugster Cloud directly from your GitHub workflows. It uses the same webhook API as our custom integrations but provides a simpler, GitHub-native experience.
Official GitHub Action available in the GitHub Marketplace
## Prerequisites
You must have the [Bugster GitHub App](https://github.com/apps/bugster-dev) installed and connected to your repository before using GitHub Actions integration.
Visit your [Bugster Dashboard](https://app.bugster.dev) → Project Settings → GitHub Integration to install the GitHub App if you haven't already.
## Quick Setup
In your GitHub repository, go to **Settings > Secrets and variables > Actions** and add:
* **Name**: `BUGSTER_API_KEY`
* **Value**: Your Bugster API key (from **Settings > API Keys** in your Bugster dashboard)
Never commit your API key directly to your workflow file. Always use GitHub secrets.
From your Bugster dashboard, collect:
* **Organization ID**: Settings > Organization
* **Project ID**: Project Settings > General
Both values are also available in **Project Settings > Integrations** for convenience.
Create or update your `.github/workflows` file to include the Bugster action:
```yaml .github/workflows/deploy.yml theme={null}
name: Deploy and Test
on:
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Your deployment steps here
# ...
- name: Trigger Bugster Tests
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_your_org_id"
project_id: "your_project_id"
environment_url: "https://preview.example.com"
```
Replace the `organization_id` and `project_id` with your actual values from the Bugster dashboard.
## Action Inputs
### Required Parameters
Your Bugster API key. Store this in `secrets.BUGSTER_API_KEY` for security.
Your Bugster organization ID from the dashboard.
Your Bugster project ID from the dashboard.
URL where your application is deployed and accessible for testing.
### Optional Parameters
Deployment status. Options: `success`, `in_progress`, `cancelled`, `failed`, `error`.
Bugster only runs tests when set to `success`.
Git commit SHA. Automatically filled from GitHub context if not provided.
Git branch name. Automatically filled from GitHub context if not provided.
Base API URL. Useful for testing or custom deployments.
Request timeout in seconds.
## Action Outputs
HTTP status code returned by the Bugster API.
Response body returned by the API (truncated for logging).
## Common Use Cases
### Basic Pull Request Testing
Test every pull request after deployment:
```yaml .github/workflows/pr-test.yml theme={null}
name: PR Testing
on:
pull_request:
branches: [main]
jobs:
test-deployment:
runs-on: ubuntu-latest
steps:
- name: Trigger Bugster
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://terminal-todo-delta.vercel.app"
```
### Multi-Environment Testing
Test different environments with different configurations:
```yaml Staging theme={null}
name: Staging Deploy
on:
push:
branches: [develop]
jobs:
deploy-staging:
runs-on: ubuntu-latest
steps:
- name: Notify Bugster (Staging)
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://staging.example.com"
deployment_state: "success"
```
```yaml Production theme={null}
name: Production Deploy
on:
push:
branches: [main]
jobs:
deploy-production:
runs-on: ubuntu-latest
steps:
- name: Notify Bugster (Production)
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://app.example.com"
deployment_state: "success"
```
### Conditional Testing
Only run tests under specific conditions:
```yaml .github/workflows/conditional.yml theme={null}
name: Conditional Testing
on:
pull_request:
types: [opened, synchronize]
jobs:
trigger-tests:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'test-required')
steps:
- name: Trigger Bugster
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: ${{ env.PREVIEW_URL }}
```
### Deployment State Tracking
Track deployment progress with different states:
```yaml .github/workflows/deployment-tracking.yml theme={null}
name: Deployment with Status Tracking
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Notify Bugster (In Progress)
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://app.example.com"
deployment_state: "in_progress"
# Your deployment steps here
# ...
- name: Notify Bugster (Success)
if: success()
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://app.example.com"
deployment_state: "success"
- name: Notify Bugster (Failed)
if: failure()
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: "https://app.example.com"
deployment_state: "error"
```
## Integration with Popular Platforms
### Vercel Integration
```yaml .github/workflows/vercel-bugster.yml theme={null}
name: Vercel + Bugster
on:
pull_request:
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
id: vercel-deploy
- name: Trigger Bugster Tests
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: ${{ steps.vercel-deploy.outputs.preview-url }}
```
### Netlify Integration
```yaml .github/workflows/netlify-bugster.yml theme={null}
name: Netlify + Bugster
on:
pull_request:
jobs:
deploy-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: './dist'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
id: netlify-deploy
- name: Trigger Bugster Tests
uses: Bugsterapp/bugster-action@v1
with:
bugster_api_key: ${{ secrets.BUGSTER_API_KEY }}
organization_id: "org_abc123def456ghi789jkl"
project_id: "my-project-1234567890"
environment_url: ${{ steps.netlify-deploy.outputs.deploy-url }}
```
## Troubleshooting
* Verify your `BUGSTER_API_KEY` secret is set correctly in repository settings
* Check that the API key hasn't expired in your Bugster dashboard
* Ensure the API key has proper permissions for the organization and project
* Confirm your `environment_url` is publicly accessible
* Verify your repository has the `.bugster` configuration folder
* Check that `deployment_state` is set to `"success"` (default)
* Ensure your `organization_id` and `project_id` are correct
* Increase the `timeout_seconds` parameter (default is 60)
* Check if the Bugster API is accessible from GitHub Actions
* Verify your network connectivity and API endpoint
**Error:** "Repository does not have .bugster configuration folder"
Run `bugster quickstart --api-key=YOUR_API_KEY` in your repository and commit the generated `.bugster/` folder.
## Real-World Examples
Check out these working implementations:
* [Terminal Todo App](https://github.com/Naquiao/terminal-todo/blob/main/.github/workflows/bugster-execution.yml) - Simple PR-triggered testing
* [Bugster Action Source](https://github.com/Bugsterapp/bugster-action) - Official action implementation
## Next Steps
Learn about the underlying webhook API for custom implementations
Configure and manage your Bugster test suite
# Netlify
Source: https://docs.bugster.dev/integrations/netlify
Automatically run tests on deployments with GitHub App integration
## Prerequisites
You must have the [Bugster GitHub App](https://github.com/apps/bugster-dev) installed and connected to your repository before using this integration.
Visit your [Bugster Dashboard](https://app.bugster.dev) → Project Settings → GitHub Integration to install the GitHub App if you haven't already.
## Configuration
Navigate to your Netlify project settings.
Click on **Notifications > Emails and Webhooks**.
Add HTTP POST request notifications for "Deploy succeed", "Deploy started" and "Deploy failed".
Copy the webhook URL from your Bugster Project Settings > Integrations > Netlify Integration.
Now you're ready! Open a new PR and watch Bugster run your test suite against the Netlify preview.
# Railway
Source: https://docs.bugster.dev/integrations/railway
Automatic integration when you connect your GitHub repository
## Prerequisites
You must have the [Bugster GitHub App](https://github.com/apps/bugster-dev) installed and connected to your repository before using this integration.
Visit your [Bugster Dashboard](https://app.bugster.dev) → Project Settings → GitHub Integration to install the GitHub App if you haven't already.
## Automatic Integration
The Railway integration activates automatically when you connect your GitHub repository. No additional configuration is required.
Railway integration works seamlessly with your existing GitHub connection to automatically run tests on your deployments.
# Slack
Source: https://docs.bugster.dev/integrations/slack
Send notifications, alerts, and updates to Slack channels
Slack integration is optional but recommended for receiving Bugster tests runs
notifications. You must be a workspace admin or have permission to install
apps.
Bugster uses a Slack App to send messages to your workspace when tests runs are completed. You can choose between receive all test executions or just when errors occur.
## **Installing the Slack App**
Install the Bugster Slack App through your [**dashboard**](https://app.bugster.dev/).
In the Bugster webapp, go to **Integrations → Slack** and click **Connect
Slack**.
Select the Slack workspace where you want Bugster to post messages.
Click **Install Bugster** to complete the OAuth flow. You'll be redirected
back to Bugster dashboard with "Connected" status.
Currently, the Slack app can only be connected to one Slack channel per
organization. If you'd like to connect Slack notifications to specific
projects, please reach out to our team with your feedback.
# Vercel
Source: https://docs.bugster.dev/integrations/vercel
Automated testing on Vercel preview deployments with Bugster
## Overview
Bugster's Vercel integration provides automated testing on every preview deployment, helping you catch bugs before they reach production. Here's how it works:
1. **Deploy Trigger**: When you push changes to a branch or create a pull request, Vercel automatically creates a preview deployment
2. **Bugster Activation**: Once the Vercel deployment is complete, Bugster detects the new preview URL
3. **Automated Testing**: Bugster runs your test suite and destructive agents against the preview deployment
4. **Results & Feedback**: Test results are reported back, allowing you to identify and fix issues before merging
This integration ensures that every code change is thoroughly tested in a real deployment environment, preventing bugs from reaching your main branch and production.
## Prerequisites
You must have the [Bugster GitHub App](https://github.com/apps/bugster-dev) installed and connected to your repository before using this integration.
Visit your [Bugster Dashboard](https://app.bugster.dev) → Project Settings → GitHub Integration to install the GitHub App if you haven't already.
### Key Benefits
* **Early Bug Detection**: Catch issues in preview deployments before they affect users
* **Automated Workflow**: No manual intervention needed - tests run automatically on every deployment
* **Real Environment Testing**: Tests run against actual deployed code, not just local development
* **Pull Request Integration**: Get test results directly in your PR workflow
* **Destructive Testing**: Advanced AI agents explore your app to find edge cases and potential issues
## Protection Bypass for Automation
Bugster requires access to your Vercel preview deployments to run automated tests. To enable this, you need to create a "Protection Bypass for Automation" secret in Vercel and add it to your Bugster configuration.
### Creating a Protection Bypass Secret
1. Go to your Vercel dashboard
2. Select your project
3. Navigate to **Settings** → **Deployment Protection**
1. Scroll down to **Protection Bypass for Automation**
2. Click **Create Secret** or **Regenerate** if one exists
3. Copy the generated secret (it looks like: `vercel_bypass_1a2b3c4d5e6f...`)
Store this secret securely - it allows automated tools to access your preview deployments
Add the bypass secret to your Bugster configuration:
**During initialization:**
```bash theme={null}
bugster init --bypass-protection "vercel_bypass_1a2b3c4d5e6f..." --platform vercel
```
**Or manually in `.bugster/config.yaml`:**
```yaml theme={null}
project_name: "My App"
project_id: "my-app-123456"
base_url: "http://localhost:3000"
x-vercel-protection-bypass: "vercel_bypass_1a2b3c4d5e6f..."
credentials:
- id: "admin"
username: "test@example.com"
password: "testpass"
```
### How the Bypass Works
When Bugster runs tests on your Vercel preview deployments:
1. **Header Injection**: Bugster automatically includes the `x-vercel-protection-bypass` header with your secret
2. **Access Granted**: Vercel recognizes the valid bypass secret and allows automated access to preview deployments
3. **Test Execution**: Bugster can now run tests normally on the preview deployment
4. **Automation Enabled**: This enables seamless CI/CD integration without manual intervention
### Security Best Practices
* **Never commit** the bypass secret to your repository
* **Regenerate periodically** for enhanced security
* **Limit access** to team members who need it
* **Monitor usage** in Vercel's deployment logs
* Use different secrets for different environments (staging, preview)
* Consider separate Vercel projects for sensitive applications
* Review team access permissions regularly
* Regenerate secrets when team members leave
* Update Bugster configuration after regeneration
* Test the new secret with a sample deployment
## Troubleshooting
**Symptoms**: Tests fail to access preview URLs
**Solutions**:
* Verify the secret is correctly copied (no extra spaces)
* Ensure the secret is properly configured in `.bugster/config.yaml`
* Check that password protection is **disabled** in Vercel
* Try regenerating the Protection Bypass for Automation secret in Vercel dashboard
* Verify the secret is for "Protection Bypass for Automation" (not password protection)
**Symptoms**: Bugster doesn't detect new deployments
**Solutions**:
* Verify Vercel integration is properly configured
* Check webhook settings in Vercel project
* Ensure your branch triggers preview deployments
* Review Bugster project configuration
**Symptoms**: Tests fail on app login despite valid credentials
**Solutions**:
* Verify credentials work on the preview URL manually
* Check if preview environment uses different authentication
* Ensure database/auth services are accessible from preview
* Review environment variables in Vercel deployment
## Next Steps
Connect GitHub for complete CI/CD workflow with pull request comments
Configure advanced testing options and environment-specific settings
Learn about AI-powered destructive agents for comprehensive bug detection
Understand and analyze your test results and reports
# Quickstart
Source: https://docs.bugster.dev/quickstart
Get started with Bugster in 4 simple steps
Install Bugster CLI on your system.
```bash theme={null}
curl -sSL https://bugster.dev/install.sh | bash
```
```bash theme={null}
brew install Bugsterapp/homebrew-tap/bugster
```
Use the npm installation command below instead of curl. The rest of the steps are exactly the same.
```bash theme={null}
npm install -g @bugster/bugster-cli
```
Use the Windows PowerShell command below instead of curl. The rest of the steps are exactly the same.
```powershell theme={null}
irm https://bugster.dev/install.ps1 | iex
```
Detailed installation instructions and troubleshooting
Open your terminal and navigate to your project directory.
```bash theme={null}
cd your-project
```
Execute Bugster in your project folder.
```bash theme={null}
bugster
```
This opens the Bugster interactive testing shell.
Type your test request in natural language. For example:
```bash theme={null}
test the user login flow
```
Or try:
* `test the checkout process`
* `test that my application is running and I can access the home page`
## Next Steps
Learn how to create and manage multiple tests for your application.
Use AI agents to find bugs and edge cases in your application.
Master the Bugster interactive CLI for advanced testing workflows.