Report generation using gatling.sh

Hi,
I am trying to generate the report from the following simulation.log

RUN com.coyness.CreateSinglexyzSimulation createsinglexyzsimulation 1623171135585 3.5.1
USER Create JWT START 1623171135824
REQUEST Create JWT 1623171135872 1623171138062 OK
USER Create Single XYZ for a duration START 1623171140823
USER Create Single XYZ for a duration START 1623171140823
REQUEST Single XYZ task 1623171140829 1623171142593 OK
REQUEST Single XYZ task 1623171142825 1623171143206 OK
REQUEST Single XYZ task 1623171141823 1623171143615 OK
REQUEST Single XYZ task 1623171143825 1623171144169 OK
REQUEST Single XYZ task 1623171144825 1623171145260 OK
REQUEST Single XYZ task 1623171145342 1623171145966 OK
REQUEST Single XYZ task 1623171145823 1623171146200 OK
REQUEST Single XYZ task 1623171146344 1623171146697 OK
REQUEST Single XYZ task 1623171146824 1623171147199 OK
REQUEST Single XYZ task 1623171147343 1623171147697 OK
REQUEST Single XYZ task 1623171147826 1623171148185 OK
REQUEST Single XYZ task 1623171148343 1623171148878 OK
REQUEST Single XYZ task 1623171148824 1623171149302 OK
REQUEST Single XYZ task 1623171149344 1623171149767 OK
REQUEST Single XYZ task 1623171149825 1623171150183 OK
REQUEST Single XYZ task 1623171150344 1623171150784 OK
REQUEST Single XYZ task 1623171150824 1623171151193 OK
REQUEST Single XYZ task 1623171151345 1623171151872 OK
REQUEST Single XYZ task 1623171151825 1623171152216 OK
REQUEST Single XYZ task 1623171152344 1623171152698 OK
REQUEST Single XYZ task 1623171152825 1623171153223 OK
REQUEST Single XYZ task 1623171153344 1623171153802 OK
REQUEST Single XYZ task 1623171153825 1623171154175 OK
REQUEST Single XYZ task 1623171154344 1623171155035 OK
REQUEST Single XYZ task 1623171154824 1623171155360 OK
REQUEST Single XYZ task 1623171155344 1623171155720 OK
USER Create JWT END 1623171155830
REQUEST Single XYZ task 1623171155824 1623171156260 OK
REQUEST Single XYZ task 1623171156343 1623171156753 OK
REQUEST Single XYZ task 1623171156825 1623171157338 OK
REQUEST Single XYZ task 1623171157344 1623171158081 OK
REQUEST Single XYZ task 1623171157826 1623171158356 OK
REQUEST Single XYZ task 1623171158345 1623171158774 OK
REQUEST Single XYZ task 1623171158824 1623171159181 OK
REQUEST Single XYZ task 1623171159346 1623171159693 OK
REQUEST Single XYZ task 1623171159826 1623171160211 OK
REQUEST Single XYZ task 1623171160344 1623171160824 OK

Command: ./bin/gatling.sh -ro simulation

But I am getting the following error:

gatling-charts-highcharts-bundle-3.6.0 ./bin/gatling.sh -ro simulation

GATLING_HOME is set to /Users/apatr24/SW/gatling/gatling-charts-highcharts-bundle-3.6.0

Parsing log file(s)…

Parsing log file(s) done

Generating reports…

Exception in thread “main” 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:50)

at io.gatling.app.RunResultProcessor.generateReports(RunResultProcessor.scala:65)

at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:40)

at io.gatling.app.Gatling$.start(Gatling.scala:93)

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)

Could you please help me to find the root cause?

Thanks,

Ajit

Hi,

You’ve edited the file and made it malformed in the process.

Thank you. It worked for me.

I use the gradle task for the load test as below
task loadTest(type: JavaExec) {
//…
main = “io.gatling.app.Gatling”
args = [
“–simulation”, “com.a.b.c.d.$simulation”,
“–results-folder”, “${buildDir}/gatling-results”,
“–binaries-folder”, sourceSets.test.output.classesDirs.toString()
]
}

Above task is working fine for simulation along with report generation. If I have only the simulation.log file due to interruption during the test execution, can I generate the report using a gradle task. For example,

task generateReport(type: JavaExec) {
//…
main = “io.gatling.app.Gatling”
args = [
“–report-only”, " file / folder name"
]
}

As said, I am able to generate the report using command line tool.

Thanks,
Ajit

I am able to generate the report from a simulation.log file using the gradle task as mentioned above.

Thank you.