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

271 views
Skip to first unread message

umeshwaran v

unread,
Sep 9, 2021, 6:58:39 AM9/9/21
to Gatling User Group
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.<init>(DealEntrySimulation.scala:17)
        at fusionOpics.perfTest.simulation.Perf.MainRunSimulation.<init>(MainRunSimulation.scala:11)
        ... 10 common frames omitted

Please kindly suggest how this could be resolved.  

Regards,
Umeshwaran.V

Sébastien BREVET

unread,
Sep 9, 2021, 7:02:10 AM9/9/21
to gat...@googlegroups.com

Hi!

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

Source: documentation

Cheers!


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/5b9e2f7c-3f8a-4ace-9683-f86fb588e68fn%40googlegroups.com.


--

Sébastien BREVET

Backend engineer

   
sbr...@gatling.io
gatling.io
   
facebook twitter linkedin 

umeshwaran v

unread,
Sep 9, 2021, 8:39:03 AM9/9/21
to Gatling User Group
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.

Capture.JPG

Regards,
Umeshwaran.V

Stéphane LANDELLE

unread,
Sep 9, 2021, 8:43:18 AM9/9/21
to gat...@googlegroups.com
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,

--

Stéphane Landelle

Chief Technical Officer

   

slan...@gatling.io
gatling.io
   
facebook twitter linkedin 

umeshwaran v

unread,
Sep 9, 2021, 8:48:43 AM9/9/21
to Gatling User Group
Hi Stephane,

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

Regards,
Umeshwaran.V

Reply all
Reply to author
Forward
0 new messages