JMeter: New data to be created automatically in HTTP Request - api

I need to create a http request in JMeter to submit bulk API requests.
Inorder to do that, I have created a code in RunSwift tool to generate the bulk API requests and then aligned the requests in https://jsonlint.com website and then copied/pasted them in Jmeter.
What I am trying to Achieve:
Currently, if I have to submit 3-4 batches of API requests every 15 min, I am manually performing the above activities and replacing the content every time in HTTP request.
I was given a requirement that the batch job should submit 200 request every 15 min for continuous 8 hrs.
I feel that my current approach is not sustainable as I have to replace the content 32 times (every 15 min for 8 hrs).
Hence I would like to take your suggestion on how i can refresh the data in the API request every 15 min.

Replace hard-coded values like user name, address, phone, email, whatever with random entities which will be generated on the fly using the following JMeter Functions:
__Random() - generates a random integer within the given range
__RandomString() - generates a random string from given input characters
__UUID() - generates an unique GUID structure
__time() - returns current timestamp
You can inline JMeter Functions directly into your HTTP Request sampler body like:
See Apache JMeter Functions - An Introduction to get familiarized with JMeter Functions concept.

Related

Apigee Integration: How to use listEntitiesPageSize parameter in conjunction with the listEntitiesPageToken parameter o navigate through the pages

Good day everyone,
we are trying to have through the use of the integrations of the Apigee service of google all the rows in a bigquery table that have a certain value in a field.
this operation is quite easy to do, but when we have more than 200 lines as a result, problems arise.
The problem is that using the integration to connect to BigQuery I am not returning any listEntitiesPageToken value and not even any listEntitiesNextPageToken value
so i can't figure out how i can go about navigating the result pages
Has anyone had the same problem? What do you suggest?
In the tutorial: "https://cloud.google.com/apigee/docs/api-platform/integration/connectors-task#configure-the-connectors-task" is write : "For example, if you are expecting 1000 records in your result set, you can set the listEntitiesPageSize to 100. So when the Connectors task runs for the first time, it returns the first 100 records, the next 100 records in the second run and so on."
And there is a tip: "Use the listEntitiesPageSize parameter in conjunction with the listEntitiesPageToken parameter to navigate through the pages."
I used the tutorial to understand how to use the task for loop and I understood that I should create a "subintegration" which must be called by a "main integration" for each element present in a list / array.
But what what can i do since these tokens are empty?

Aspnet core request count logging

I have 2 controller and each controller has 2 endpoints. For example:
GET /categories
GET /category/{id}
Basically I want to know how many one or another endpoint is being used.
So the final result I want to count the calls. For example one endpoint was used X amount of times and another used Y amount of times. And I want to get this string: $"{id} is the most popular category"
How to do it? I need a statistic for my web api

Pagination rules' Value in Azure Data Factory V2 (for Rest API)

I am trying to fill in Value box inside Pagination rules explained on this article which was published recently (in May 25th 2021).
My Request URL is this one:
So, based on my URL's data, I would like to know how to insert all rows (total 15,315 rows) instead of 500 rows.
I am new to Rest API, and I guess I was looking for an indicator that points to the next set of records.
Currently, when I run Azure Data Factory V2 without Pagination rules, it only inserts 500 rows of data into Azure database.
This is the solution I got from my issue:
https://learn.microsoft.com/en-us/answers/questions/468561/azure-data-factory-pagination-issue.html#answer-470345

How to handle delete booking webtours in jmeter?

How to handle the remove flight booking in webtours? It came to my mind that if I wanna run the test with 3 virtual users and how they supposed to delete the booking if the information down here (refer below) are unique for each virtual user? Does any of these variables below need to be parameterized or need to apply correlation?
If there are multiple flight id to be deleted, we can create a CSV file having those ids
and use a while loop controller to delete each of them.
You may refer -
https://guide.blazemeter.com/hc/en-us/articles/206733689-Using-CSV-DATA-SET-CONFIG
https://www.blazemeter.com/blog/using-while-controller-jmeter
As you said, it will differ for a different user, you can store each value from the response of each user(extract value using regex) and pass them in delete call.
reference link - https://guide.blazemeter.com/hc/en-us/articles/207421325-Using-RegEx-Regular-Expression-Extractor-with-JMeter-Using-RegEx-(Regular-Expression-Extractor)-with-JMeter
I don't know what "webtours" is, however there is one "golden" rule: each and every parameter which is dynamic needs to be correlated.
If you don't have any idea regarding which ones are dynamic - record the same action one more time using JMeter's HTTP(S) Test Script Recorder and compare the generated requests, parameter values (or even names) which differ needs to be correlated.
Another approach is to inspect the previous response(s) using View Results Tree listener and look if the data is present there
Check out Advanced Load Testing Scenarios with JMeter: Part 1 - Correlations article for more information and example implementation

How Jmeter calculates response time of a sample under while controller

I am using while controller in script which will iterate until the required string found in the response. Now , I want to understand how response time is calculated by JMeter for this request. Is it the the response time of last iteration or the summation of all iterations under while loop. Please help. I want to get the summarized response time of all iterations
Concept of a request / response for JMeter does not change wether you find your string or not. So given this depending on what listener you use, it will show you average, summation etc accordingly.
Summary or aggregation controller does show summation, so you might have to capture this using a custom listener. Or if you can multiply average with total transactions.
Hope this helps.
It will be as many requests as While Controller iterations, each request will have a separate entry in the .jtl results file.
If you need to have only one result with the cumulative duration of all the requests which were executed by the While Controller you need to put the While Controller under the Transaction Controller and tick Generate parent sample box:
This way you will get one "Transaction Controller" sampler which response time will be the sum of all child requests response times: