Reporting group failure despite all requests succeeding

Hello community,

I’ve been using Gatling and encountered an issue where the group is reported as failed even though all requests within the group are successful. After some investigation, I’ve identified a reproducer: the group is marked as failed when an error occurs in the doIf condition, but the error isn’t logged anywhere.

  private val scn = scenario("ScenarioName")
    .repeat(10).on(
      group("g1").on(
        exec(http("request_1").get("/index.php"))
          .doIf("#{NeverDefinedSessionVariable}").then(
            exec(http("request_2").get("/index.php"))
          )
          .exec(http("request_3").get("/index.php"))
      )
    )

I’m seeking advice on how to output the error from doIf to a specific location, enabling a quicker identification of the cause when facing a similar situation in the future. Any insights or suggestions on this matter would be greatly appreciated.

Thank you!

You should be able to see the error in the logs.

I found the error message.

[ERROR] [gatling-1-2] i.g.c.action.If - 'if-5' failed to execute: No attribute named 'NeverDefinedSessionVariable' is defined

I will now check log files in addition to report HTML and simulation.log.
Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.