Log custom messages to Gatling report

Hi Team,

we are planning to use Gatling for functional testing and exploring if there is any way of logging custom messages to the report, similar to how we might use Extent or Allure reporting where we can log details about assertions, etc. We used to have the Rest Assured Java framework earlier with Extent report for detailed test reports, but are now looking into transitioning to Gatling with the idea of having a single framework for both functional and performance tests. It seems like functional support in Gatling is limited. Can we use Gatling for functional testing at all?

One example is that I’m calling an API, and with the response I get, I do some logic in a session block and validate certain conditions there. Is there a way to print these validation results to the report from the session block? I understand that we can use checks and assertions, which are logged to the report, but this is coupled with the API call. Most of the time, we need to have a session block where we implement custom logic. So, I’m wondering if I can continue using Gatling for these functional tests.

Thanks!

Hi @lorem,

Gatling is meant to be a load testing tool.
So its main purpose is to show an aggregated overview of the result with high load. For this target, it isn’t developed in a way to show individual error in a report or any specific message.

As you already mentioned, Gatling provide ways to specifically ensure that the response is correct by functional specification (ie, check) but the reporting of the kind of error is quite limited.

If you work with scala, you still have the (limited) functional spec extension you can try.

Cheers!

1 Like

Thanks for the quick response! Really appreciate the help.

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