Skip to main content
Version: 5.5


When running tests via the intellij runner, properties set using or in a gradle build file won't be picked up because the runner is not set to use Gradle.

To support runtime system properties, the Kotest framework will always look for key value pairs inside a file located on the classpath. Any key value pairs located in this file will be set as a system property before any tests execute.


Any properties specified in the file work for both command line via Gradle, and tests executed via the Intellij plugin.

For example, after adding this file to your classpath as


The following test would pass:

class FooTest : DescribeSpec() {
init {
describe("after adding") {
it("foo should be set") {
System.getProperty("foo") shouldBe "bar"

Common use case

It is common to disable the classpath scanning capabilities of Kotest to save some startup time, if those features are not used. To do this place, the following lines into the file:


Specifying the properties filename

If you don't wish to name the file, or perhaps you want to support different files based on an environment, then you can use the system property to set the properties filename.

For example, you could launch tests with then the key value file named would be loaded before any tests are executed.