Andy
April 16, 2024, 9:33am
1
I have this dir structure:
root/src/main/java/com/blah/simulation/Simulation1
and I have updated gatling.conf to have gatling > core > directory > simulations set to: “com/blah/simulation”
when I run the following from the root dir:
./mvnw gatling:test -Dgatling.simulationClass=Simulation1
I get:
java.lang.ClassNotFoundException: Simulation1
what is the correct format for setting the simulation class path in the gatling.conf?
Don’t do that. These gatling.conf
options are going away in Gatling 3.11.0 that is going to be released next week.
Stick to a standard maven project where the simulations live in the maven project sources.
Andy
April 16, 2024, 9:41am
3
thanks
so for me that would be under root/main/java?
can they still live under a simulation sub-folder, or should the simulation classes just exist under root/main/java?
I guess you’re not familiar with Java.
so for me that would be under root/main/java?
No. Assuming root
is where your pom.xml
file is located, that would be root/src/main/java
or root/src/test/java
.
can they still live under a simulation sub-folder
See Java Packages
Assuming you want you class in root/src/main/java/foo
, you’ll have to add a package header line in your class: package foo;
.
You should download a copy of the demo project for maven + Java: GitHub - gatling/gatling-maven-plugin-demo-java
1 Like
system
Closed
May 16, 2024, 9:52am
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.