Reputation: 29
I am doing the demo for Karate Gatling to see if it meets our needs for performance tests, my test scenario is to create many transactions and check the transaction status, below are some of my requests:
Given url baseURL+ '/v2/transactions/'+referenceNo
Given url baseURL+ '/v2/transactions/'+referenceNo
Given url baseURL+ '/v2/transactions/'+referenceNo+ '/pay-way'
The referenceNo will be randomly generated, so I wrote the protocol to make them aggregated:
val protocol = karateProtocol(
"/transactions/{referenceNo}" -> Nil,
"/{referenceNo}/pay-way" -> Nil
)
But it doesn't work. In the report, all the requests are showing separately like this:
Upvotes: 1
Views: 44
Reputation: 356
You need to ensure that the paths in the protocol match the paths shown in the report. For example,
val protocol = karateProtocol(
"/api/v2/transactions/{referenceNo}" -> Nil,
"/api/v2/transactions/{referenceNo}/pay-way" -> Nil
)
This change should aggregate the requests correctly in the report.
Upvotes: 1