We are using gatling highland charts version 3.8.4 and created the image.
After invoking the Gatling test using the following command:
${GATLING_HOME}/bin/gatling.sh
The following prompt seems to be coming up and eventually failing . How to avoid this prompt and go with the default option of run locally? or how we can pass the option 1 as command line argument? Please share your thoughts.
Do you want to run the simulation locally, on Gatling Enterprise, or just package it? Type the number corresponding to your choice and press enter
[0] Quit
[1] Run the Simulation locally
[2] Package and upload the Simulation to Gatling Enterprise Cloud, and run it there
[3] Package the Simulation for Gatling Enterprise
[4] Show help and exit
**Exception in thread βmainβ java.util.NoSuchElementException: next on empty iterator **
**at scala.collection.Iterator$$anon$19.next(Iterator.scala:966) **
**at scala.collection.Iterator$$anon$19.next(Iterator.scala:964) **
**at scala.io.BufferedSource$BufferedLineIterator.next(BufferedSource.scala:82) **
**at scala.io.BufferedSource$BufferedLineIterator.next(BufferedSource.scala:67) **
**at io.gatling.bundle.BundleIO$$anon$2.readInt(BundleIO.scala:33) **
**at io.gatling.plugin.io.input.InputChoice.inputInt(InputChoice.java:59) **
**at io.gatling.plugin.io.input.InputChoice.inputFromList(InputChoice.java:113) **
**at io.gatling.plugin.io.input.InputChoice.inputFromStringList(InputChoice.java:144) **
**at io.gatling.bundle.commands.RunCommand.run(RunCommand.scala:57) **
**at io.gatling.bundle.GatlingCLI$.main(GatlingCLI.scala:97) **
**at io.gatling.bundle.GatlingCLI.main(GatlingCLI.scala) **
cp: cannot stat β/opt/gatling/results/β: No such file or directory Test execution failed
Did you try ${GATLING_HOME}/bin/gatling.sh --help
or ${GATLING_HOME}/bin/gatling.sh -h
?
Result:
gatling-charts-highcharts-bundle-3.8.4$ bin/gatling.sh -h
GATLING_HOME is set to /home/isammoc/tmp/gatling-charts-highcharts-bundle-3.8.4
Usage: gatling [options]
-h, --help Show help (this message) and exit
-rm, --run-mode local Specify if you want to run the Simulation locally, on Gatling Enterprise or package the simulation. Options are 'local', 'enterprise' and 'package'
Generic options:
-sf, --simulations-folder <directoryPath>
Uses <directoryPath> as the absolute path of the directory where simulations are stored
-bf, --binaries-folder <directoryPath>
Uses <directoryPath> as the absolute path of the directory where binaries (jar files) are stored
-rsf, --resources-folder <directoryPath>
Uses <directoryPath> as the absolute path of the directory where resources are stored
-eso, --extra-scalac-options "-Option1 -Option2"
Defines additional compiler options for your Scala code. See https://docs.scala-lang.org/overviews/compiler-options/index.html for available options.)
-s, --simulation <className>
Runs <className> simulation
-ecjo, --extra-compiler-jvm-options "-Option1 -Option2"
Defines additional JVM options used when compiling your code (e.g. setting the heap size with "-Xms2G -Xmx4G"). See https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html for available options.
Options specific to running locally:
-nr, --no-reports Runs simulation but does not generate reports
-ro, --reports-only <directoryName>
Generates the reports for the simulation in <directoryName>
-rf, --results-folder <directoryPath>
Uses <directoryPath> as the absolute path of the directory where results are stored
-rd, --run-description <description>
A short <description> of the run to include in the report
-erjo, --extra-run-jvm-options "-Option1 -Option2"
Defines additional JVM options used when running your code locally (e.g. setting the heap size with "-Xms2G -Xmx4G"). See https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html for available options.
Options specific to running on Gatling Cloud:
-bm, --batch-mode No interactive user input will be asked
-at, --api-token <value>
Gatling Enterprise's API token with the 'Configure' role
-sid, --simulation-id <value>
Specifies the Gatling Enterprise Simulation that needs to be started
-pid, --package-id <value>
Specifies the Gatling Enterprise Package, when creating a new Simulation
-tid, --team-id <value> Specifies the Gatling Enterprise Team, when creating a new Simulation
-ssp, --simulation-system-properties k1=v1,k2=v2
Optional System Properties used when starting the Gatling Enterprise simulation
-sev, --simulation-environment-variables k1=v1,k2=v2
Optional Environment Variables used when starting the Gatling Enterprise simulation
I think you are looking for --batch-mode
and --run-mode local
options.
Cheers!
1 Like
Thank you @sbrevet . --run-mode local worked