Stove
Stove: The easiest way of writing e2e/component tests for your JVM back-end app with Kotlin
Install / Use
/learn @Trendyol/StoveREADME
stove {
// Call API and verify response
http {
postAndExpectBodilessResponse("/orders", body = CreateOrderRequest(userId, productId).some()) {
it.status shouldBe 201
}
}
// Verify database state
postgresql {
shouldQuery<Order>("SELECT * FROM orders WHERE user_id = '$userId'", mapper = { row ->
Order(row.string("status"))
}) {
it.first().status shouldBe "CONFIRMED"
}
}
// Verify event was published
kafka {
shouldBePublished<OrderCreatedEvent> {
actual.userId == userId
}
}
// Access application beans directly
using<InventoryService> {
getStock(productId) shouldBe 9
}
}
https://github.com/user-attachments/assets/14597dc6-e9d4-43ab-8cfa-578ab3c3e6df
Why Stove?
The JVM ecosystem has excellent frameworks for building applications, but e2e testing remains fragmented. Testcontainers handles infrastructure, but you still write boilerplate for configuration, app startup, and assertions. Differently for each framework.
Stove explores how the testing experience on the JVM can be improved by unifying assertions and the supporting infrastructure. It creates a concise and expressive testing DSL by leveraging Kotlin's unique language features.
Stove works with Java, Kotlin, and Scala applications across Spring Boot, Ktor, Micronaut, and Quarkus. Because tests are framework-agnostic, teams can migrate between stacks without rewriting test code. It empowers developers to write clear assertions even for code that is traditionally hard to test (async flows, message consumers, database side effects).
What Stove does:
- Starts containers via Testcontainers or connect provided infra (PostgreSQL, MySQL, Kafka, etc.)
- Launches your actual application with test configuration
- Exposes a unified DSL for assertions across all components
- Provides access to your DI container from tests
- Debug your entire use case with one click (breakpoints work everywhere)
- Get code coverage from e2e test execution
- Supports Spring Boot, Ktor, Micronaut, Quarkus
- Extensible architecture for adding new components and frameworks (Writing Custom Systems)
Dashboard (New in 0.23.0)
Stove Dashboard introduces a local real-time dashboard for end-to-end test runs. It captures HTTP calls, Kafka activity, database assertions, and traces in one place so you can inspect successful and failed runs with full context.
Quick start
# 1) Install and start the Dashboard CLI
brew install Trendyol/trendyol-tap/stove
stove
# 2) Run your tests and open the dashboard
./gradlew test
# http://localhost:4040
dependencies {
testImplementation(platform("com.trendyol:stove-bom:$version"))
testImplementation("com.trendyol:stove-dashboard")
testImplementation("com.trendyol:stove-tracing")
}
Stove()
.with {
dashboard { DashboardSystemOptions(appName = "product-api") }
tracing { enableSpanReceiver() } // recommended
}.run()
See Dashboard docs and 0.23.0 release notes for full details.
Getting Started
1. Add dependencies
dependencies {
// Import BOM for version management
testImplementation(platform("com.trendyol:stove-bom:$version"))
// Core and framework starter
testImplementation("com.trendyol:stove")
testImplementation("com.trendyol:stove-spring") // or stove-ktor, stove-micronaut, stove-quarkus
// Component modules
testImplementation("com.trendyol:stove-postgres")
testImplementation("com.trendyol:stove-mysql")
testImplementation("com.trendyol:stove-kafka")
}
Snapshots: As of 5th June 2025, Stove's snapshot packages are hosted on Central Sonatype.
repositories { maven("https://central.sonatype.com/repository/maven-snapshots") }
2. Configure Stove (runs once before all tests)
class StoveConfig : AbstractProjectConfig() {
override suspend fun beforeProject() = Stove()
.with {
httpClient {
HttpClientSystemOptions(baseUrl = "http://localhost:8080")
}
postgresql {
PostgresqlOptions(
cleanup = { it.execute("TRUNCATE orders, users") },
configureExposedConfiguration = { listOf("spring.datasource.url=${it.jdbcUrl}") }
).migrations {
register<CreateUsersTable>()
}
}
kafka {
KafkaSystemOptions(
cleanup = { it.deleteTopics(listOf("orders")) },
configureExposedConfiguration = { listOf("kafka.bootstrapServers=${it.bootstrapServers}") }
).migrations {
register<CreateOrdersTopic>()
}
}
bridge()
springBoot(runner = { params ->
myApp.run(params) { addTestDependencies() }
})
}.run()
override suspend fun afterProject() = Stove.stop()
}
3. Write tests
test("should process order") {
stove {
http {
get<Order>("/orders/123") {
it.status shouldBe "CONFIRMED"
}
}
postgresql {
shouldQuery<Order>("SELECT * FROM orders", mapper = { row ->
Order(row.string("status"))
}) {
it.size shouldBe 1
}
}
kafka {
shouldBePublished<OrderCreatedEvent> {
actual.orderId == "123"
}
}
}
}
Writing Tests
All assertions happen inside stove { }. Each component has its own DSL block.
HTTP
http {
get<User>("/users/$id") {
it.name shouldBe "John"
}
postAndExpectBodilessResponse("/users", body = request.some()) {
it.status shouldBe 201
}
postAndExpectBody<User>("/users", body = request.some()) {
it.id shouldNotBe null
}
}
Database
postgresql { // also: mysql, mongodb, couchbase, mssql, elasticsearch, redis
shouldExecute("INSERT INTO users (name) VALUES ('Jane')")
shouldQuery<User>("SELECT * FROM users", mapper = { row ->
User(row.string("name"))
}) {
it.size shouldBe 1
}
}
Kafka
kafka {
publish("orders.created", OrderCreatedEvent(orderId = "123"))
shouldBeConsumed<OrderCreatedEvent> {
actual.orderId == "123"
}
shouldBePublished<OrderConfirmedEvent> {
actual.orderId == "123"
}
}
External API Mocking
wiremock {
mockGet("/external-api/users/1", responseBody = User(id = 1, name = "John").some())
mockPost("/external-api/notify", statusCode = 202)
}
Application Beans
Access your DI container directly via bridge():
using<OrderService> { processOrder(orderId) }
using<UserRepo, EmailService> { userRepo, emailService ->
userRepo.findById(id) shouldNotBe null
}
Reporting
When tests fail, Stove automatically enriches exceptions with a detailed execution report showing exactly what happened:
<details> <summary><strong>Example Report</strong></summary>╔══════════════════════════════════════════════════════════════════════════════════════════════════╗
║ STOVE TEST EXECUTION REPORT ║
║ ║
║ Test: should create new product when send product create request from api for the allowed ║
║ supplier ║
║ ID: ExampleTest::should create new product when send product create request from api for the ║
║ allowed supplier ║
║ Status: FAILED ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════╣
║ ║
║ TIMELINE ║
║ ──────── ║
║ ║
║ 12:41:12.371 ✓ PASSED [WireMock] Register stub: GET /suppliers/99/allowed ║
║ Output: kotlin.Unit ║
║ Metadata: {statusCode=200, responseHeaders={}} ║
║
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.
