A showcase project demonstrating Kensa — BDD testing for Kotlin & Java.
The domain is a fictional telecoms provider ("Clearwave") with two services and a small UI under test:
-
FeasibilityService — checks whether a broadband service can be delivered to a given address
-
OrderService — places a broadband order and coordinates with external network and tracking systems
-
Feasibility checker UI — a Vite + React + shadcn page that submits the feasibility form to the live
FeasibilityService, exercised end-to-end through both Playwright and Selenium -
System View — auto-generated component diagram showing the relationships across all services exercised in tests. Available as a top-level page in the report sidebar.
Tests are written using the Kensa Given-When-Then DSL with http4k stubs standing in for downstream APIs. The HTML report generated from these tests is published as a live example at:
kensa-dev.github.io/clearwave-example
The project has two test cycles.
./gradlew testRuns the http4k-driven FeasibilityServiceTest and OrderServiceTest. No browser needed. The report is written to build/kensa-output.
./gradlew installPlaywrightBrowsers # one-off — installs Chromium for Playwright
./gradlew uiTest # builds the UI and runs Playwright + Selenium testsUI tests need Chrome installed (Selenium uses it via Selenium Manager). The Vite UI is built automatically before the tests run. The report is written to build/kensa-output-ui.
To open either report:
kensa --dir build/kensa-output
kensa --dir build/kensa-output-uiThis project serves two roles:
-
Showcase — a realistic example of Kensa tests that visitors to kensa.dev can explore. The tests and domain are updated alongside the documentation.
-
Canary — run as part of Kensa's CI on every commit to master, building against the latest snapshot to catch regressions early. (UI tests are excluded from the canary because they need browsers.)
| Library | Role |
|---|---|
| Kensa | BDD test framework |
| Kensa Playwright / Kensa Selenium | UI testing drivers |
| http4k | HTTP client & stub server |
| Vite + React + shadcn/ui | Feasibility UI |
| Kotest | Assertions |
| JUnit 5 | Test runner |