Expand description
Cloud-friendly entry points for invoking bench, conformance, OWASP, security-payload, WAFBench, and CRUD-flow runs programmatically.
The CLI in command.rs is the primary user-facing surface, but it assumes
the caller can supply paths on disk and is OK with stdout reporting. Cloud
callers (the registry server) need to:
- Pass the OpenAPI spec as raw bytes (no filesystem coordination).
- Receive every artifact that was written to the run’s output directory as in-memory bytes, so they can be persisted to Postgres / Tigris.
- Read structured
K6Resultswithout re-parsingsummary.json.
This module provides exactly that. Each run_* function:
- Creates a private tempdir,
- Writes the supplied spec bytes into it,
- Builds a
BenchCommandwith cloud-appropriate defaults, - Executes the run,
- Slurps every file produced under the output dir into a
CloudRunArtifactsmap.
The CLI is unchanged — it still uses BenchCommand directly. Progress
reporting (TerminalReporter) still goes to stdout; suppressing or
redirecting it is intentionally out of scope for this module and will be
handled by a follow-up that introduces a ProgressSink.
Structs§
- Cloud
Bench Inputs - Inputs for
run_bench— a k6 load test against an external URL. - Cloud
Conformance Inputs - Inputs for
run_conformance— OpenAPI 3.0.0 conformance testing against an external URL. - Cloud
Crud Flow Inputs - Inputs for
run_crud_flow— CRUD chain testing (Create → Read → Update → Delete sequences with cross-step ID extraction). - Cloud
Owasp Inputs - Inputs for
run_owasp— OWASP API Security Top 10 testing. - Cloud
RunArtifacts - Every artifact produced by a cloud run.
- Cloud
Security Inputs - Inputs for
run_security— payload-injection security testing layered on a standard k6 bench run. - Cloud
WafBench Inputs - Inputs for
run_wafbench— Microsoft WAFBench-style coverage tests using the OWASP Core Rule Set attack patterns.
Enums§
- Spec
Format - Format hint for OpenAPI specs supplied as raw bytes.
Functions§
- run_
bench - Run a k6 load test against
CloudBenchInputs::target_urland return all produced artifacts in memory. - run_
conformance - Run an OpenAPI 3.0.0 conformance test against
CloudConformanceInputs::target_url. - run_
crud_ flow - Run a CRUD flow test against
CloudCrudFlowInputs::target_url. - run_
owasp - Run an OWASP API Security Top 10 test.
- run_
security - Run a payload-injection security test layered on a standard k6 bench.
- run_
wafbench - Run a WAFBench (OWASP CRS) coverage test.