Once installed, you can use Bugster CLI by running:

bugster --help

This command will display all available top-level commands, global options, and a list of subcommands

You can also get help for specific subcommands (e.g., bugster test --help) to see options for that particular command. E.g., bugster test --help.

Commands Overview

The Bugster CLI provides commands to initialize your configuration and run tests. Here are the main commands:

bugster init

Initialize Bugster Configuration

This command initializes the Bugster CLI configuration, setting up the necessary files and settings for you to start using Bugster.

Run the command:

bugster init

Key Actions:

  • Prompts for a “Base URL” (defaulting to http://localhost:3000).
  • Asks if you want to add credentials (e.g., username and password) and guides you through the process. If no credentials are added, it sets up default admin credentials.
  • Creates a .bugster directory in your current project.
  • Saves your configuration (Base URL, credentials) into a config.yml file within the .bugster directory.
  • Creates an example test file (e.g., example_test.yml) in a .bugster/examples directory to help you get started.
  • Displays the location of the created configuration and example test files, along with a table of the configured credentials.

bugster analyze

Analyze Your Codebase

This command lets Bugster agent analyze your codebase, understand it, and create a suite of tests based on the analysis.

Run the command:

bugster analyze

Key Actions:

  • Scans your codebase to understand its structure and functionality
  • Creates a suite of tests (currently 5 tests in v0) based on the analysis
  • The tests are created in Bugster format (YAML) which the agent uses to perform flows and validate results

Example test file created:

- name: Checkout Process Test
  task: Verify that users can complete the checkout process
  expected_result: Order should be successfully placed
  steps:
    - Navigate to /products page
    - Add a product to the cart
    - Navigate to /cart page
    - Verify product is in the cart
    - Click "Proceed to Checkout" button
    - Fill in shipping information
    - Select shipping method
    - Enter payment information
    - Review order summary
    - Click "Place Order" button
    - Verify order confirmation page is displayed

bugster test

Run Bugster Tests

This command is used to run your Bugster tests.

Run the command (example with a specific test path):

bugster test your_test_file.yml

Arguments/Options:

  • test_path (optional): Specify a particular test file or a directory containing test files. If not provided, it may look for tests in a default location (e.g., .bugster/examples).
    • Example: bugster test tests/smoke_tests/
  • --headless (optional flag): Runs browser tests without opening a visible browser window.
    • Example: bugster test --headless
  • --silent (optional flag): Suppresses some of the detailed output logging to the console.
    • Example: bugster test --silent

Key Actions During Execution:

  • Loads the configuration previously set up using the init command.
  • Finds and loads your test files (typically YAML or JSON).
  • For each test case:
    • The Bugster Agent opens a browser and performs the test exactly as described in the test file
    • The agent executes each step in the test file in sequence
    • The agent validates the results based on the expected outcomes
    • Upon completion, the agent determines if the test passed or failed
  • After all tests are run, displays a summary table of the results (Test Name, Result, Reason, Time taken) and the total time taken.
  • If any test fails, the command exits with an error code.

Dependencies

Bugster CLI relies on several Python packages. The primary dependencies are managed via setup.py and are also listed in requirements.txt.

Key dependencies include:

  • click
  • httpx
  • pydantic
  • rich
  • typer

For a full list of dependencies, please refer to the requirements.txt file or the install_requires section in setup.py.

Next Steps

Install Bugster CLI

Get started by installing the CLI on your system.