Kensa
A BDD testing framework for Kotlin & Java
Install / Use
/learn @kensa-dev/KensaREADME
<img src="./Logo.svg" alt="Kensa Logo" style="width: 40px; vertical-align: middle;"/> Kensa
Kensa is a BDD testing framework for Kotlin and Java. Write Given-When-Then tests directly in code — no Gherkin files, no step definitions. Kensa parses your test source at runtime to produce rich HTML reports and sequence diagrams.
Check out the documentation for quickstarts, API reference, and examples.
| Write this… | …get this |
|---|---|
|
|
|
Features
- Code-first BDD — Given-When-Then structure in plain Kotlin/Java; no external DSL files
- HTML reports — generated directly from test source, always in sync with the code
- Sequence diagrams — visualise interactions between actors captured during test execution
- Framework support — JUnit 5, Kotest, TestNG
- Assertion libraries — Kotest, AssertJ, Hamcrest, HamKrest
Getting Started
Add the dependency for your test framework:
// build.gradle.kts
dependencies {
testImplementation("dev.kensa:kensa-junit:<version>") // JUnit 5
// or
testImplementation("dev.kensa:kensa-kotest:<version>") // Kotest runner
// Assertions bridge (pick one or more)
testImplementation("dev.kensa:kensa-kotest:<version>")
testImplementation("dev.kensa:kensa-assertj:<version>")
}
Find the latest version on the releases page.
See the Kotlin quickstart or Java quickstart for a full setup walkthrough.
Tooling
CLI — serve reports locally
Every release ships pre-built binaries for macOS (Intel + Apple Silicon), Linux, and Windows.
Download kensa-<os>-<arch> from the latest release, then:
kensa serve <path-to-report-dir>
This starts a local HTTP server and opens your HTML reports in the browser.
Claude Code skill — AI-assisted test review
Every release also ships kensa-test.skill, a Claude Code skill that reviews Kensa tests for idiomatic style, fluency violations, and best-practice patterns.
Install it once:
claude plugin install kensa-test.skill
Then invoke it in any Claude Code session:
/kensa-test review this test
The skill checks for fluent English in rendered test bodies, correct use of Fixtures and CapturedOutputs, semantic assertion naming, composable setup toolboxes, and the typed context/mixin pattern for multi-stub tests.
Related Skills
gh-issues
344.4kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
99.2kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
