What fuzz output formats are available in EK9?
← Fuzzing and Mutation Testing · Ref: Q751
EK9 fuzzing supports four output formats, using the same suffix pattern as the test runner (-t flags).
OUTPUT FORMAT FLAGS
ek9 -fuzz <minutes> Human-readable output (default, same as -fuzz1). ek9 -fuzz0 <minutes> Terse output: one-line CI pass/fail summary. ek9 -fuzz2 <minutes> JSON output: fuzz-report.json + fuzz-snapshots.jsonl. ek9 -fuzz6 <minutes> HTML dashboard: fuzz-report/index.html.
HUMAN-READABLE (-fuzz)
Shows a rolling summary with iterations per second, crash count, phase distribution, and error code histogram. Best for interactive development.
TERSE (-fuzz0)
One-line output suitable for CI pipelines: total iterations, crashes found, duration. Exit code 0 if no crashes, 15 if one or more compiler crashes were found (every format exits the same way).
JSON (-fuzz2)
Structured output for programmatic analysis:
- fuzz-report.json holds the final summary with crash count, iterations and timing.
- fuzz-snapshots.jsonl holds periodic snapshots, suitable for throughput graphing.
Ideal for AI-assisted analysis or custom dashboards.
HTML DASHBOARD (-fuzz6)
Interactive report at fuzz-report/index.html with:
Error code coverage grid, phase funnel and distribution charts, strand comparison charts, crash and limitation counts.
Same visual quality as the -t6 coverage dashboard.
CI INTEGRATION
For CI, use -fuzz0 with a short duration as a smoke test:
ek9 -fuzz0 5
Exit code 15 means the fuzzer found a compiler crash: fail the build on it. It is deliberately not 11, which means a unit test failed.
See Q749 for fuzzing overview. See Q750 for running the fuzzer. See Q752 for reading the HTML dashboard. See Q157 for test output formats (same suffix pattern).
Example
defines module qa.fuzzingandmutation.outputformats <?- Demonstrates code with multiple output paths that would produce different fuzz statistics depending on coverage. The output format flags control how those statistics are reported, not what the code does. -?> defines function categorise() as pure -> score as Integer <- category as String: "unknown" failThreshold <- 40 passThreshold <- 70 excellentThreshold <- 90 if score < failThreshold category: "fail" else if score < passThreshold category: "pass" else if score < excellentThreshold category: "good" else category: "excellent" formatResult() as pure -> studentName as String score as Integer <- report as String: String() grade <- categorise(score) report: `${studentName}: ${score} (${grade})` defines program FuzzOutputFormatsDemo() stdout <- Stdout() scores <- [35, 55, 78, 95] names <- ["Alice", "Bob", "Carol", "Dave"] idx <- 0 defaultName <- "Unknown" for score in scores studentName <- names.getOrDefault(idx, defaultName) if studentName? stdout.println(formatResult(studentName, score)) idx: idx + 1
Other ways to ask this
- What is the difference between -fuzz, -fuzz0, -fuzz2, and -fuzz6?
- How do I get JSON output from the EK9 fuzzer?
- How do I integrate EK9 fuzzing into CI?
Coming from another language?
Java: Jazzer outputs to stdout or JUnit XML (limited formats). Python: Atheris writes crash files, no structured output. Rust: cargo-fuzz outputs crash files and stdout only. Go: go test -fuzz writes to testdata/ directory. EK9: four built-in output formats (human, terse, JSON, HTML) matching the test runner pattern, with CI-friendly exit codes.
Keywords: output, fuzz0, fuzz2, report, dashboard, fuzz6, fuzz, html, CI, format, json, terse