CSV feeders not recognizing while using JAR file for execution (Maven Plugin)

Hi,

The feeder CSV files in kept under the main/resources folder.

val dataFeeder = csv("/data/fx/deal_entry_data.csv").circular

When I run use the maven command in IntelliJ the run is successfully completing.

mvn test -Pperf-test -D simulationClass=fusionOpics.perfTest.simulation.Perf.MainRunSimulation

When using the JAR file for execution getting an error

java -cp api-test.jar io.gatling.app.Gatling -s fusionOpics.perfTest.simulation.Perf.MainRunSimulation

16:19:50.260 [main] TRACE io.gatling.app.Gatling$ - Runner instantiated
16:19:50.269 [main] TRACE io.gatling.app.Runner - Running
16:19:50.415 [main] ERROR io.gatling.app.Gatling$ - Run crashed
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at io.gatling.app.Runner.run0(Runner.scala:62)
at io.gatling.app.Runner.run(Runner.scala:49)
at io.gatling.app.Gatling$.start(Gatling.scala:83)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:45)
at io.gatling.app.Gatling$.main(Gatling.scala:37)
at io.gatling.app.Gatling.main(Gatling.scala)
Caused by: java.lang.IllegalArgumentException: Could not locate feeder file: Resource /data/fx/deal_entry_users.csv not found
at io.gatling.core.feeder.FeederSupport.separatedValues(FeederSupport.scala:52)
at io.gatling.core.feeder.FeederSupport.separatedValues$(FeederSupport.scala:47)
at io.gatling.core.Predef$.separatedValues(Predef.scala:23)
at io.gatling.core.feeder.FeederSupport.csv(FeederSupport.scala:36)
at io.gatling.core.feeder.FeederSupport.csv$(FeederSupport.scala:35)
at io.gatling.core.Predef$.csv(Predef.scala:23)
at fusionOpics.perfTest.simulation.FX.DealEntrySimulation.(DealEntrySimulation.scala:17)
at fusionOpics.perfTest.simulation.Perf.MainRunSimulation.(MainRunSimulation.scala:11)
… 10 common frames omitted

Please kindly suggest how this could be resolved.

Regards,
Umeshwaran.V

Hi!

  1. Remove the leading “/
  2. I guess that should lie in src/test/resources (not main)

Source: documentation

Cheers!

Hi,

The CSV files are kept under the test folder as per instructions given in the documentation. I have attached a screenshot for your reference.
Please have a look and let me know if any solution.

Regards,
Umeshwaran.V

Sorry, but running fatjars is not something we support in Gatling OSS.
The supported runners are maven, gradle, sbt and the bundle.
There’s also Gatling Enterprise that does use a fatjar strategy, but that’s proprietary technology. I guess you’re trying to build your own in-house solution, but maybe Gatling Enterprise is something you could consider.

Regards,

Hi Stephane,

Thanks for your kind information. We can try to use only with Maven builds.

Regards,
Umeshwaran.V