JMeter Beginner Tutorials | Tips n Tricks 11 💡 How to loop CSV file - WHILE CONTROLLER

preview_player
Показать описание
Today we will learn:

1. How to refer values from csv file
2. How to run the test equal to the count of rows in csv file

Step 1: Create a ThreadGroup
Step 2 : Add a WhileController
Step 3 : Add a sampler (as child of WhileController)
Step 4 : Add CSV data set config (as child of WhileController)
Step 5 : Add values. Keep
Recycle on EOF = FALSE
Stop Thread on EOF = FALSE
Step 6 : Refer the variable in sampler request
Step 7 : Add a listener. Run and validate

________________________________________________________________

Do like, share and subscribe

Keep Learning,
Raghav
_________________________________________________________________

________ ONLINE COURSES TO LEARN ________

------------ UI TESTING ------------

------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

------------ VERSION CONTROL SYSTEM ------------

------------ PERFORMANCE TESTING ------------

------------ JAVA ------------

------------ MAVEN ------------

------------ OTHERS ------------

Keep Learning,
Raghav

Рекомендации по теме
Комментарии
Автор

Excellent. Nowhere it is explained this way without hiding the steps.Thanks a lot :)

krithigar
Автор

hi raghav,
i have a post http request (create product), the data uploaded as json file to the http sampler ( not as body), and i want to repeat this request in the same iteration ( creating 10 products for example), the problem is that i receive an error response "product already exist" plz advise how we can handle this problem.

hassanchreif
Автор

Hi Raghav, I have a test scenario for validate the email address.For that I create a csv which contain multiple email address in different format.I added this using file through the csv data config. Is there any way to add assertion for each row of the csv?because I need fully automate that test and get only the pass/fail status.

manekagayomi
Автор

So basically, the While controller checks: while(variable exists == true)...execute sampler. And the CSV data config is taking care on every new step, new line to be checked?

slobodanparizoski
Автор

Can we run a test plan in a particular time, so that I can set the time and the test plan will run on that time which I already have been set.(Both in cmd line and in GUI of jmeter)

debasishdash
Автор

i want to generate a excel where i can get this ouput ("1", "name", "23123", "test")
I tried in csv it works. but when i open in XL it is not reflecting the quotes
can you help on this

GirishKumar-uquh
Автор

Hi Raghav,


could you please tell me how to use below controllers
1.For each controller in jmeter
2.Critical section controller in jmeter

praveenbudde
Автор

Hi Ragha, I want to import TX id which are in CSV file more than 2500 Txs. And those are used as a restApi. Those should be thread safe while executing and as I don't know how much time it will take so no value for rampup. And every thread should take unique value.
Is it possible?How to do?

samirmulani
Автор

Hi Raghav, I'm using JMeter for functional (API) test for my iOS App. When login to the App, there are several records (rows). User can tap any of the row. I want to tap each and every record (row). Is there a way to do this?

TheFlashmark
Автор

Hi Raghav,
Here you have shown how to fetch data from multiple rows from CSV for a single request. In my case I want multiple request, lets say 6 request to fetch data from 6 different rows with columns containing around 10-12 parameters. How do I achieve this ? Please help me out on this.

vivekijeri
Автор

Hi Ragav, after executing request with while controller and then my subsequent requests are not executing ..can you please let me know what to do for this??

kranthikumar
Автор

Sir, Do we have a feasiblity to fetch the data from CSV and put the result into CSV file when ever we run ?.

anoopbhaskaran
Автор

dear Mr Raghaf : to keep: Stop Thread on EOF = FALSE OR TRUE ?? thanks alot

hazimabdoh
Автор

Hi Raghav, I have a scenario where in I need to wait for the response text .I need to send the same request till i get the required response text. I included my http samples in while loop with a counter. Now I am not able get the correct while condition.
Tried with below conditions.

Pending" && ${counter} < 5), )}
!= "NPAC Pending", )}
Both are failing. How to handle this?




Threadgroup
--Once only controller --> Login
-- loop controller
-HTTP req
-HTTP req
-While loop
--Counter
--HTTP request
--HTTP Request
--JSON extractor ( I am getting recordTypeLabel1 variable here)
-HTTP req
--Once only Controller --> Logout

chaitp
Автор

Could you please show me how to deal with body data in create order when we using csv file

sagarsalvi
Автор

Hello sir, How can I pass the parameter for a quiz where multiple users can play the same quiz simultaneously through JMeter(I am testing APIs)? I made a CSV file for login credentials, when I tried to run it in JMeter it worked fine. After that, I created another CSV file for contest-id, and trying to run it's not working because here I have passed a specific user Token. I don't understand how can I pass multiple tokens to multiple users. Could you please reply? This quiz is like a mcq question. Also, how can we select different answers for multiple users? Can we add more CSV file in a single Thread? Please reply.
#raghavpal #automationstepbystep #raghavsir

gayatritankar
Автор

Hi Raghav, how do i use Jmeter response parameter for another request input parameter

brynz
Автор

Please update a course for taurus also

Lucifer-slhh
Автор

My application uses keycloak and angular when recording the test only stores the requests to the keycloak and not to the rest services

victoradolfomosqueragonzal
Автор

There is anyway to loop trought a csv inside another loop?

DouglasSilva-pqhk