robotmk-bridge-testdatagenerator
Generates synthetic test result files for robotmk-bridge-plugin testing. Produces realistic, randomized output in the formats consumed by the bridge plugin's handlers.
Supported Formats
| Handler | Format | Extension | Default count |
|---|---|---|---|
junit |
JUnit XML | .xml |
5 test cases |
zaproxy |
OWASP ZAP XML v2.7.0 | .xml |
3 sites |
gatling |
Gatling simulation.log v2.0 | .log |
10 requests |
locust |
Locust stats CSV | .csv |
5 endpoints |
Quick Start with uv
uv is the recommended way to run this tool.
Run without installing (one-liner)
uvx --from robotmk-bridge-testdatagenerator rmkb-testgen --list
uvx --from robotmk-bridge-testdatagenerator rmkb-testgen --output-dir /tmp/test-data
Install as a persistent tool
uv tool install robotmk-bridge-testdatagenerator
rmkb-testgen --help
# Upgrade later
uv tool upgrade robotmk-bridge-testdatagenerator
# Uninstall
uv tool uninstall robotmk-bridge-testdatagenerator
Development Setup with uv
git clone https://github.com/elabit/robotmk-bridge-testdatagenerator.git
cd robotmk-bridge-testdatagenerator
# Install package + all dev dependencies (pytest, ruff, etc.)
uv sync
# Run the CLI from source
uv run rmkb-testgen --list
uv run rmkb-testgen --output-dir /tmp/test-data --verbose
# Build distributable artifacts
uv build
# -> dist/robotmk_bridge_testdatagenerator-*.whl
# -> dist/robotmk_bridge_testdatagenerator-*.tar.gz
# Editable install (changes take effect immediately, no reinstall needed)
uv pip install -e .
# Install local wheel into another project
uv add /path/to/dist/robotmk_bridge_testdatagenerator-0.2.0-py3-none-any.whl
Testing
# Run all tests (unit + acceptance)
uv run pytest
# Run with coverage report
uv run pytest --cov
# Run only unit tests
uv run pytest tests/unit/
# Run only acceptance tests (CLI + library API)
uv run pytest tests/acceptance/
# Lint
uv run ruff check src/ tests/
| Test layer | Location | What it covers |
|---|---|---|
| Unit | tests/unit/ |
Each generator in isolation: file creation, format validity, status semantics |
| Acceptance | tests/acceptance/ |
CLI via subprocess (rmkb-testgen), public library API (generate_*) |
CLI Reference
rmkb-testgen [options]
python -m robotmk_bridge_testdatagenerator [options]
| Flag | Short | Default | Description |
|---|---|---|---|
--output-dir PATH |
-o |
tests/e2e/data |
Output directory |
--status |
-s |
passed |
passed / failed / mixed |
--handlers HANDLER... |
-H |
all | Generate specific handlers only |
--count [HANDLER=]N |
-n |
handler default | Item count (repeatable) |
--pattern |
-p |
{handler}.{ext} |
Filename pattern |
--continuous |
-c |
off | Regenerate on interval |
--interval SECS |
-i |
5.0 |
Seconds between continuous runs |
--list |
-l |
— | List available handlers and exit |
--verbose |
-v |
off | Verbose output |
Examples
# List available handlers
rmkb-testgen --list
# Generate all with defaults
rmkb-testgen --output-dir /tmp/test-data
# Specific status
rmkb-testgen --status failed --output-dir /tmp/test-data
# Specific handlers only
rmkb-testgen --handlers junit gatling --output-dir /tmp/test-data
# Control item count — all handlers
rmkb-testgen --count 20 --output-dir /tmp/test-data
# Per-handler counts
rmkb-testgen -n junit=20 -n gatling=50 -n zaproxy=2 -n locust=8 --output-dir /tmp/test-data
# Continuous regeneration (Ctrl+C to stop)
rmkb-testgen --continuous --interval 5 --output-dir /tmp/test-data
# Custom handlers.yaml
ROBOTMK_HANDLERS_YAML=/path/to/handlers.yaml rmkb-testgen --output-dir /tmp/test-data
Library Usage
from robotmk_bridge_testdatagenerator import (
generate_all_handler_files,
generate_handler_file,
get_supported_handlers,
)
from pathlib import Path
# Generate all handlers
files = generate_all_handler_files(
output_dir=Path("/tmp/test-data"),
test_status="mixed",
handler_kwargs={
"junit": {"num_tests": 20},
"gatling": {"num_requests": 50},
"zaproxy": {"num_sites": 2},
"locust": {"num_endpoints": 8},
},
)
# Generate a single handler
generate_handler_file(
handler_name="junit",
output_path=Path("/tmp/result.xml"),
test_status="failed",
num_tests=10,
)
# List available handlers
handlers = get_supported_handlers() # ['junit', 'gatling', 'zaproxy', 'locust']
Test Status Semantics
| Status | JUnit | ZAP | Gatling | Locust |
|---|---|---|---|---|
passed |
All pass | Low-risk alerts only | All requests OK | 0 failures |
failed |
All fail | High-risk alerts | All requests KO | 50%+ failures per endpoint |
mixed |
Every 3rd fails | Low + medium risk | Every 4th KO | Every 2nd endpoint has failures |
handlers.yaml
The handler registry is bundled with the package. Override for custom handler definitions:
ROBOTMK_HANDLERS_YAML=/path/to/your/handlers.yaml rmkb-testgen --output-dir /tmp/test-data
Installation without uv
pip install robotmk-bridge-testdatagenerator
rmkb-testgen --help
License
GPLv2, see LICENSE for details.
Metadata
Release files for robotmk-bridge-testdatagenerator 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotmk_bridge_testdatagenerator-0.5.0.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotmk_bridge_testdatagenerator-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.9 kB
Release files / robotmk_bridge_testdatagenerator-0.5.0.tar.gz
| Download URL | robotmk_bridge_testdatagenerator-0.5.0.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3545787b52d8a9771036996c5196d00e57cb0e6342cd4cc7897ab2c5ea9d4abb
|
|
BLAKE2b-256 checksum How to use checksums |
05371c41e209a18c47b6080008b607ba631de11871bbacb95f341c93a73f549f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency logRelease files / robotmk_bridge_testdatagenerator-0.5.0-py3-none-any.whl
| Download URL | robotmk_bridge_testdatagenerator-0.5.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dde679b9316272cc860c8bccc4d9f68ee4c5151b68f3258ba6d3e2d34aaf589f
|
|
BLAKE2b-256 checksum How to use checksums |
a15d5b6c36af1d6006bc1f6c2fc3135f064e16be76e3a54f3e91fcbb0934d6f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.
Transparency log