Testing
Elide runs your project's tests with a single command and can produce coverage reports. Tests are declared through source sets and executed as part of the build task graph.
Running tests
shell
elide testelide test executes the project's testing task group. For JVM projects this runs the JUnit-based test tasks registered for your test source sets.
Note
Test execution currently covers JVM (JUnit) tests. Dedicated JavaScript/TypeScript and Python test runners are not yet wired into elide test.
Coverage
Coverage is configured in the top-level testing { } block of your elide.pkl manifest. JVM coverage is backed by JaCoCo:
pkl
amends "elide:project.pkl"
import "elide:Jvm.pkl" as Jvm
testing {
coverage {
jvm {
enabled = true
reports {
Jvm.htmlReport()
Jvm.xmlReport()
}
}
}
}testing.coverage.jvm fields
| Field | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Whether JVM coverage collection is active |
reports | Listing<JvmCoverageReport> | {} | Coverage reports to generate |
Report formats
| Report | Helper | Description |
|---|---|---|
html | Jvm.htmlReport() | Browsable HTML coverage report |
xml | Jvm.xmlReport() | XML coverage report (for CI tooling) |
csv | Jvm.csvReport() | CSV coverage report |
new Jvm.HtmlCoverageReport {}.