๐ Learning and exploring JUnit.
The programmer-friendly testing framework for Java and the JVM
This repository illustrates different concepts, patterns and examples via standalone subprojects. Each subproject is completely independent of the others and do not depend on the root project. This standalone subproject constraint forces the subprojects to be complete and maximizes the reader's chances of successfully running, understanding, and re-using the code.
A build-tool-free (no Gradle/Maven) Java project that is tested with JUnit in a standalone way using the JUnit Console Launcher.
See the README in standalone/.
In a Gradle project, build an escape hatch to run the test suite in a standalone way using the JUnit Console Launcher instead of Gradle.
See the README in standalone-gradle/.
General clean-ups, TODOs and things I wish to implement for this project:
- SKIP Optimize the CI build (GitHub Actions). The set up Java step is slow (20s), why even do it? Maybe make a base Docker image tailor-made for Gradle/Java projects.
- DONE Migrate the Java Early Access example to https://github.com/dgroomes/gradle-playground because it is really a Gradle thing not a JUnit thing.
- DONE Split into sub-projects. In particular, there should be a 'basic' example and a 'junit-standalone' example
- DONE Migrate to Gradle's Kotlin DSL
- DONE Is is it possible to use the Gradle application or distribution plugins to create the standalone escape hatch? Would this be more idiomatic? Instead of building a file of references to classes by hand, I think this would be better.