Gatling Java - JDBC Builder - Dynamic Query

can we get data using data base builder during the runtime of a gatling script by changing the DB SQL query dynamically every iteration

No you can’t:

  • feeders are shared datasources, they are not scoped per virtual user and hence can’t access Session data
  • JDBC is a blocking API, not something you want to use during the test and blocking the threads

If you want to perform individual data fetching for each virtual user, I recommend that you implement an HTTP API for this, instead of directly connecting to the underlying database over JDBC, so:

  • you can use Gatling HTTP support for this
  • benefit from Gatling HTTP engine being non blocking

Thanks, I read the same just wanted to be sure :slight_smile: