Skip to content

Installation (JUnit 5)

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.

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.

The raw run JSON file is written relative to the working directory. When running from Gradle or Maven, that is the project root.

Pass the raw run JSON to executable-stories-formatters to render Markdown, HTML, JUnit XML, or Cucumber formats:

Terminal window
npx executable-stories-formatters format --input .executable-stories/raw-run.json --format markdown

Install the formatters package once in your Node project or CI job:

Terminal window
npm install -D executable-stories-formatters

First Story (JUnit 5) — write your first Kotlin scenario.

JUnit 5 story & doc API — steps, docs, and adapter options.