Skip to main content

// Acceptance testing for Kotlin and Java

Output for everyone who didn’t write the test.

Given, When, Then in plain code, no feature files. The report is generated from the test that ran, with real values, every message between services, and an interactive sequence diagram.

Apache 2.0 · Kotlin 2.x · Java 17+ · JUnit 5 / 6 · Kotest · TestNG

OrderServiceTest · reportpassed

Loading the live report…

// See it in action

Write this. Get this.

A real test from the Clearwave example, and the sentences the report produced from it. The method names become the words; the values come from the run.

OrderServiceTest.kt
@Test
fun `voice and broadband order is successfully completed`() {
given(openNetworkWillCompleteTheOrder())
and(fibreVisionWillCompleteTheOrder())

whenever(aVoiceAndBroadbandOrderIsPlaced())

then(theOrderConfirmation(), shouldBePending())
thenEventuallyAllNotifications(
shouldShowBothSuppliersCompletedSuccessfully(
voiceSupplier = fixtures[voiceSupplier],
broadbandSupplier = fixtures[broadbandSupplier],
)
)
}
report · from the run
voice and broadband order is successfully completed
Givenopen network will complete the order
Andfibre vision will complete the order
Whena voice and broadband order is placed
Thenthe order confirmation should be pending
Theneventually all notifications should show both suppliers completed successfully
voice supplier = OpenNetwork
broadband supplier = FibreVision
12 interactions captured, 18 fixtures, and a sequence diagram, in the full report

// Who it is for

One report, three readers.

For the people who can’t read the code

Testers, analysts and product owners get a report that says what the system did: Given–When–Then sentences with this run’s real values, every message that crossed between services, and a sequence diagram drawn from them. Open any interaction and read the payload.

For the developer writing it

Ordinary Kotlin or Java on JUnit 5 & 6, Kotest or TestNG, with the assertions you already use. No feature files, no step definitions, nothing to keep in sync. Refactor and the report follows, because the report is generated from the test that ran.

For the system you actually ship

Built for acceptance tests that sit outside a deployed application. Push a message in, watch what comes out, and let the report show the traffic. Link each test to its ticket with @Issue and the specification, the test and the evidence are one thing.

// Embed

Put the report where the decision is made.

Any test, chromeless, at a stable URL. Drop it into a Confluence page, a Jira story, a design doc or a service catalog. The page shows what the system did, and it stays current with every run.

Embedding a report →
Acceptance criteria·CW-214 Voice and broadband bundle

When a customer places a combined order, both suppliers must confirm before the order is marked complete.

voice and broadband order is successfully completed
Givenopen network will complete the order
Whena voice and broadband order is placed
Theneventually all notifications should show both suppliers completed successfully
kensa · OrderServiceTest · latest runpassed

Plugins & Integrations

Surface Kensa output where your team already works.

IntelliJ Plugin

Open reports from your IDE

Open any Kensa test report in your browser directly from IntelliJ IDEA.

  • Gutter icons on test functions
  • Links in test console output
  • Test toolbar actions
TeamCity Plugin

Reports inside your CI

Embed Kensa reports, GWT test names, and failure narratives directly in TeamCity builds.

  • Kensa Report tab on every build
  • Given-When-Then test display names
  • Failure summaries with captured state
Gradle & Maven

Reports from your build

Site mode aggregates every module’s reports into one browsable site, published from CI.

  • One site across subprojects
  • Run markers and live counts
  • Gradle Plugin Portal and Maven Central