I have a performance test set up using the gatling plugin. The simulation works if I use constantUsersPerSec in the load profile. If I change this to atOnceUsers then the simulation does not run. No load is generated
I have tried the other injection types eg rampUsers and this also works. It seems that atOnceUsers is the only scenario that fails
setUp(
login.inject(
constantUsersPerSec(1) during (10 seconds))
.protocols(protocol)
)
This setup works and the test runs. If i change the setup to
setUp(
login.inject(
atOnceUsers(1))
.protocols(protocol)
)
Then the load is not ran. The report is not generated because no load was generated.
This is the log from the run Output is
00:14:38.170 [GatlingSystem-akka.actor.default-dispatcher-3] INFO i.g.c.stats.writer.ConsoleDataWriter - Initializing
00:14:38.179 [GatlingSystem-akka.actor.default-dispatcher-2] INFO i.g.c.stats.writer.LogFileDataWriter - Initializing
00:14:38.194 [GatlingSystem-akka.actor.default-dispatcher-3] INFO i.g.c.stats.writer.ConsoleDataWriter - Initialized
00:14:38.226 [GatlingSystem-akka.actor.default-dispatcher-2] INFO i.g.c.stats.writer.LogFileDataWriter - Initialized
Simulation performance.Load started...
00:14:38.664 [GatlingSystem-akka.actor.default-dispatcher-4] INFO i.g.core.controller.inject.Injector - StoppedInjecting
00:14:39.674 [GatlingSystem-akka.actor.default-dispatcher-2] INFO com.intuit.karate - karate.env system property was: null
00:14:39.735 [GatlingSystem-akka.actor.default-dispatcher-3] INFO i.g.core.controller.inject.Injector - All users of scenario login are stopped
00:14:39.738 [GatlingSystem-akka.actor.default-dispatcher-3] INFO i.g.core.controller.inject.Injector - Stopping
00:14:39.738 [GatlingSystem-akka.actor.default-dispatcher-4] INFO i.gatling.core.controller.Controller - Injector has stopped, initiating graceful stop
================================================================================
2019-04-04 00:14:39 1s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=0 KO=0 )
---- login ---------------------------------------------------------------------
[##########################################################################]100%
waiting: 0 / active: 0 / done: 1
================================================================================
00:14:39.824 [GatlingSystem-akka.actor.default-dispatcher-3] INFO i.gatling.core.controller.Controller - StatsEngineStopped
Simulation performance.Load completed in 1 seconds
Parsing log file(s)...
00:14:40.012 [main] INFO i.gatling.charts.stats.LogFileReader - Collected ArrayBuffer(C:\Users\Paul.McCormack\source\repos\humm\target\gatling\load-20190403131438042\simulation.log) from load-20190403131438042
00:14:40.036 [main] INFO i.gatling.charts.stats.LogFileReader - First pass
00:14:40.061 [main] INFO i.gatling.charts.stats.LogFileReader - First pass done: read 3 lines
00:14:40.111 [main] INFO i.gatling.charts.stats.LogFileReader - Second pass
00:14:40.147 [main] INFO i.gatling.charts.stats.LogFileReader - Second pass: read 3 lines
Parsing log file(s) done
Generating reports...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won't be generated
at io.gatling.charts.report.ReportsGenerator.generateFor(ReportsGenerator.scala:49)
at io.gatling.app.RunResultProcessor.generateReports(RunResultProcessor.scala:76)
at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:55)
at io.gatling.app.Gatling$.start(Gatling.scala:82)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:47)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
I just tried using atOnceUsers(10)
in the karate-gatling-demo
and it worked.
Maybe gatling requires the number to be greater than 1 ?
If you still see an issue, kindly replicate following this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue