Giorgi Gviani
Giorgi Gviani

Reputation: 28434

Is there a way to have sub-transactions in Gatling?

Requested page returns multiple results, response time of the requested page accordingly varies depending on the number of results.

With Gatling I'm having one transaction with all response times in it, in addition I'd like to have sub-transactions depending on the range of results for example:

BuildTable (10Txs)
BuildTable_0_10 (2Txs)
BuildTable_10_100 (6Txs)
BuildTable_100_all (2Txs)

The main goal to have this break-down visible in report, Any idea how can I reach this?

Upvotes: 0

Views: 770

Answers (1)

Stephane Landelle
Stephane Landelle

Reputation: 7038

The way to have "transactions" in Gatling is to use "groups". But they wrap the delimited sequence of requests, so its name is computed before entering the sequence, hence in your case, before knowing the number of results.

So the only way is to know beforehand the number of expected results, e.g. like having this information in a feeder along some search keywords, and either switch to different branches, or compute the group name dynamically with a function.

Upvotes: 1

Related Questions