Skip to main content

Generates synthetic test result files (JUnit, ZAP, Gatling) for robotmk-bridge-plugin testing

Project description

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
junit JUnit XML .xml
zaproxy OWASP ZAP XML v2.7.0 .xml
gatling Gatling simulation.log v2.0 .log

Installation

pip install robotmk-bridge-testdatagenerator

CLI Usage

# Generate all handlers (output: tests/e2e/data/)
rmkb-testgen

# Specify output directory and status
rmkb-testgen --output-dir /tmp/test-data --status failed

# Generate specific handlers only
rmkb-testgen --handlers junit gatling

# Continuous mode (Ctrl+C to stop)
rmkb-testgen --continuous --interval 5

# List available handlers
rmkb-testgen --list

Options

Flag Short Default Description
--output-dir -o tests/e2e/data Output directory
--status -s passed passed / failed / mixed
--handlers -H all Specific handlers to generate
--pattern -p {handler}.{ext} Filename pattern
--continuous -c off Regenerate on interval
--interval -i 5.0 Seconds between generations
--list -l List handlers and exit
--verbose -v off Verbose output

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(Path("/tmp/test-data"), test_status="mixed")

# Generate a single handler
generate_handler_file("junit", Path("/tmp/result.xml"), test_status="failed")

# List handlers
handlers = get_supported_handlers()  # ['junit', 'gatling', 'zaproxy']

Custom handlers.yaml

By default the bundled handlers.yaml is used. Override via environment variable:

ROBOTMK_HANDLERS_YAML=/path/to/your/handlers.yaml rmkb-testgen

Test Status Semantics

Status JUnit ZAP Gatling
passed All pass Low-risk alerts only All requests OK
failed All fail High-risk alerts All requests KO
mixed Every 3rd fails Low + medium risk Every 4th KO

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotmk_bridge_testdatagenerator-0.3.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file robotmk_bridge_testdatagenerator-0.3.0.tar.gz.

File metadata

File hashes

Hashes for robotmk_bridge_testdatagenerator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 91f094a22b46efefb00a74b3d94e9e5f5096ecbea7e258642b8207c29adc5788
MD5 1a7143cf355e578e44aa67cfd5dbbeec
BLAKE2b-256 2f2a77af0756cb6cd289115bec34bfc290b0b3143e15132301ae4203e5bbba36

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotmk_bridge_testdatagenerator-0.3.0.tar.gz:

Publisher: release-please.yml on elabit/robotmk-bridge-testdatagenerator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robotmk_bridge_testdatagenerator-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for robotmk_bridge_testdatagenerator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 107db4e1b1049ee12938bf22b82ec36e8986bfbf6fe9a10370c2b84920620106
MD5 58300484e2f83464149fd26734f49e99
BLAKE2b-256 128e3acb8411a3dc9037c00daf7f7c95878482deff6b17381dd1eb8040b18010

See more details on using hashes here.

Provenance

The following attestation bundles were made for robotmk_bridge_testdatagenerator-0.3.0-py3-none-any.whl:

Publisher: release-please.yml on elabit/robotmk-bridge-testdatagenerator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page