Cli usage reference
Once installed, you can use Bugster CLI by running:
This command will display all available top-level commands, global options, and a list of subcommands
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:
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:
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:
bugster test
Run Bugster Tests
This command is used to run your Bugster tests.
Run the command (example with a specific test path):
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/
- Example:
--headless
(optional flag): Runs browser tests without opening a visible browser window.- Example:
bugster test --headless
- Example:
--silent
(optional flag): Suppresses some of the detailed output logging to the console.- Example:
bugster test --silent
- Example:
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.