Files
Gatlin/build.gradle
T
lq64 0db2bb777f NCS-59 Create Load tests (#2)
Added a load test and and slight change in structure. To execute type:

Run the load test:
  ./gradlew.bat gatlingRun --simulation simulations.LoadTestSimulation -PbaseUrl=https://st.nowchess.janis-eccarius.de
  -PauthToken=<token> -PmaxUsers=20 -PrampDuration=60

  Run smoke test:
  ./gradlew.bat gatlingRun --simulation simulations.SmokeTestSimulation -PbaseUrl=https://st.nowchess.janis-eccarius.de
  -PauthToken=<token>

---------

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #2
Reviewed-by: Janis <janis-e@gmx.de>
2026-05-03 22:26:46 +02:00

36 lines
1.1 KiB
Groovy

plugins {
id 'scala'
id 'io.gatling.gradle' version '3.15.0.1'
}
gatling {
enterprise {
// Enterprise Cloud configuration reference: https://docs.gatling.io/reference/integrations/build-tools/gradle-plugin/#running-your-simulations-on-gatling-enterprise-cloud
}
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.forkOptions.with {
jvmArgs = ['-Xss100m'] // Scala compiler may require a larger stack size when compiling Gatling simulations
}
}
tasks.withType(io.gatling.gradle.GatlingRunTask) {
jvmArgs = [
'--add-opens=java.base/java.lang=ALL-UNNAMED',
"-Dtarget.baseUrl=${findProperty('baseUrl') ?: 'http://localhost:8080'}",
"-Dgatling.authToken=${findProperty('authToken') ?: System.getenv('GATLING_AUTH_TOKEN') ?: ''}",
"-Dhealthz.path=${findProperty('healthzPath') ?: '/health'}",
"-DmaxUsers=${findProperty('maxUsers') ?: '10'}",
"-DrampDuration=${findProperty('rampDuration') ?: '60'}"
]
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.scala-lang:scala-library:2.13.16'
}