Kola
Start using Kola for contract-first, DSL-based testing in ApiHug.
Kola is ApiHug's DSL-based testing layer for contract-aware scenarios. It is designed to keep test intent close to the ApiHug contract model instead of scattering it across unrelated fixtures and handwritten test plumbing.
Use Kola when you want to:
Before you start:
gradle/libs.versions.toml../gradlew.bat {proto_module}:kolaTest --stacktrace
package contracts
import hope.kola.contract.Feature
Feature.make {
priority 100
name("Customer login, place order, and check balance")
Scenario "001 Try login", {
Given {
api("UserService", "Login")
}
When {
body {
set('name', "same")
set('student.age', 22)
}
}
And {
booleanAssert("user.live", {
isTrue()
})
}
}
}
You get a contract-aware test entrypoint that fits the ApiHug workflow more naturally than a disconnected handwritten scenario suite.