No video

JMeter Beginner Tutorial 15 - How to read data from CSV file (Parameterisation)

  Рет қаралды 209,375

Automation Step by Step

Automation Step by Step

8 жыл бұрын

more from Raghav - automationstepbystep.com/
Step 1 : Add config element - CSV Data Set Config
Step 2 : Add details in CSV Data Set Config
Step 3 : Update value fields: ${variable_name}
Step 4 : Run and validate
----------- PERFORMANCE TESTING -----------
JMeter Beginner - bit.ly/2oBbtIU
JMeter Intermediate - bit.ly/2oziNVB
JMeter Advanced - bit.ly/2Q22Y6a
JMeter Tips & Tricks - bit.ly/2NOfWD2
Performance Testing - bit.ly/2wEXbLS
_______ ONLINE COURSES TO LEARN _______
Visit - automationstepbystep.com/
----------- UI TESTING -----------
Selenium Beginners - bit.ly/2MGRS8K
Selenium Java Framework from Scratch - bit.ly/2N9xvR6
Selenium Python - bit.ly/2oyMp5x
Selenium Tips - bit.ly/2owxc50
Selenium Builder - bit.ly/2MKNtlq
Katalon Studio - bit.ly/2wARFdi
Robot Framework - bit.ly/2Px6Ue9
----------- API TESTING -----------
Web Services (API) - bit.ly/2MGafL7
SoapUI - bit.ly/2MGahmd
Postman - bit.ly/2wz8LrW
General - bit.ly/2PYdwmV
----------- MOBILE TESTING -----------
Mobile Playlist - bit.ly/2PxpeUv
----------- CI | CD | DEVOPS -----------
Jenkins Beginner - bit.ly/2MIn8EC
Jenkins Tips & Trick - bit.ly/2LRt6xC
Docker - bit.ly/2MInnzx
----------- VERSION CONTROL SYSTEM -----------
Git & GitHub - bit.ly/2Q1pagY
----------- JAVA -----------
Java Beginners - bit.ly/2PVUcXs
Java Tips & Tricks - bit.ly/2CdcDnJ
----------- MAVEN -----------
Maven - bit.ly/2NJdDRS
----------- OTHERS -----------
Redis- bit.ly/2N9jyCG
Misc - bit.ly/2Q2q5xQ
Tools & Tips - bit.ly/2oBfwoR
QnA Friday- bit.ly/2NgwGpw
Sunday Special - bit.ly/2wB23BO
Ask Raghav- bit.ly/2CoJGWf
Interviews - bit.ly/2NIPPxk
All Playlists - bit.ly/2LSiezA
----------- Follow -----------
Facebook - / automationstepbystep
Twitter - / automationsbs
KZbin - / automationstepbystep
Never Stop Learning
Raghav

Пікірлер: 371
@RaghavPal
@RaghavPal 5 жыл бұрын
Check online courses & training - automationstepbystep.com/
@shipinpk706
@shipinpk706 4 жыл бұрын
can you explain this concept with stepping thread group?
@deepakMCA2009knit
@deepakMCA2009knit 6 жыл бұрын
I must say to thank you for all your free and handy tutorials of Jmeter. Before 4 to 5 years I had automation skill along with Jmeter. I am working in a big MNC right now and in these 5 years MNCs never ever given me chance to continue my this skill and I forgot about it. You are helping me to get that confidence back and making me able to say them, Hey give me some automation work or Good Bye !! Happy Guru Purnima 'The Teacher' :)
@RaghavPal
@RaghavPal 6 жыл бұрын
Deepak, I am so glad that this is helping you. Thanks for your message and Keep Learning. All the best.
@aksluva8
@aksluva8 7 жыл бұрын
hey Raghav, great tutorials loved it. Very simple explanation.
@RK-gj8um
@RK-gj8um 7 жыл бұрын
Thank you Raghav, your explanation is very good
@akhilp2384
@akhilp2384 7 жыл бұрын
Raghav, this session is great and your presentation as well. Can you please make a session on Beanshell post processor and how to export data from response json to csv file. Thanks in Advance
@RaghavPal
@RaghavPal 7 жыл бұрын
sure Akhil, will make it.
@snehalsangle1782
@snehalsangle1782 7 жыл бұрын
If I am using Stepping Thread Group, there is no option like loop, so if i want to parameterise request do i have to add threads same as number of parameters. I mean 2 threads for 2 parameters?
@tatsianamiatliuk7404
@tatsianamiatliuk7404 6 жыл бұрын
Thanks a lot! Raglav, your video helped me to solve my issue by using this config element )
@RaghavPal
@RaghavPal 6 жыл бұрын
Glad to know this Tatsiana
@marzioforte9364
@marzioforte9364 6 жыл бұрын
Nice presentation!
@SameeraSenarathna
@SameeraSenarathna 5 жыл бұрын
Nicely Explained. Keep up the great work.
@RaghavPal
@RaghavPal 5 жыл бұрын
Thanks Sameera
@venkatasuresh8649
@venkatasuresh8649 3 жыл бұрын
Who does not like this. Your explanation is awesome
@RaghavPal
@RaghavPal 3 жыл бұрын
Thanks Venkata
@newbienewbie4994
@newbienewbie4994 4 жыл бұрын
Hi, Thanks for the tutorial. Quick question- if I want to run this from an EC2 instance then the file needs to be hosted on that box? is there a way for us to specify to get the file from an S3 bucket? Thanks!!
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi, yes you can do that, You will need to add a script for that. stackoverflow.com/questions/45084164/s3-access-in-a-jmeter-script You can also use jenkins and then can get the file from s3 or any source code repository before starting JMeter test
@abhishekangrish
@abhishekangrish 6 жыл бұрын
You are helping us so much .Thanks alot :)
@RaghavPal
@RaghavPal 6 жыл бұрын
You're welcome Abhishek.
@shankarlingam4702
@shankarlingam4702 6 жыл бұрын
Bro excellent tutorials bro we expect more tutorials on selenium webdriver, jira....
@RaghavPal
@RaghavPal 6 жыл бұрын
will add more videos soon
@guraband
@guraband 5 жыл бұрын
Very useful video. Thank you!
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome
@saleemsoomro5675
@saleemsoomro5675 7 жыл бұрын
Raghav great tutorial.
@RaghavPal
@RaghavPal 7 жыл бұрын
thanks for watching.
@rajukp1
@rajukp1 7 жыл бұрын
Hi Raghav, You are a great tutor. Thanks for your help. I request you to please add the notes that you prepared while teaching us if you have it. Sorry if I am bothering you
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Kalyan, I am glad it helped. Untill now i have been writing the steps down on a notepad as shown in the videos and i also copy the same in the description of the video. Will try to add more description for everyone's help. Keep Learning.
@ralucastreja
@ralucastreja 7 жыл бұрын
Hello Raghav, I am interested to know how I can parametrise variable information (not static one, like the one in a csv file). I managed to connect to the DB using a JDBC connection configuration, but how can I use the variable that stores the constantly changing IDs from the database?
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Raluca, in the JMeter playlist there are videos for JDBC and variables handling. Please check if you are able to get help from that. kzbin.info/aero/PLhW3qG5bs-L-zox1h3eIL7CZh5zJmci4c
@patrycjah3393
@patrycjah3393 2 жыл бұрын
Thanks a lot! You helped a lot, again!
@RaghavPal
@RaghavPal 2 жыл бұрын
You're welcome Patrycja
@MrKris2009
@MrKris2009 4 жыл бұрын
Hi Raghav, I have question. I am using csv config where I want to pass a variable name in the Filename. So, I have created a user define variable as filename = ${__P(filename, default_filename)}. But it is not recognized in CSV_config when used as ${filenamr}. I tried __P and __property also
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi, Pls check the spelling ${filenamr}
@amoujahid
@amoujahid 4 жыл бұрын
Great tutorial. Thx a lot
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome Abdallah
@theposterguy5312
@theposterguy5312 3 жыл бұрын
Thanks for your Jmeter videos 👍
@RaghavPal
@RaghavPal 3 жыл бұрын
Glad you like them!
@09yuvrajsinh
@09yuvrajsinh 7 жыл бұрын
Thank you Raghav. All of your tutorials are really informative and helpful. I have one request. Can you also come up with Selenium Web Driver 3.0 tutorials?
@RaghavPal
@RaghavPal 7 жыл бұрын
Yuvraj i am glad you found it helpful. I will soon be starting a series on Selenium and will cover Se web driver 3.0 also.
@seliniumjava7477
@seliniumjava7477 7 жыл бұрын
Automation Step-by-Step - Raghav Pal x
@RaghavPal
@RaghavPal 7 жыл бұрын
Please watch this - Selenium Beginner - kzbin.info/aero/PLhW3qG5bs-L_s9HdC5zNshE5Ti8jABwlU
@nitinfudani1552
@nitinfudani1552 7 жыл бұрын
Hi raghav, Your videos are very helpful for beginners.! Thanks a lot.! Can you please upload a video for distributed Load testing for web application as soon as possible.!
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Nitin, i am glad these videos are helping beginners. Sure, i will make something around this topic soon.
@milakhan8734
@milakhan8734 4 жыл бұрын
Hi raghav, this series is by far the most clearest video series for a Jmeter beginner. One question, is it possible to configure each concurrent user(thread) is using different data from the csv file? Eg each user has unique login id and password for a login action?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Jameela, Pls see if this is what you need - www.blazemeter.com/blog/csv-data-set-config-in-sharing-mode-made-easy/
@himanshudx24
@himanshudx24 3 жыл бұрын
Hi Raghav can you please share the link of the previous video as the 9th video i see in the playlist doesnt have weather information as mentioned in this video, Thanks!
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Himanshu, I believe this refers to the API web services video, I have added it as tutorial 11. I had earlier removed it as it became outdated with the new changes in JMeter, Now I have added it again and also updated the description. Pls check - kzbin.info/www/bejne/m5K4aGxrZsuBq7M
@omarntfs
@omarntfs 4 жыл бұрын
Thank you for this tutorial
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome Omar
@HanonKurumi
@HanonKurumi Жыл бұрын
Thanks a lot! It's very useful.
@RaghavPal
@RaghavPal Жыл бұрын
You are welcome!
@noormohammad5740
@noormohammad5740 4 жыл бұрын
Thanks a ton brother .... God bless you
@RaghavPal
@RaghavPal 4 жыл бұрын
Thanks for the wishes Noor
@RamandeepKaur-pl9kr
@RamandeepKaur-pl9kr 7 жыл бұрын
Hi Raghav, what is the concept of data pool. if i need to run my login-logout script for more than one user, then where all places i need to replace user ID and password with variables. and what should be th search criteria for that. I started to learn Jmeter few days back. started with your tutorials. These videos are really helpful. But i'm running through issues when i'm trying to work on actual scripts. Thanks!
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Ramandeep, you can parametrise your data in csv file and then in your HTTP Sampler request you have section for Parameters, Here you can replace with the variable names.
@saichandrapokala8627
@saichandrapokala8627 5 жыл бұрын
Hi Raghav, My json body has around 50 input fields. Each time I only have to change one filed. So as per the video should I create parameters for all my input fileds.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Saichandra, I may have not got your scenario completely, but its as per your need. Whatever value you want to get from csv you can do that and if you want to hardcode some values that is okay, you can give it directly in your test.
@saiganeshn8588
@saiganeshn8588 2 жыл бұрын
Great tutorial bro helped me a lot
@RaghavPal
@RaghavPal 2 жыл бұрын
Great to know Sai
@vikasnanu1
@vikasnanu1 5 жыл бұрын
Excellent session. loved it. Sir, can we have a session on how to write to CSV file using Jmeter, please.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Vikas, thanks for the message. Usually we can export results in csv, Is there any specific use case for your example
@AmongManyWays
@AmongManyWays 6 жыл бұрын
hey raghav, first of all excellent tutorial on jmeter. I had a query. i need to test an rest api which creates an element in db taking 5 parameters . In return it throws the id of resource created. Similarly i have to test equivalent delete api which just takes the id. How to go about it using jmeter ? Do i have to manually enter values in csv ? How would u do it ?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi, you can use correlation to pass values from one request to another. Watch - kzbin.info/www/bejne/bV6xlKyQqrqEpNk
@elsiemuthiani5921
@elsiemuthiani5921 Ай бұрын
awesome teaching thanks very well understood and practiced
@RaghavPal
@RaghavPal Ай бұрын
You are welcome Elsie
@ameni630
@ameni630 4 жыл бұрын
Thanks a lot :) Could you help me please: I work with the SOAP web service: How to manage a csv file with 3 columns and each column represents a variable in a SOAP request?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Ameni, you can create the variables as per the column headers and then follow the same process. it should work
@vishalrathod-dn5sw
@vishalrathod-dn5sw 2 жыл бұрын
Thank you so much it is working for me. Really appreciated.
@RaghavPal
@RaghavPal 2 жыл бұрын
You're welcome Vishal
@Pinguofficial1234
@Pinguofficial1234 3 жыл бұрын
Thanks for the Jmeter classes very useful Can I know if we can have multiple excel sheets and access them?
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Nagma, you can, you can create multiple csv data set config for that, and add the data set config as a child of the request where you want to use the data
@akado5663
@akado5663 6 жыл бұрын
Thank you, Raghav. All of your tutorials, as usual, are really informative and helpful and great. I have an issue in Jmeter 3.3 when I add Add config element - CSV Data Set Config to thread Group then the test plan is not running (nothing to see in the tree) . When I remove the CSV Data Set Config element than by run of the test plan is again the response to see in the tree. is it a new BUg in Jmeter 3.3.? do you know something regarding this.
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi, can you check the logs. There might be some issue.
@akado5663
@akado5663 6 жыл бұрын
Thanks Raghav, it was an issue with excel. instead of comma I changed it to the semicolon and was working fine
@nareshpallapothula6389
@nareshpallapothula6389 6 жыл бұрын
Thanks for the sessions Raghav, I have a question like - If we have multiple thread groups in a Plan, Can we pass data from csv file as one row to one thread group and next row to another thread group and so on? Can we do that ?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Naresh, thanks for watching, just is if you need something similar to what is explained in this post - www.blazemeter.com/blog/csv-data-set-config-in-sharing-mode-made-easy
@samueldepablos3853
@samueldepablos3853 2 жыл бұрын
How do I make each Vuser take an unused (unique) data value from the text file on the first iteration and keep the same value for all iterations and occurrences?. Thanks.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Samuel, you can see the settings in CSV data set config You can also use functions for this
@jennifergroff7832
@jennifergroff7832 3 жыл бұрын
Thank you so much I really truly appreciate your tutorials. I am walking through them since I am new to this and do it for my job. I am not finding the Tutorial #9 at all that you created the test from, the list has changed or it is not avail any longer? Can you point me in the correct direction so I can follow this video, I really need to know how to pull data from CSV for my tests. Thank you
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Jennifer, thanks for your message. Pls check the complete playlist here - kzbin.info/www/bejne/m5K4aGxrZsuBq7M
@bandimohanreddy4251
@bandimohanreddy4251 2 жыл бұрын
Nice explanation 😄
@RaghavPal
@RaghavPal 2 жыл бұрын
Thanks
@deepanparikh9547
@deepanparikh9547 4 жыл бұрын
Hi Raghav, thanks for the tutorials. How can I capture parameters dynamically on Jmeter? do you have any video on it? Thanks.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Deepan, what exactly is meant by capture parameters dynamically. You can check all JMeter videos here - automationstepbystep.com/online-courses/
@PrincetonKurtz-zn9qv
@PrincetonKurtz-zn9qv Жыл бұрын
Hi Raghav ,Suppose for multi user load test I want to login with different usernames & passwords from CSV file then what values should be under "Variable names " box ? I should left it blank ?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Princeton In JMeter, when you want to use different usernames and passwords from a CSV file for a multi-user load test, you need to specify the variable names that correspond to the columns in the CSV file. Here's what you should do: 1. Create a CSV file with columns for usernames and passwords, for example: ``` username,password user1,password1 user2,password2 user3,password3 ``` 2. Add a CSV Data Set Config element to your Test Plan in JMeter. 3. In the CSV Data Set Config element, set the "Filename" field to the path of your CSV file. 4. In the "Variable Names" field, you should enter the names of the variables that correspond to the columns in your CSV file. For example, if your CSV file has columns named "username" and "password", you should enter `username,password` in the "Variable Names" field. Make sure the names match exactly (case-sensitive). 5. In your HTTP Request, use the variable names in the format `${variable_name}` to refer to the values from the CSV file. For example, if you want to use the username and password values from the CSV file, you can use `${username}` and `${password}` in the appropriate fields of the HTTP Request. By setting the correct variable names in the "Variable Names" field, JMeter will automatically read the values from the CSV file and assign them to the corresponding variables during the load test. Each thread/user will then use a different set of credentials from the CSV file.
@ankitkabra20
@ankitkabra20 7 жыл бұрын
Thanks Raghav. Tutorial is very handy and helpful. I have a question we are passing the complete Json file as input parameter How we can do that ? I want to create scenario where I CSV will feed data to all the threads with the dynamic data. Can this be achievable?.
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Ankit, you can try to write a Bean Shell script to get your values from file and then run your test.
@djvh2
@djvh2 7 жыл бұрын
Just as a heads up, the video does not show Raghav use the variable for appid when he modifies REST-RPC-Request. He uses the city variable but leaves appid hard coded. I'm sure he meant to change both.
@nurilha
@nurilha 4 жыл бұрын
what if I want to simulate 2 users? i want first row to simulate user 1 and 2nd row of csv to simulate user 2. At the moment you have 1 user doing both requests.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Nuril, this should help you - dzone.com/articles/how-to-pick-different-csv-files-at-jmeter-runtime
@sudhakarr825
@sudhakarr825 4 жыл бұрын
Thanks for your Videos Pal, I have beginner learning Jmeter watching your videos. can you please explain how to select CSV data to take sequentially when we are running for Multiple user test
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sudhakar, you can use critical section controller. Pls check is this what you need - stackoverflow.com/questions/51298120/i-want-to-fetch-the-data-from-csv-in-sequential-order-in-jmeter-what-should-be-d
@vedantkulkarni6263
@vedantkulkarni6263 6 жыл бұрын
H i Raghav, I tried with xlxs format file but it is not showing results in view results tree while execution ,Can you please help?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Vedant, pls check the logs.
@sayantandas2054
@sayantandas2054 7 жыл бұрын
Hi. In case of some logins they provide an access id for the entire session . Now , using regex extractor post-processor i extracted it and used it in my subsequent http samplers as ${token} (i am conducting a web test which has multiple http samplers , first one being login get request which generates access token for that login). Works for 1 user(thread). However, when i use multiple threads , for some threads it works and for the remaining ones the request token uses "${token)}" as its value not the value of the token which it did in case of one thread. Can u pls help me fix this?
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi you can try using blazemeter chrome plugin to record your test and then try it. It should provide basic setup and conifgs.
@sumit0352
@sumit0352 4 жыл бұрын
Hi Raghav, Thanks for the video. Could you please prepare a video on how to do performance testing with 50 different concurrent users using csv? This should include end to end flow of the app.
@RaghavPal
@RaghavPal 4 жыл бұрын
I will plan Sumit
@gavinjames9476
@gavinjames9476 2 жыл бұрын
If i have integer values like No of Month in csv file and it contains all integer values in it and i want to pass dynamically in Body Data tab of particular HTTP request for integer values then how to do it
@RaghavPal
@RaghavPal 2 жыл бұрын
HI Gavin, the process should remain same, can check this stackoverflow.com/questions/50933586/jmeter-read-data-numbers-from-csv-file-in-jmeter
@kirankumarsuri9195
@kirankumarsuri9195 5 жыл бұрын
Thanks Raghav for educating us with your excellent videos.........I tried the above video in jmeter5.1 same like you but I have getting issues particularly the city name is not taken from the csv file. I checked in Google the reason for that.In "CSV Data Set Config" section if I don't give anything at Variable Names(comma-delimited) I have been getting this issue if I give the column names for which I want to pass the parameters this issue is not coming. I watched your current video many times even then also the issue didn't solve until I give column names for which I want to pass the parameters. Can you please help to understand it version specific issue or anything else as I see most of the features in your videos not available in 5.1.......please clarify
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Kiran, hope you have not missed any steps. I have not yet checked with ver 5.1. You can try with an older version to ensure if its version issue
@mayanksoni9994
@mayanksoni9994 5 жыл бұрын
it was a helpful session. And I would like to know, how can i pass input payload from csv for post method.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Mayank, the process will be the same. You can goto your message body or parameters and parameterize using variables and refer from csv
@saikatdebnath4515
@saikatdebnath4515 3 жыл бұрын
Hi Raghav , i was using special characters to read data from CSV file which i used to Login to account. And it looks like special characters are not taking (example- @ and #). any idea why ? Thanks in advance
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Saikat, you can change the encoding, Check blog.e-zest.com/how-to-read-special-characters-from-csv-in-jmeter
@ayyanzchannel2.0
@ayyanzchannel2.0 3 жыл бұрын
Hi, You created new videos related to Rest and SOAP in Octrober 2020 so this tutorial num 15 is not making sense for me. Please guide me in this confusion.
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi, I created new videos for API testing on JMeter as the old videos on that were outdated as JMeter does not have separate API sampler now.
@jonb3769
@jonb3769 6 жыл бұрын
Thank you Raghav, good tutorial...you have personal classes?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi JD, thanks for watching. Yes, I give classes morning 6 to 7 IST. You can connect on raghav.qna@gmail.com
@keerthirajkitty2860
@keerthirajkitty2860 5 жыл бұрын
Hi Raghav Pal, thank you for this informative videos. These videos shows how to test web pages. Can you please share how to test Mobile applications using Jmeter.
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome Keerthiraj. Pls check here - kzbin.info/aero/PLhW3qG5bs-L_Eosy1Nj1tKHC5jcBAVkPb Other courses - automationstepbystep.com/909-2/online-courses/
@Naturelover-ny3vj
@Naturelover-ny3vj Жыл бұрын
Hi If i want run only one iteration and with 3rd row testdata then how can i do that?
@RaghavPal
@RaghavPal Жыл бұрын
Hi To run only one iteration and with 3rd row test data in JMeter, you can do the following: 1. **Open the JMeter test plan.** 2. **In the `Test Plan` element, right-click and select `Add` > `Sampler`.** 3. **From the list of samplers, select `HTTP Request`.** 4. **In the `HTTP Request` dialog, enter the URL of the web page that you want to test.** 5. **In the `Test Data` tab, select the `3rd row` from the `Data Set` list.** 6. **In the `Iterations` field, enter `1`.** 7. **Click `Save`.** Once you have made these changes, JMeter will only run the HTTP Request sampler once, and it will use the data from the 3rd row of the test data set. Here is an example of how to do this in JMeter: ``` HTTPSamplerProxy sample1 = new HTTPSamplerProxy(); sample1.setUrl("www.example.com/"); sample1.setMethod("GET"); sample1.setTestData("3rd row"); sample1.setIterations(1); ``` Once you have added this code to your JMeter test plan, you can run the test by clicking on the `Run` button. The test will only run once, and it will use the data from the 3rd row of the test data set. I hope this helps
@GautamKumar-dg8qc
@GautamKumar-dg8qc 7 ай бұрын
Hi thanks for the video I have one doubt as you mentioned that 3 rows are there so we took 3 iterations, what if we take the iterations as infinite then it will repeating again again right. Like 1,2,3 then 1,2,3... and so on infinitely right?
@RaghavPal
@RaghavPal 6 ай бұрын
Gautam Yes, you're correct. When you set the iterations to "Infinite" in the JMeter CSV Data Set Config, it will continuously repeat the rows in the CSV file, effectively creating an endless loop. Here's a detailed explanation of how it works: 1. CSV Data Set Config Setup: - You add a CSV Data Set Config element to your test plan. - You specify the path to the CSV file containing the data rows. - You set the "Recycle on EOF?" option to "True" (this is the default). - You set the "Stop thread on EOF?" option to "False." - You set the "Number of threads" (virtual users) to your desired value. - You set the "Loop Count" to "Infinite." 2. Iteration Process: - JMeter starts reading data from the CSV file, feeding it to each virtual user. - When it reaches the end of the CSV file (EOF), it rewinds to the beginning and starts reading again, continuously repeating the rows. - This cycle continues indefinitely, as long as the test is running and the "Loop Count" is set to "Infinite."
@GautamKumar-dg8qc
@GautamKumar-dg8qc 6 ай бұрын
@@RaghavPal got it, thanks for reply.
@shivanandn7290
@shivanandn7290 6 жыл бұрын
Hi Raghav, Very helpful videos. I am using JMeter 3.0 and testing with sampler SOAP/XML-RPC Request, I am trying pass parameter from Csv file as ${XYZ}, but it’s reading it as ${XYZ} instead of value. Please advise.
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Shiva, in case you have given headers in your csv file, do not give any values in the Vairables Name field of CSV Data Set Config
@vedikasharma4258
@vedikasharma4258 6 жыл бұрын
Hi Raghav , its not reading my csv file , instead of value taking the variables. Please help for the issue.
@RaghavPal
@RaghavPal 6 жыл бұрын
If you are giving headers in your csv file, then don't provide variables name in csv data set config element. It will directly be taken from csv file. If you provide the variables, then the first row will also be considered as values.
@maocackao7604
@maocackao7604 2 жыл бұрын
thank you bro
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Mao
@rahulsingh848
@rahulsingh848 6 жыл бұрын
Hello Raghav. Thank you so much for this nice tutorial. I have one doubt. We have 3 http request in a thread group and we are using same .CSV file for all the request. We have 3 rows in the csv file and we want to pick different row for different requests. Can we do that ?
@RaghavPal
@RaghavPal 6 жыл бұрын
Yes you can do that. You can give different column headers in your csv and refer the same in your jmeter.
@dishantsharma6122
@dishantsharma6122 3 жыл бұрын
Hi, Raghav Hope you doing well !! I have a query can you please tell that how can I add or fetch users to my API call from an excel file.
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Dishant, try to use excel in the same way we have used csv. Also see some online examples stackoverflow.com/questions/48987834/reading-content-from-excel-using-jmeter
@rajashekharkorva6212
@rajashekharkorva6212 4 жыл бұрын
Thank you, Raghav. Is there a way to read the data from CSV in non-GUI mode. If not, how can we use multiple values for a single parameter when we run from command line.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Rajashekhar, if you have configured to use data from csv, it will work even from commandline. Pls try and see if you get any issues. You can check this too for help - stackoverflow.com/questions/38082400/passing-csv-data-set-config-file-as-parameter-to-jmeter/38085980#38085980
@rajashekharkorva6212
@rajashekharkorva6212 4 жыл бұрын
@@RaghavPal Thanks again Raghav. The link you shared helped. I really appreciate it!!
@harishsaraf3621
@harishsaraf3621 5 жыл бұрын
Thanks Raghav, Can you tell me how to configure to send unique data everytime for a single csv file used by more than 2 users
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Hari, in case of excel we can have formula added in cells that will do the job. For csv I think you can use FUNCTIONS like RANDOM FUNCTION
@nithyahari3462
@nithyahari3462 4 жыл бұрын
Thanks Raghav, I have a situation to pass multiple row values in single request. I am using random csv data set config. If I just use parameter name it uses same row value twice. How to make it chose different row. Something like [{$city, $email}, {$city,$email}].
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Nithya, usually once you refer it take one of the random values from csv and will use that value unless you refer the same parameter again. If you like I can check your setup. Can upload your setup image here imgbb.com/upload and send me the link
@Sasshi33
@Sasshi33 5 жыл бұрын
Hi Raghav bro, I need a help from your side. Created CSV data set config for login modules only. in CSV file mentioned two users. It's logged in successfully displayed in jmeter but in the data base entries are not inserted into user log table. Without using CSV the values are inserted into corresponding table while running in jmeter.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Sasshi Kumar, that ideally should not be the case, But I found something similar here stackoverflow.com/questions/33133263/jmeter-csv-data-parameterize-in-script-but-not-updated-in-system-database
@Sasshi33
@Sasshi33 5 жыл бұрын
@@RaghavPal thank you so much ..... Brother....
@rafishaik9336
@rafishaik9336 6 жыл бұрын
hi Raghav, This session is grate and your presentation is good... but i have a small doubt ,I have to register In account ex:FB then i want to pass all parameters from csv file .It is possible As like above video.
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Rafi, yes you can parametrise any test.
@16prish
@16prish 3 жыл бұрын
Hi Raghav, I have question regarding report which would be generated from different CSV data then how to identify those from report.
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Prishani, you can use the __CSVRead() function and can try some functions to get this added in reports. Not a usual thing that we do so will need to do some work for this
@sayalimohadikar6685
@sayalimohadikar6685 5 жыл бұрын
is there a way to read external JSON file from Jmeter and then use its values?
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Sayali, replied to your other comment. I believe you will need to add some scripting for that. I have not tried, can get some help here - stackoverflow.com/questions/30589715/how-to-read-external-json-file-from-jmeter
@pavithram487
@pavithram487 Жыл бұрын
Hi, I have Thread Group with three requests (login, do some process, logout) I'm passing data's(1500 data) from csv config file for login and do some process request. It is working fine if i give thread count as 1500, but i want to run the thread group in loop for infinite time were after reaching 1500 data in csv file again it should continue from the first row. I tried a lot but it is not working.For Login, after reaching 1500 data it again starts from 1st but for the next request after reaching 1500 data it takes empty data from csv file even though i have set true for recycle EOF. Can you just give me a solution. Thanks
@RaghavPal
@RaghavPal Жыл бұрын
Hi Pavithra here are the steps on how to run a JMeter thread group in a loop for infinite time: 1. Add a **Loop Controller** to your thread group. 2. Set the **Loop Count** to **Infinite**. 3. Add a **While Controller** to your thread group. 4. Set the **Condition** of the While Controller to **${__loopIteration} < ${totalIterations}**. 5. Set the **Total Iterations** of the While Controller to the number of rows in your CSV file. 6. Add your requests to the thread group. 7. Set the **Variable Names** of your requests to the column names in your CSV file. 8. Set the **Data Set Config** of your requests to the CSV file that contains your data. 9. Set the **Recycle on EOF** of your requests to **True**. Once you have completed these steps, your thread group will run in a loop for infinite time. The first time the thread group runs, it will iterate through all of the rows in your CSV file. Once it reaches the end of the file, it will start from the beginning again. This will continue indefinitely
@YSmedvednikova
@YSmedvednikova 4 ай бұрын
It is possible to set variable "http request" type by csv-file? For example GET, PUT, UPDATE and so on
@RaghavPal
@RaghavPal 4 ай бұрын
When using JMeter with a CSV Data Set Config, you can indeed set the HTTP request type dynamically based on values from your CSV file. Let's explore how you can achieve this: 1. CSV Data Set Config: - The CSV Data Set Config element in JMeter allows you to read lines from a CSV file and split them into variables. - By default, it assumes that the CSV file is comma-separated (CSV), but you can customize the delimiter. 2. Scenario: - Suppose you have a CSV file with columns like `RequestType`, `Endpoint`, and other relevant data. - You want to dynamically set the HTTP request type (GET, PUT, etc.) based on the `RequestType` column from the CSV. 3. Steps: - Here's how you can achieve this: 1. Create Your CSV File: - Your CSV file should include columns like `RequestType`, `Endpoint`, and any other relevant data. - Example: ``` RequestType,Endpoint GET,/api/resource1 PUT,/api/resource2 POST,/api/resource3 ``` 2. Configure CSV Data Set Config: - Add a CSV Data Set Config element to your JMeter test plan. - Specify the path to your CSV file. - Set the delimiter to match your CSV file (e.g., semicolon `;` in your case). 3. Use Variables in HTTP Request: - In your HTTP Request sampler, use variables for the request type and endpoint. - Example: - Set the HTTP Method field to `${RequestType}`. - Set the Path field to `${Endpoint}`. 4. Run Your Test: - JMeter will read the values from the CSV file line by line. - For each iteration, it will set the `RequestType` and `Endpoint` variables accordingly. - Your HTTP requests will use these dynamically set values. 4. Example: - Suppose your CSV file contains the following lines: ``` RequestType,Endpoint GET,/api/resource1 PUT,/api/resource2 POST,/api/resource3 ``` - During execution, JMeter will use the values from the CSV to make requests like: - GET: `/api/resource1` - PUT: `/api/resource2` - POST: `/api/resource3` Remember to adjust the column names and structure according to your specific use case. With this approach, you can dynamically set the HTTP request type based on values from your CSV file.
@abhinay5619
@abhinay5619 4 жыл бұрын
Iam following automation and jmeter as well .I am implementing in our office with that skills .thanks Aditya... one question related to jmeter .my application will generate one token when we login to that ,so for performance testing how can we extract the token and how can we do load test for that ..
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Abhi, pls check regular expression extractor video kzbin.info/www/bejne/bV6xlKyQqrqEpNk
@pratikshatamadalge6275
@pratikshatamadalge6275 3 жыл бұрын
Great tutorial, Is there in other tutorial to read (Array)data from CSV file (Parameterisation)? Please suggest
@RaghavPal
@RaghavPal 3 жыл бұрын
Not yet Pratiksha
@BhushanPatil-pf4kn
@BhushanPatil-pf4kn 7 жыл бұрын
Reghav, Can we use Selenium script for Jmeter to perform Load testing ??
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Bhushan, the answer is yes. In fact there is a webdriver plugin for JMeter. Can check that.
@lilyphan8686
@lilyphan8686 7 жыл бұрын
Raghav, thank you so much for not only sharing your knowledge but being a good teacher! I have never done any load test before and my application is pretty much similar to gmail in the sense that I need to login, do some search, send some emails, upload/download some files. My task is to see how the app behaves with some 7000 concurrent users (given that certain percentage of users would take certain actions as listed above.)My question is: Do I need to use parameterization for the 6000 users here? Or simply raise the number of threads to 7000 would be enough to say it's a load test? If parameterization is needed, I guess I have to create 7000 users first in the database BEFORE even create a test plan in JMeter? Could you please give me some guidance !! Thanks a bunch!!
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Lily, i am glad that you are learning from this channel. If your aim is just to load test the application you can go with same user and increase number of threads. Some tips: Always use a stable client for this test. Preferably a remote(cloud) machine. This will not compromise your network during the test + you can compare your future runs on the same configuration. Always note down client and server configuration.
@swarnendubhattacharjee2201
@swarnendubhattacharjee2201 4 жыл бұрын
Hi Raghav.. 1.how can we randomise the parameters added in the CSV ? Say if I have 10 credential values in param list and I want random of that to be chosen in each run? 2. If I add parameters in the path of a request,it's failing with Illegal character in path at index ...path/${Param} at java.net.URI$Parser.fail(Unknown Source)
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Swarnendu, this can help stackoverflow.com/questions/18479960/random-selection-from-csv-file-in-jmeter
@amrutakulkarni9281
@amrutakulkarni9281 4 жыл бұрын
i want to set key for api load testing ...i am anable to take key in parameter and value in body please can you help me.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Amruta, I did not completely get you, Is the key part of body, or headers. You can check JMeter header manager or authorization manager components
@vinay24c
@vinay24c 11 ай бұрын
Hi Sir, Thanks for your videos. I want to substitute (example 10 unique data) in my single request like each occurrence in LoadRunner, is there any way to achieve the same in JMeter, please assist it.
@RaghavPal
@RaghavPal 11 ай бұрын
Vinay Yes, there are a few ways to substitute different data in a single request in JMeter. One way is to use the *CSV Data Set Config* element. This element allows you to specify a CSV file that contains the data that you want to substitute. The CSV file should have one row for each data point, and the columns in the file should match the names of the variables in your request. To use the *CSV Data Set Config* element, you need to add it to your test plan and then configure it with the path to the CSV file. You can also specify the delimiter that is used in the CSV file, and the number of rows that you want to read. Here is an example of how to use the *CSV Data Set Config* element: ``` ``` In this example, the CSV file is called `data.csv` and the delimiter is a comma. The `numberOfLines` attribute is set to 10, which means that the element will read the first 10 rows of the file. The data in the CSV file will be substituted into the variables in your request. For example, if your request has a variable called `username`, the value of the `username` variable will be replaced with the first value in the first row of the CSV file. Another way to substitute different data in a single request is to use the **BeanShell PostProcessor** element. This element allows you to execute a BeanShell script before or after a request is executed. The BeanShell script can be used to read data from a file, generate random data, or perform other operations. The data that is generated by the BeanShell script can then be substituted into the variables in your request. Here is an example of how to use the *BeanShell PostProcessor* element: In this example, the BeanShell script is stored in the `script` attribute. The `script` attribute can contain any valid BeanShell code. The BeanShell script can be used to read data from a file, generate random data, or perform other operations. The data that is generated by the BeanShell script can then be substituted into the variables in your request. I hope this helps
@ravikishorevemuri3178
@ravikishorevemuri3178 6 жыл бұрын
Hi Sir, requested you please make video on json data file (Parameterisation) instead of CSV file
@RaghavPal
@RaghavPal 6 жыл бұрын
I will do so Ravi.
@neelimapatnaik4327
@neelimapatnaik4327 Жыл бұрын
Hi Raghav, but how to configure parameter present in csv , while running scripts in jenkin
@RaghavPal
@RaghavPal Жыл бұрын
Hi Neelima, you can create a parameterized job in jenkins
@newbienewbie4994
@newbienewbie4994 4 жыл бұрын
I added the CSV file and added the parameters in the HTTP request. My csv file looks like user1,user2 and also tried below options user1 user2 and also tried user1, user2 In all the cases I am seeing that the request is sending the parameter in the url twice. Below is the output. Can you tell me how to fix this? Tried multiple things but its not working: Parameter in http request looks like: Name Value userid. ${user1} GET https: //google.com/tp/name=hello&userId=user1&userid=user1 The issue is that its not just replacing the value in my csv file but also adding the parameter along with url and sending it.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi pls show me the original url, where you have referred the variable.
@behumanf1rst
@behumanf1rst 4 жыл бұрын
Good tutorial. I have POST operations, instead of sending payload in HTTP Requests as body data, I need to send as files so that each files will have different types of payload. Do you have video for this setup?. I mean I have to use __FileToString(... __eval...)
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Kasim, not yet, you can get some help here stackoverflow.com/questions/39037049/how-to-upload-a-file-and-json-data-in-postman
@alexnettty
@alexnettty 6 жыл бұрын
Hi Raghav, I am getting this error: java.net.URISyntaxException: Illegal character in query at index 50: api.openweathermap.org/data/2.5/weather?q=${city}&appid=${appid} and I use Numbers for generating the file. What should I do to avoid this error?
@RaghavPal
@RaghavPal 6 жыл бұрын
Looks like the values are not getting referred from your csv. Check the logs. (button at top right) kzbin.info/www/bejne/kJy1ipd-jq1lhJo
@alexnettty
@alexnettty 6 жыл бұрын
Thank you Raghav, the logs showed what was wrong and installing Table Tool also helped.
@sharadsinha3835
@sharadsinha3835 4 жыл бұрын
Hi Raghav ,I have to implement j meter in my project i.e. chat bot application how could I implement could you please help me out?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sharad, not much exp with Chatbox. Pls try online help stackoverflow.com/questions/56426571/how-to-measure-performance-testing-for-chat-bots-using-jmeter-or-any-tool www.blazemeter.com/blog/5-ways-to-load-test-popular-chat-plugins-with-jmeter/
@aashisoni6018
@aashisoni6018 2 жыл бұрын
This video is so helpful and easy to understand. I want to know is there any way to pass multiple values in HTTP header manager through CSV?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Aashi, can check this stackoverflow.com/questions/19541133/jmeter-use-csv-for-setting-http-header
@aashisoni6018
@aashisoni6018 2 жыл бұрын
@@RaghavPal Thanks for reply, it's working, already tried.
@camilohenaobravo1766
@camilohenaobravo1766 4 жыл бұрын
Usted me ayuda en todo lo que necesito saber !!!!!
@RaghavPal
@RaghavPal 4 жыл бұрын
Muy bienvenido Camilo
@camilohenaobravo1766
@camilohenaobravo1766 4 жыл бұрын
Graciasss mil gracias amigo, se que me ayudaras mucho para el proyecto de grado!!@@RaghavPal
@RaghavPal
@RaghavPal 3 жыл бұрын
Muy bienvenido
@adityapare5454
@adityapare5454 6 жыл бұрын
Raghav could you please create this tutorial for latest JMeter version because as i see now soap and rest is changed in latest version of JMeter
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Aditya, you are right. I will plan to do it soon.
@adityapare5454
@adityapare5454 6 жыл бұрын
Thanks Raghav
@harshalchopde2322
@harshalchopde2322 6 жыл бұрын
Hello Raghav facing some issue while accessing csv file as below jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: Could not read file header line for file Data.csv
@RaghavPal
@RaghavPal 6 жыл бұрын
Harshal, are you running from command line. (if yes send me the command). Also check below links: stackoverflow.com/questions/13228918/jmeter-doesnt-accept-csv-input-file stackoverflow.com/questions/10818221/jmeter-csv-data-set-config-failing-to-find-csv?lq=1
@harshalchopde2322
@harshalchopde2322 6 жыл бұрын
Thanks Raghav Issue resolved
@sigamalagopi3508
@sigamalagopi3508 7 жыл бұрын
Hi Raghav,how can i pick values in random from csv file ?
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Sigamala, check if this helps you - stackoverflow.com/questions/18479960/random-selection-from-csv-file-in-jmeter
@santhoshkumar5306
@santhoshkumar5306 7 жыл бұрын
can u pls clear my doubt as soon as soon.. if pass the wrong password in Excel file, why it not showing the Error msg to the particular sampler??
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Santhosh, so in your case the request is passing and moving forward?
@sailidalvi3570
@sailidalvi3570 7 жыл бұрын
Hi Raghav, In Jmeter 3.2 version, there is no REST and SOAP RPC request in sampler section. So how can we carry out these steps without it, Kindly revert.
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Saili. SOAP/XML-RPC Request has been removed as part of Bug 60727. Use HTTP Request element as a replacement. jmeter.apache.org/usermanual/build-ws-test-plan.html
@raghava007jakka
@raghava007jakka 7 жыл бұрын
hi raghav .. how can i check a senario where can i download Files in load testing can u please help in this regard with example
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Raghav, i will try to upload a video with example soon on this.
@RaghavPal
@RaghavPal 7 жыл бұрын
HI Raghav , here is your video - How to test File Download - kzbin.info/www/bejne/iqvUlWSuiLWWadU
@andyueapisit3442
@andyueapisit3442 4 ай бұрын
What's tutorial that you taught about reading excel to insert Database
@RaghavPal
@RaghavPal 4 ай бұрын
Did not get you..
@vishalsangle8369
@vishalsangle8369 2 жыл бұрын
Hello,How can we validate data from CSV data set config?If we added wrong user id and password then result should failed in listener.currently run pass with wrong user id password.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Vishal, you will need to add some assertions to verify login is successful, Can try some online examples
@puneettomer875
@puneettomer875 7 жыл бұрын
Raghav can you please tell me ? How can I take 1st row only for all iteration??
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Puneet, in CSV data file config sampler, there are fields like: Recycle on EOF Sharing mode This should help you Can also check this :stackoverflow.com/questions/13470441/use-same-row-per-thread-from-a-csv-data-set-in-jmeter
@seleniumtest6247
@seleniumtest6247 8 жыл бұрын
Thanks once again...Suppose want to call "by city API" 1 time & "City List API calling" 10 times...how achieve this?
@RaghavPal
@RaghavPal 8 жыл бұрын
If i got you right, you are trying to parametrise with varying number/count of parameters and want to run the test accordingly. Suppose if you have given 5 city names and 10 country names in csv file you want that the API referring city variable should be run 5 times and other one 10 times. Here's what you can do. 1. Create 2 thread groups 2. In CSV Data Set Config - make Sharing mode = Current thread group 3. Make Recycle on EOF = false Now you can keep your requests in separate threads and run it. Also now you can have 2 different csv files if you need.
@mssohan
@mssohan 7 жыл бұрын
Hi Raghav, i would like get more details about your Tutoring lessons, how do i contact you ?
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Sabbir, you can find my email in the about section of this channel.
JMeter Beginner Tutorial 16 - Functions and Variables
13:58
Automation Step by Step
Рет қаралды 91 М.
JMeter tutorial 07 - How to read data from CSV File | Parameterization in JMeter
16:12
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 63 МЛН
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 35 МЛН
JMeter Beginner Tutorial 11 - Testing Web Services API
20:33
Automation Step by Step
Рет қаралды 235 М.
JMeter Beginner Tutorials | Tips n Tricks 5 💡 How to use JSON Extractor
14:14
Automation Step by Step
Рет қаралды 46 М.
How to design a modern CI/CD Pipeline
9:59
DevOps Journey
Рет қаралды 109 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 63 МЛН