Zero-dependency, single-file Java test runner. Discovers *Test.java source files and runs each directly via java --source 25 in a separate process. No compilation step, no JUnit, no build tool required — just run zunit and go. Each test gets its own JVM — full execution isolation with zero shared state.
- Test files: name ends with
Test.java - Each file is a self-contained Java source script with
void main() - Execution isolation: each test runs in its own JVM process — no shared state, no interference between tests
- Failure: any thrown exception or non-zero exit = failed
Example test:
import java.util.Objects;
void main() {
var greeting = Greeter.greet("World");
assert Objects.equals("Hello, World!", greeting) : "expected 'Hello, World!' but got: " + greeting;
}zunit [options]
| Option | Description |
|---|---|
-help |
Show help |
-cp:<path> |
Override classpath for main classes |
-tp:<path> |
Override test source path |
-verbose |
Show debug info |
src/test/java/— Maven layouttest/— simple layout.— fallback
.zbconfig (jar.dir+jar.file.name) — zb configurationzbo/app.jar— zb defaulttarget/classes— Maven outputclasses/— simple layout.— fallback
zunit # auto-detect and run all tests
zunit -cp:zbo/app.jar # explicit classpath
zunit -tp:test/ # explicit test source path
zunit -verbose # show debug outputzb && zunitzunit reads the .zb configuration file (if present) to resolve the JAR path from jar.dir and jar.file.name. Falls back to zbo/app.jar if .zb is absent.
A zunit skill is available for AI-assisted generation and execution of zunit tests.
- bce.design — Boundary-Control-Entity architecture
- zcl — Zero-dependency Colour Logger
- zcfg — Zero-dependency Configuration Utility
- zb — Zero-dependency Builder
- airails.dev — AI-powered Development
