Make a new Thread group in test plan
Make a CSV Data Set Config (in config element) and make the following changes in it.
In file name we provide the file we want to read i.e C:/Example.csv
In variable names type col1,col2
Keep all other things default.
Make a new java request and give it name req 1 ${col1},${col2}
Run the script.We will see it will show java req name Req1 Mango,orange in Results tree.
Run the file for more no of iterations.
We will see if all the data in the csv file is printed it will start printing from begining again.Because we clicked Recyle on EOF to true and Stop Thread on EOF to false.
Other options to look into -
The stop the thread once it has printed everything in file.
Recyle on EOF-False Stop Thread on EOF-True
To not stop the thread once it has printed everything in file. So once everything in the csv file is printed it will keep printing eof,eof and so on.
Recyle on EOF-False Stop Thread on EOF-True