In the gatling.conf file, I have “disableComputer = true” and (under the directory section) “binaries = target/classes” (both un-commented-out). When I try and run “bin/gatling.sh -s foo.LoginSimulation”, I get a ClassNotFoundException (the class name is correct; same command worked before disabling the compiler). Is there something I’m missing?
Can you share a reproducer, please?
Pulled down a fresh 2.0.0-SNAPSHOT bundle and ran “bin/gatling.sh -s computerdatabase.BasicSimulation”, started fine. Replaced conf/gatling.conf with the attached file, ran the same command, and ClassNotFound.
gatling.conf (5.63 KB)
disableCompiler: set to true to pass a simulationClass to be loaded directly from classpath
It doesn’t work with binaries which is the output directory when using the compiler.
What’s your use case exactly? The bundle ships an incremental compiler, so what’s the point of disabling it? This parameter is intended for use cases that already ships a Scala compiler, such as running from an IDE ou the sbp plugin.
Shoot, I hadn’t realized it’s an incremental compiler - that’d make it a moot point then, sorry. I was trying to find a way to reduce the startup time (I have a web application starting Gatling, and running single-user func tests one at a time (I know, but not my idea) is “too slow” between click go and green checkmark).
To be honest, what you’d like/want is Gatling’s SBT plugin :
- SBT takes care of compiling (performance is more or less the same as the bundle, it’s the same Scala compiler underneath).
- It executes each test one at a time (configurable)
- If your simulation fails or if your assertions fails, the test are marked as failed by SBT.
It has also been enriched with additional SBT tasks to start the Recorder, open directly the last generated report in your browser and provides easier *.conf files synchronisation, by copying files from the bundle.