I am running gatling locally and for some reason, the simulation log is empty resulting in Exception Below:
Exception in thread "main" java.lang.UnsupportedOperationException: Files List(/Users/cluu/dev/execution-engine-qa/gatling/target/gatling/test-20221004190816728/simulation.log) don't contain any valid run record
It still doesn’t make sense that I can build as my user and cannot run the test. I assume that if I can create a build and the test results are recorded within the build structure, it should be fine right?
I’ll try to recreate to see if it will fix the issue.
target, and its subdirectories classes, resources, etc. may be writable to your “normal” user.
But not the subdirectory where gatling write/read the logs (ie: /Users/cluu/dev/execution-engine-qa/gatling/target/gatling)
This is a Linux/MacOS user issue, not a Gatling one.
You’ve either run a chown or chmod that broke the existing permission or run Gatling under the root at some point, which created some directories and files your regular user can’t access.
I believe I have found the cause for the error. It seems that if I use loop in my test, in this case it’s asLongAs loop, the encounter the issue. If I remove the loop, the report gets generated normally.
With the additional information, would that help with identifying the cause of the issue? I makes no sense for the behavior to be related to permission if I a report can be generated without using loop.
Since this the only thread that I could find regarding this simulation.log issue, I will be posting my questions here. I have also searched through the GitHub issues but to avail.
My issue is that Gatling is inconsistent in writing to the simulation.log. By running the same test multiple times, Gatling would sometimes write to the simulation.log and sometimes doesn’t. Hence, I could not reproduce the bug consistently.
The test basically send GET requests to a SOAP API and that’s about it. Unfortunately, I could not provide the code since it is my company’s code. The logs are showing that the requests are successfully sent and response received but for most of the time, the simulation.log is empty.
May I know which part of the gatling code are used for recording response time and writing to the log file so that I could look more into it?
2023-07-13 11:25:45 10s elapsed
---- Requests ------------------------------------------------------------------
> Global (OK=2 KO=0 )
> getSession (OK=2 KO=0 )
waiting: 0 / active: 0 / done: 2
Simulation gatling.PerfSimulation completed in 10 secondsParsing log file(s)...
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.UnsupportedOperationException: Files List(Path/to/target/gatling/perfsimulation-20230713152533410/simulation.log) don't contain any valid run record
... 6 more
Correct me if I am wrong, but I believe 4.3.7 is the latest version for gatling-maven-plugin.
please check if you don’t have 100% build failures on your requests.
I have went through the log files and verified that there are no issues with the requests. I identified that this simulation.log issue only occur when making requests for this endpoint. It struck me as odd that every request and response are perfectly logged in a different log file but then nothing for simulation.log.
I think my issue lies at a missing dependency within my pom.xml file since I am using maven. For context, I am writing my testcases using Karate and performance testing with Karate-Gatling. I initially left out the dependency below in my pom.xml because it was not outlined in the framework’s setup process.
Ok, so your issue has absolutely nothing to do with genuine Gatling. Karate merely rides on our scheduler and reports but everything else is not Gatling components. In particular, performance is way lower.
For anything related to karate, please ask on StackOverflow not here.
But I would really recommend moving to genuine Gatling for load testing.