Sayali
Sayali

Reputation: 61

How to calculate average time for end to end API requests using Jmeter

I'm using JMeter for the API load testing. what I'm testing is the response time for multiple HTTP API requests(E.g.- 150 requests). I'm able to get the average time taken for 150 HTTP requests, but we have one more requirement where it should give the average time for the end-to-end requests.

The current behavior of the application- 1. Send the API request 2. It returns the successful response with status code 201 ok. 3. It starts creating an azure resource on the Azure portal. 4. The request is successful, once the resource gets created in Azure Portal.

I need to calculate the total response time including the creation of the Azure resource. Is there any way to do this in JMeter? or Shall i use another tool for this ?

Upvotes: 0

Views: 1282

Answers (1)

Dmitri T
Dmitri T

Reputation: 168207

If there is an endpoint which returns the resource status, like "creating", "created", "failed", etc. you can design your test as follows:

The idea is that the While Controller will execute the "Check the status of the resource" until it's created and the Transaction Controller returns the cumulative time taken by all its children

Upvotes: 1

Related Questions