Overview

Purpose: Analyzes your codebase with AI and generates intelligent test specifications. 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
Important notes:
  • Can take few minutes for large codebases
  • Generates test specs in .bugster/tests/ directory
  • Uses AI to understand your app structure and user flows
  • Can be run multiple times - won’t duplicate existing tests
  • Supports filtering by specific pages/components

CLI Reference

CommandDescriptionExample
bugster generateAnalyze entire codebase and generate testsbugster generate
bugster generate --count 10Generate specific number of tests per pagebugster generate --count 10
bugster generate --page <paths>Generate tests for specific pages onlybugster generate --page "pages/auth.tsx,pages/settings.tsx"

Flags

FlagDescriptionExample
--countNumber of test specs to generate per page (min: 1, max: 30, default: varies)--count 15
--pageGenerate specs only for specific page files (comma-separated relative paths)--page "pages/login.tsx,components/auth/signup.tsx"
--show-logsShow detailed logs during analysis (deprecated, use —debug)--show-logs

Page Filtering Examples

Use CaseCommandDescription
Single page--page "pages/dashboard.tsx"Generate tests for one specific page
Multiple pages--page "pages/auth.tsx,pages/settings.tsx"Generate tests for multiple pages
Component focus--page "components/forms/login.tsx"Generate tests for specific components
Directory pattern--page "pages/admin/"Target all pages in a directory
Pro Tips:
  • Use --page to focus on recently modified files
  • Higher --count values generate more comprehensive test scenarios
  • First run analyzes your entire app structure (caching for faster subsequent runs)
  • Generated tests are saved as YAML files with human-readable test steps