Hi,
I'm currently migrating my build.gradle from Groovy DSL to Kotlin DSL (to build.gradle.kts). Until now I was using gatling for performance testing for a long time and it was working fine. I didn't change anything during my migration, but it now shows errors in the build.gradle.kts and I'm also unable to run my Simulation due to unresolved imports.
My gatling setup in build.gradle (Groovy DSL):
plugins {
id 'java'
id 'io.gatling.gradle' version '3.7.3'
}
repositories {
mavenCentral()
}
gatling {
jvmArgs = ['-server', '-Xms512M', '-Xmx1024M', '-Xss100M']
logHttp = 'ALL'
}
My gatling setup in build.gradle.kts (Kotlin DSL):
plugins {
java
id("io.gatling.gradle") version "3.7.3"
}
repositories {
mavenCentral()
}
gatling {
jvmArgs = listOf("-server", "-Xms512M", "-Xmx1024M", "-Xss100M")
logHttp = io.gatling.gradle.LogHttp.ALL
}
jvmArgs and logHttp show following error:
Cannot access 'io.gatling.gradle.JvmConfigurable$Trait$FieldHelper' which is a supertype of 'io.gatling.gradle.GatlingPluginExtension'. Check your module classpath for missing or conflicting dependencies
Also in my source files some gatling imports are working fine, while the others are not resolved (red one):
import io.gatling.core.Predef._
import io.gatling.core.controller.inject.open.IncreasingUsersPerSecCompositeStep
import io.gatling.core.structure.ScenarioBuilder
I didn't find any examples of how to configure gatling using Kotlin DSL. What am I missing here?