https://github.com/kensa-dev/kensa
A BDD testing framework for Kotlin & Java
https://github.com/kensa-dev/kensa
agile-methodologies bdd bdd-framework fluent java junit5 kotlin tdd testing
Last synced: 21 days ago
JSON representation
A BDD testing framework for Kotlin & Java
- Host: GitHub
- URL: https://github.com/kensa-dev/kensa
- Owner: kensa-dev
- License: apache-2.0
- Created: 2022-07-18T07:13:17.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-09T14:19:57.000Z (3 months ago)
- Last Synced: 2026-02-09T19:12:31.537Z (3 months ago)
- Topics: agile-methodologies, bdd, bdd-framework, fluent, java, junit5, kotlin, tdd, testing
- Language: Kotlin
- Homepage: https://kensa.dev/
- Size: 3.29 MB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - Kensa
- fucking-awesome-java - Kensa - Code-first BDD framework for Java and Kotlin that generates interactive HTML reports and sequence diagrams from test code. (Projects / Testing)
- awesome-java - Kensa - Code-first BDD framework for Java and Kotlin that generates interactive HTML reports and sequence diagrams from test code. (Projects / Testing)
README
#
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](https://kensa.dev) 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:
```kotlin
// build.gradle.kts
dependencies {
testImplementation("dev.kensa:kensa-junit:") // JUnit 5
// or
testImplementation("dev.kensa:kensa-kotest:") // Kotest runner
// Assertions bridge (pick one or more)
testImplementation("dev.kensa:kensa-kotest:")
testImplementation("dev.kensa:kensa-assertj:")
}
```
Find the latest version on the [releases page](https://github.com/kensa-dev/kensa/releases).
See the [Kotlin quickstart](https://kensa.dev/docs/quickstart/kotlin-quickstart) or [Java quickstart](https://kensa.dev/docs/quickstart/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--` from the [latest release](https://github.com/kensa-dev/kensa/releases/latest), then:
```bash
kensa serve
```
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](https://claude.ai/code) skill that reviews Kensa tests for idiomatic style, fluency violations, and best-practice patterns.
Install it once:
```bash
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.