Calculate the time for Sync in Two micro service using Jmeter - jmeter

I have Scripts Two API:
Post API
Get API
I need to calculate The time have to sync between First API and Second API and Calculate the Time its take to sync , In simply way I need to hit the Get API until I get Success response and Calculate the time for all these request Until Success for These hits , is there a way to do that using Jmeter ?

Organize your Test Plan as follows:
Transaction Controller - to measure the duration of the whole requests sequence
While Controller - to loop the "First API" unless you get Success
Post API
PostProcessor - to get "success" criteria
Get API

Related

I need to see the time taken by certain APIs in the test plan in jmeter

There are multiple requests in the test plan created for ride booking process. I need to find the time taken between the login and the ride booking apis .Is there a way wherein I can get these details in the test plan automatically without any manual intervention?
Most probably you're looking for the Transaction Controller, it generates synthetic Sample Result with the response time which is the sum of all its children
More information: What is JMeter’s Transaction Controller?

Jmeter response time for parallel execution

I am using Jmeter 5.2, the application i am testing i have split them transaction modules. When i execute the test plan, the elapsed time, latency and connect time were added together for a module in the aggregate report. Since some of the requests runs parallel in a module, that report didn't produce expected results.
Later, i have moved the request to bzm-parallel controller modules. Where, some of the requests fails since some of the requests has to be executed after the previous request.
Is there any way to calculate the exact timetaken for the execution of 1 module in Jmeter considering the parallel execution of requests?
Cumulative execution time of parallel requests equals to the execution time of the longest request so you need to take only that request which elapsed time exceeds its neighbors.
In order to filter out "not interesting" requests you can use one of below optoins:
Put parallel requests under the Transaction Controller
If you're using HTML Reporting Dashboard for results analysis you can consider jmeter.reportgenerator.exporter.html.series_filter property
You can remove the samplers you're not interested in via Filter Results Tool
You can use a Simple controller inside your Parallel controller. This will help you execute the samples in parallel and in the correct sequence as arranged in the simple controller.
Sample:
Parallel Controller
Simple Controller
-- HTTP Sample 1
-- HTTP Sample 2
-- HTTP Sample 3
Output:
HTTP Sample 1
HTTP Sample 2
HTTP Sample 3

JMeter load test async api

I make a post call to an api, and don't need to log the response (post to google cloud pubsub), but after that i need to measure time it takes for the data to be processed and appear in another GET request (need to keep hitting it unless the response changes).
I also need to measure the performance under load. I tried JMeter but could not figure out a way to get what I wanted. Is there a way to do this in Jmeter? or some other tool that will let me do what i want
You can put your "another GET request" under a While Controller so JMeter will keep sending this request unless it will match some defined condition
You can put the whole sequence of requests under the Transaction Controller - this way JMeter will measure end-to-end duration of the whole scenario

Jmeter - wait for a specific response and collect total response time

our application is testing file upload and I'm curious if I can make Jmeter wait for a specific response and then report collective time.
What I have now is:
whileLoop()
-- HTTP Sampler
-- JSON Extractor
JSON Extracor pulls out a specific field and if it's not null then the loop stops.
The problem is that JMeter doesn't report response time as a sum of all the responses (response times) it had to make and that is what I'm looking for. Is there a way to implement this?
You can put this code inside a Transaction Controller .
You should get what you want.

How to measure the Test Fragment response time in jMeter?

My jMeter script performs visiting the Workout history page of the website.
While leading there the app sends 8 api requests. We put them into one Test Fragment but while running scripts in jMeter I get the response time of each HTTP Request.
Is there any possibility to get the response time of the whole Test Fragment?
My Test Fragment screenshot
It is simple. You just add a Transaction Controller in the Test Fragment. Move all the HTTP requests under the Transaction Controller.
If you are looking for only the total time of all the requests, then check the Generate parent sample checkbox.
you could definitely do this in beanshell, start a timer and then calculate the end time.
Also you might try something like the JC#gc package of extra plugins for something like responses over time.

Resources