Metadata-Version: 2.4
Name: brunhilda
Version: 2.9.2
Summary: Bender Robotics System Test Runner
Author-email: Pavel Kumpan <kumpan@benderrobotics.com>
License-Expression: MIT
Project-URL: homepage, https://gitlab.benderrobotics.com/br/tools/brunhilda
Project-URL: documentation, https://gitlab.benderrobotics.com/br/tools/brunhilda
Project-URL: repository, https://gitlab.benderrobotics.com/br/tools/brunhilda
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Jinja2>=2.10.3
Requires-Dist: numpy>=1.17.3
Requires-Dist: ddt>=1.2.2
Requires-Dist: colorama>=0.4.1
Requires-Dist: docutils>=0.15.2
Requires-Dist: Pillow>=7.2.0
Requires-Dist: pyyaml
Requires-Dist: simplejson>=3.17.6
Requires-Dist: natsort>=8.1.0
Requires-Dist: tqdm>=4.67.3
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: bs4; extra == "test"
Provides-Extra: dev
Requires-Dist: mypy; extra == "dev"
Requires-Dist: yapf; extra == "dev"
Requires-Dist: numpy; extra == "dev"
Requires-Dist: lorem; extra == "dev"
Provides-Extra: doorstop-user-stories
Requires-Dist: doorstop==2.2.1; extra == "doorstop-user-stories"
Dynamic: license-file

# **BRunhilda** the test system

Brunhilda is the test runner with advanced reporting features.

## Documentation

- [How to run tests and create test reports.](doc/producer-guide.md)
- [How to read test reports.](doc/consumer-guide.md)

## Contributing

Here is a short guide to the environment setup to ease you up contributing to the
project. Start by installing and creating a virtual environment

```shell
pip install virtualenv
virtualenv venv
```

Now you should see `venv` folder in the project structure. Activate virtual
environment

```shell
source venv/bin/activate    # Linux
venv\Scripts\activate.bat   # Windows
```

After that you should see `(venv)` as a prefix to your command line cursor. You
have to repeat activation every time you close the terminal. To install the
package in development mode call:

```shell
pip install -e .
```

If you want to use Brunhilda for user stories defined by doorstop artifacts then install BRunhilda by calling a command below. Please note that BRunhilda with doorstop feature requires **Python >= 3.9**.

```shell
pip install -e .[doorstop-user-stories]
```

Now you can use `BRunhilda` package directly from the command line and all
changes to the source code are instantly applied.

### Testing

The project includes both unit tests and integration tests.

#### Integration Tests

Integration tests verify report generation and prevent regressions. They support two execution modes depending on whether backward compatibility needs to be verified:

- **Backward-Compatibility Testing (Two Datasets)**: Used for bug fixes where reports must be validated against datasets produced by older runner versions.

    1. **Original Dataset (`<runner_version>`):** Anonymized execution data captured from the specific runner version where the bug was reported.
    2. **Current Dataset (`head`):** Fresh execution data generated dynamically by running sample tests on the current version.

- **Single-Dataset Testing**: Used when testing general report features, layout, or formatting without needing legacy version comparisons. Only the current dataset is required, and the test fixture automatically skips the legacy execution pass if no legacy dataset folder is present.

##### Directory Structure

Integration tests are organized by bug tickets (`test/integration/<bug_ticket_number>/`):

```text
test/integration/14492/
├── test_14492_report_generation.py
└── data/
    ├── 2.8.1/    # Original data from the bug ticket
    └── head/     # Data generated from current execution
```

> [!NOTE]
> If no legacy folder (e.g., `2.8.1/`) is present in `data/`, the fixture automatically detects this and runs in single-dataset mode.

### Visual Studio Code tasks

To speed up the execution of useful operations for development, vscode tasks are implemented.

- `static-type-check` Static type checking using `mypy`
- `test-with-coverage` Running unit tests including measuring code coverage.
- `integration-tests` Running integration tests.

> Tasks can be run within vscode `Terminal -> Run Tasks...`
