Gatling version: 3.11.3 (must be up to date)
Gatling flavor: scala
Gatling build tool: sbt
I read the guidelines and how to ask a question topics.
I provided a SSCCE (or at least, all information to help the community understand my topic)
I copied output I observe, and explain what I think should be.
Hi, I just discovered the magic of build tools (sbt in this case) and originally, I used to pass JAVA_OPTS to overwrite some script variables in old gatling bundle version as this command:
JAVA_OPTS="-Dparam=value" ./bin/gatling.sh -s $SCALA_SCRIPT
Now when moving to sbt, I need to find a way to pass the JAVA_OPTS into sbt too, what I have tried so far (on gatling-sbt demo build.sbt)
val gatlingVersion : String = "3.11.3"
ThisBuild / scalaVersion := "2.13.14"
val value = sys.env.get("value")
fork := true
javaOptions ++= Seq(
s"-Dparam=$value"
)
libraryDependencies ++= Seq(
"io.gatling.highcharts" % "gatling-charts-highcharts" % gatlingVersion % "test",
"io.gatling" % "gatling-test-framework" % gatlingVersion % "test",
)
scalacOptions := Seq(
"-encoding",
"UTF-8",
"-release:8",
"-deprecation",
"-feature",
"-unchecked",
"-language:implicitConversions",
"-language:postfixOps")
enablePlugins(GatlingPlugin)
So I tested with some bland command on sbt shell such as:
javaOptions Gatling/testOnly *.testClass
Gatling/testOnly *.testClass javaOptions
But none of it works, is there what I missing in syntax of command or settings that I should be aware of ?
Thank you.