Installation (JUnit 5)
Install the dependency
Section titled “Install the dependency”Add the dependency to your build file.
Gradle (Kotlin DSL):
testImplementation("io.github.jagreehal:executable-stories-junit5:0.1.0")Gradle (Groovy DSL):
testImplementation 'io.github.jagreehal:executable-stories-junit5:0.1.0'Maven:
<dependency> <groupId>io.github.jagreehal</groupId> <artifactId>executable-stories-junit5</artifactId> <version>0.1.0</version> <scope>test</scope></dependency>Requires Java 21 or later and JUnit 5.11 or later.
Framework setup
Section titled “Framework setup”No explicit setup is required. The StoryTestExecutionListener registers itself automatically via JUnit Platform service discovery. Add the dependency and the listener activates for your entire test run.
The listener writes .executable-stories/raw-run.json after all tests have finished.
Default output
Section titled “Default output”The raw run JSON file is written relative to the working directory. When running from Gradle or Maven, that is the project root.
Generate a report
Section titled “Generate a report”Pass the raw run JSON to executable-stories-formatters to render Markdown, HTML, JUnit XML, or Cucumber formats:
npx executable-stories-formatters format --input .executable-stories/raw-run.json --format markdownInstall the formatters package once in your Node project or CI job:
npm install -D executable-stories-formattersFirst Story (JUnit 5) — write your first Kotlin scenario.
JUnit 5 story & doc API — steps, docs, and adapter options.