zunit: Zero-Dependency Java 25 Test Runner 📎
zunit is a zero-dependency, single-file Java 25 Script test runner.
It discovers *Test.java source files and runs each directly via java --source 25.
No compilation step, no JUnit, no build tool required — just run zunit and go.
A GreeterTest.java example:
void main() {
var greeting = Greeter.greet("World");
assert Objects.equals("Hello, World!", greeting) : "expected 'Hello, World!' but got: " + greeting;
}
Each test is a self-contained Java source script with a void main() method.
Any thrown exception or non-zero exit code indicates test failure.
Each test gets its own JVM — full execution isolation with zero shared state.
Run it with:
zunitto auto-detect and run all tests,zunit -cp:zbo/app.jarfor an explicit classpathzb && zunitto build with zb first.
zunit is available from: github.com/AdamBien/zunit
The corresponding airails.dev skill is available from: github.com/AdamBien/airails/tree/main/java/zunit