Changelog
0.6.0 - 2026-11-21
Added
testingx.fuzzBytesadaptsstd.testing.fuzzto a byte-slice target:fuzzBytes(context, max_len, testOne, options)fills amax_lenstack buffer and passes the slice totestOne.max_lenis required and comptime; there is no default bound. A corpus entry is the bytes the target receives:.corpus = &.{"hello"}replayshello, because the adapter writes the length thatSmith.slicereads. Do not prefix seed files by hand. An entry longer thanmax_lenreaches the target as its firstmax_lenbytes. An input the fuzzer saved is already framed, so unwrap a crash file before adding it to.corpus.
Fixed
- Benchmarks built with
addBenchandaddBenchExeinstalltestingx.benchPanic. A panic printsPANIC in benchmark "<name>": <message>with a stack trace and exits 1, with noSIGABRTor core file. A custom benchmarkmaincan bindpub const panic = testingx.benchPanic;. --disasmresolves the symbol in a benchmark executable that links libc.std.debug.getModuleNamereportsMissingDebugInfofor the main program when the loader names it with an empty string, so the lookup now falls back to the running executable. If your benchmarks call C code,link_libc = trueno longer costs you disassembly.
0.5.0 - 2026-11-16
Removed
- Zig 0.16 support:
minimum_zig_versionis0.17.0, andrun.addPassthruArgs()replacesif (b.args) |args| run.addArgs(args)for forwarding flags after--. Build with Zig 0.17 or newer.
0.4.0 - 2026-11-02
Changed
- testingx builds with Zig 0.16 and 0.17.
minimum_zig_versionstays0.16.0, and CI tests both versions. - The runner picks a random seed when
--seedis not given and prints it in the summary. The build no longer passesb.graph.random_seed, which Zig 0.17 removed. - In
build.zig, forward the flags after--withrun.addPassthruArgs()on Zig 0.17. On Zig 0.16, useif (b.args) |args| run.addArgs(args).
0.3.0 - 2026-10-31
Changed
- Public struct fields are now required, so a bare
.{}or a partial literal no longer compiles for value types:bench.SliceArgsbuilds fromSliceArgs.init,bench.ResultfromResult.zero,bench.PbfromPb.init,perfcounter.CountersfromCounters.empty, andbenchfmt.ReaderfromReader.init;bench.Bandbench.CountingAllocatorare built only through theirinitconstructors.bench.Optionskeeps its field defaults: pass a partial literal, or.{}, toOptions.parseandB.init.
0.2.0 - 2026-10-25
Added
-
--artifacts=DIRgives each test a directory for files worth keeping on failure (TESTINGX_ARTIFACTSsets it).testingx.writeArtifactwrites into it, the runner keeps the directory only when the test fails and prints the path, andtestingx.txtar.formatwrites the same archive formatfixtures()reads, so an artifact can become a fixture. -
std.loglines from a test are captured and printed under that test's result. A failed test shows its log,verboseshows logs for passes too, and a quiet run stays quiet. Error logs still fail the test. -
--skip=Premoves tests from the--filterselection, andTESTINGX_SKIPsets it from the environment. A skip that leaves nothing to run passes.--listprints the selected fully qualified names to stdout and runs nothing, so CI can shard on the output. -
--disasm PATTERNprints the linker symbol, its address range, and the disassembly of each matching benchmark, with source lines and addresses stripped so two builds diff.--cyclesaddscycles/op,instructions/op,branches/op, andipcfrom hardware counters (Linux, user space), andTESTINGX_BENCH_CYCLESmakes it the local default.B.reportCounters()is the per-benchmark form, the wayB.reportAllocs()is for allocations.zig build bench-bininstalls the binary both flags point at. -
--allow-empty-filterandTESTINGX_ALLOW_EMPTY_FILTERmake a filter that matches no tests print a zero summary and exit 0, so a build can forward one filter to every test binary. The default still fails.
0.1.1 - 2026-10-19
Added
- A test runner for Zig 0.16 that writes plain text to stderr, with
--format,--filter,--timeout,--count,--rerun-fails,--shuffle, and--slowest. - Go-style benchmarks:
b.loop(),b.setBytes,b.reportMetric, and sub-benchmarks throughb.run, printed in the Go benchmark format sobenchstatcompares two runs. - Compile-time fixtures:
testingx.b64andtestingx.hexdecode one embedded file, andtestingx.fixturesreads a txtar archive by name. - A lazy mode (
.lazy = truewith the package-hash guard) so a consumer's build never fetches the runner or the benchmarks.