JMeter tutorial 07 - How to read data from CSV File | Parameterization in JMeter

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024
  • Hi Guys!
    This video covers the concept of Parameterization, i.e. how to read data from CSV File in JMeter.
    Learning:
    What is Parameterization?
    Parameterization is the process of creating multiple test data for single/multiple users in a test script
    Why Parameterization?
    Let’s say You have the task to load test the login functionality of the application under test. Since, it is a load test, you can not test it with a single login. In this case, you need to test it with multiple test data and hence you need to use the concept of parameterization.
    Steps to parameterize your test data:
    1)Put the test data in CSV file
    2)Configure JMeter to read those test data from CSV file by adding Config Element - CSV data set config
    3)Replace hard coded test data with variable
    Fields under CSV dataset config:
    1)Filename: This refers to the path to the CSV file which contains the test data
    2)File Encoding: The encoding technique by which you want to read the CSV file eg: UTF-8
    3)Variable Names: List your variable names(comma separated) to match the columns in the CSV file. You can keep this field empty if you want to use first line of CSV file as variable name
    4)Ignore First Line: Set this field to True if you want to ignore the first line of CSV file, else take the default value -False. It is used only if Variable Names is not empty
    5)Delimiter: ',' by default, you can set anything else too
    6)Allow Quoted Data: Set this field to True if you have double quotes in CSV columns, else take the default value -False
    7)Recycle on EOF: Set this field to True if you want JMeter to restart from the beginning when the End Of File is reached, else take the default value -False
    8)Stop Thread on EOF: Set this field to True if you want to stop the current thread if EOF is reached; else take the default value -False;
    9)Sharing Mode: It selects threads which share the same file pointer
    ==================================================================
    JMeter Tutorial Playlist:
    • JMeter Tutorial
    Git and GitHub Tutorial Playlist:
    • Git and GitHub Tutorial
    Automation Anywhere Tutorial Playlist:
    • Automation Anywhere A1...
    UiPath Tutorial Playlist:
    • UiPath Tutorial
    Subscribe for more tutorials - / @qualityassurancelab7764

Комментарии • 62

  • @farazshaikh3654
    @farazshaikh3654 3 года назад +1

    Hi 🙋‍♂️
    All videos are very helpful and easy to understand.
    My question is how can we fetch data from csv file for POST request ?
    Awaiting for your reply
    Thanks 😊

  • @vnecksurferdude7041
    @vnecksurferdude7041 3 года назад +1

    wow, the Sharing Mode drop down options...thanks for explaining them. Now I COmPLEtelY understand it all.

    • @3VAudioVideo
      @3VAudioVideo 3 года назад

      Blazemeter has an excellent blog explaining this. Don't be so hard on the instructor here, as she is only going over the basic just to get you started. Otherwise this video would last for hours in order to go over ever little detail.

  • @AmitKumar-c4x2s
    @AmitKumar-c4x2s 2 месяца назад

    Wonderful session .....Is there any online batch currently running for Jmeter? Please provide the contact info

  • @modernlifemanager7146
    @modernlifemanager7146 6 месяцев назад

    Hello Please help me with query.
    What would be the possible failure reason for a script if the environment gets changed for example from UAT env to pre-production environment.

  • @BrijeshKumar-gz3ec
    @BrijeshKumar-gz3ec 25 дней назад

    Hello
    Jmeter does load and performance testing. The config file is also there but it is only verify the content.
    Who verifies or also checks the performance? or uploaded the file and verified its final result for testing purpose what should be done please make sure all the final result and html report is also clear all. Make the fully and concise report with purpose and all..

  • @mrinal2906
    @mrinal2906 2 месяца назад

    Hi, In search sampler, Path is - /wiki/jmeter. But when you created record video tutorial(video 03), Path was - /search-redirect.php. Again in video 8 , path becomes - /search-redirect.php. How ma'am?

  • @ankitapatel808
    @ankitapatel808 3 года назад +2

    Hi Mam
    Your're really explaining worthy and helpful, appreciated thanks

    • @qualityassurancelab7764
      @qualityassurancelab7764  3 года назад +1

      Thank you so much!

    • @ankitapatel808
      @ankitapatel808 3 года назад +1

      Ma'am me beanshell script bana rahi hoon CSV me data write krne k liye single record k liye ho gaya ab is me muje loop use krna he ki jitni bar request pass ho utni bar diff row me CSV me write kre... Please guide🙏
      Thanks in advance

    • @sk15aug
      @sk15aug 5 месяцев назад

      @@qualityassurancelab7764 In CSV file data, can we run these data parallely by putting nos of thread in thread group. For example, if there is 3 values in CSV file and if we pass nof of thread 3 in thread group, then will ittake and execute 3 data of csv file parallely ?

  • @jayeshmahadik9828
    @jayeshmahadik9828 3 года назад +2

    Hi Mam, PLease explain Sharing Mode in detail.what is the purpose of different option provided in sharing mode

    • @vnecksurferdude7041
      @vnecksurferdude7041 3 года назад

      you can go to Blazmeter webpage and they do an excellent job explaining it. I agree, she did not explain anything about it at all here but just read the options for us. useless

    • @3VAudioVideo
      @3VAudioVideo 3 года назад

      @@vnecksurferdude7041 That's what I said about Blazmemter's page.

  • @uzairsiddiqui6660
    @uzairsiddiqui6660 4 года назад +2

    Hi, Thanks alot for this video, I have one question, How can give the image parameter (attributes) in Body Data Like Firstname, Lastname, Profile_image Field for the Post Query in HTTP Request.

    • @hafizuzairhasan2115
      @hafizuzairhasan2115 4 года назад +1

      Mam, Waiting for your reply.

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад +1

      Hi, you are welcome and apologies for late response.
      Checkout this video to work with POST query - ruclips.net/video/fUxLWHZKvmg/видео.html

    • @uzairsiddiqui6660
      @uzairsiddiqui6660 4 года назад

      Quality Assurance Lab mam I watched this video but my question is how to give image file attribute to body data. I want to give path from local directory.

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад +1

      @@uzairsiddiqui6660 Hi, please follow the below steps In HTTP Request Sampler to upload image file:
      Step 1: Select the Method as POST
      Step 2: Check the box - "Use multipart/form-data for POST"
      Step 3: Move to Files Upload ,click on Add and provide below details:
      File Path - Provide the complete path of the Image file
      Parameter Name - Provide relevant form of “file” type name, eg. imageFile
      MIME Type - Provide File's Internet media type. For eg.
      For GIF image
      , MIME Type is: image/gif
      For JPEG JFIF image, MIME Type is: image/jpeg
      Please let me know for any further query.

  • @3VAudioVideo
    @3VAudioVideo 3 года назад

    For the "Send Parameters With the Request" section/table, for me if I replace "Value" columns with junk values, but not delete the "Jmeter" in the "Path" field (where it is "/wiki/Jmeter") as you mention at around 5:10, then the execution still takes me to the correct web page. So is my test still valid like this - meaning will my response time still be accurate and resemble how an actual person submits the request? Also, if i do delete "JMeter" in the path, the response also returns the JMeter page (as long as the "search" parameter is "JMeter". But if I also leave the other parameters as junk, it will still work. so this is confusing).

  • @kotamyogeswarreddy5165
    @kotamyogeswarreddy5165 2 года назад

    very clear explanation.Tq so much mam...

  • @parshavcollection6351
    @parshavcollection6351 Год назад

    if you want to read random data from csv file. what to do?

  • @hiteshkumar2356
    @hiteshkumar2356 Год назад

    I have an entry as "Asia,America" in CSV file and set the Jmeter csv config with delimeter with , and Allow quoted Data True, still getting the error in execution

  • @hiteshkumar2356
    @hiteshkumar2356 Год назад

    thanks for knowledge sharing videos. video quality is not so good (720p). please update them with atleast 1080p.

  • @Jagdeesh_mimicry
    @Jagdeesh_mimicry 2 года назад

    if we have multiple hard coated values in our script what will approac?

  • @nealkaffrey2384
    @nealkaffrey2384 3 года назад

    Hello
    I have seached North America and I got the error in Jmeter. But when I searched North_America test script passed. (I search North America in Wikipedia Then modified the CSV file as north_america). why jemeter do not search north america? and to we can add ' _ ' in searching

  • @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
    For example for string data we pass [" ${username}"] in Body data tab for string values.

  • @markjon578
    @markjon578 2 года назад

    hi mam iam sravan i have a query about jmeter every time am going to command prompt i can give the path of my result folder my cmd promt showing error like there is no file external or internal

    • @hiteshkumar2356
      @hiteshkumar2356 Год назад

      Bro you have to set the jmeter path.
      Go to System Advance setting, environment varable >system variable>click on path and edit it > select new > and add the path of jemeter bin folder here and save
      close the CLI and reopen it

  • @Ravikumar-yp8rm
    @Ravikumar-yp8rm 2 года назад

    Thank you... very nice video

  • @SazidAhmedNassir
    @SazidAhmedNassir Год назад

    How to generate html report using Csv dataset in jemter ? Can you please tell me?

    • @hiteshkumar2356
      @hiteshkumar2356 Год назад

      if you already have csv output then you can use this command in CLI to generate the html report.
      jmeter -g -o
      thanks!

  • @behumanf1rst
    @behumanf1rst 4 года назад +1

    I have post operations with different payloads each time, how do I config to have multiple payloads to invoke same API?
    url: abc.com/testdata
    operation: POST
    payload1: {"k1":"Have more data here"}
    payload2: {"k1":"Have further more data"}

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад +1

      Hi, please follow the below steps:
      Step 1: Add multiple payloads - "Have more data here", "Have further more data" etc under the csv file.
      Step 2: Add CSV dataset config for the HTTP request and provide necessary field details. Let's say that Variable Names field is PayloadVar
      Step 3: Put the payload under Body Data as "k1":${PayloadVar}, where PayloadVar is a variable created in step 2
      For any detail to work on APIs(SOAP and REST) in Jmeter, please refer - ruclips.net/video/fUxLWHZKvmg/видео.html

    • @Akfan78
      @Akfan78 4 года назад

      @@qualityassurancelab7764 What if the payload spans thousand of rows and not feasible to be copied in the csv?

  • @SwetaTamrakar-z4f
    @SwetaTamrakar-z4f Месяц назад

    how to extract json data(response body) from one field of excel

  • @anmoldhiman1954
    @anmoldhiman1954 3 года назад

    hi there, i am not able to get send parameters with the the request in searchinwikipedia even after creating video and all , which make me difficult to understand the video please help.

  • @Ganesh.Vaka_9492
    @Ganesh.Vaka_9492 2 года назад

    Hi,
    We need complere explanation for the paramitrization of the sharing modes of all threads, current thread group, current thread

  • @PankajSingh-bt9hj
    @PankajSingh-bt9hj 3 года назад

    Made my day

  • @LoveUPes
    @LoveUPes 4 года назад +2

    please work the volume. in some videos the volume is high in some videos the volume is so low

  • @teja_lingamsetti
    @teja_lingamsetti 4 года назад +1

    Hie...Can you pls explain parameterization with set of username and password. I mean how to pass username and password into fields via jmeter...awaiting for your help...Thanks!

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад

      Hi, parameterization for username and password will be same as I did for Continent in the video. Please let me know if you face any issue.

    • @Akfan78
      @Akfan78 4 года назад

      @@qualityassurancelab7764 Is there a way to protect these passwords from being visible? I do not want to expose the text of password like how it is displayed as Asia, or Europe in your case. Could you pls help?

    • @vnecksurferdude7041
      @vnecksurferdude7041 3 года назад

      @@Akfan78 lock up your computers every time you walk away from it.

  • @shriprasadgujare8639
    @shriprasadgujare8639 3 года назад

    how to get particular data from csv? in case you don't want to iterate over all the data.

    • @kapiljain7325
      @kapiljain7325 3 года назад

      You can control the data iterations

  • @shirishachippagiri543
    @shirishachippagiri543 3 года назад

    pass test data from one csv file to multiple http requests like first row should take by 1st http sample and second row should take by 2nd http sample.Please help how to use this in jmeter

    • @3VAudioVideo
      @3VAudioVideo 3 года назад

      Do a google search for "Blazemeter CSV Data Set Config in Sharing Mode - Made Easy" Blazementer explained this is detail.

  • @engineers-blog
    @engineers-blog 4 года назад +1

    I need help backend-service/v1/create/version1/xyz/900 , how will pass dynamic data from csv file now its 900, plz reply.

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад +1

      Do you have multiple values in CSV file(like 900) which you wish to pass to this url?
      If yes, you can pass the value in url as - backend-service/v1/create/version1/xyz/${NumberVariable}

    • @engineers-blog
      @engineers-blog 4 года назад +1

      @@qualityassurancelab7764 , NumberVariable , need to pass in parameter, can u give me one example.

    • @qualityassurancelab7764
      @qualityassurancelab7764  4 года назад

      @@engineers-blog Let's say that your variable name is NumberVariable. Then, you will pass it as ${NumberVariable}

  • @jacki546
    @jacki546 5 лет назад

    Hi I have a doubt on jmeter . can you help me

    • @qualityassurancelab7764
      @qualityassurancelab7764  5 лет назад

      Sure..I will try.

    • @jacki546
      @jacki546 5 лет назад +1

      @@qualityassurancelab7764can you please share the mail or contact number so that I can report my issue

  • @saurankukitchen3087
    @saurankukitchen3087 6 месяцев назад

    Getting error.

  • @rajasekharmaddigalla1463
    @rajasekharmaddigalla1463 7 месяцев назад

    Wow with my like it reached 500

  • @ВикторияВласюк-б3ш
    @ВикторияВласюк-б3ш 4 года назад

    В консоли может быть ошибка An error occurred: Unknown arg: errorlevel=1 .Jmeter не нравится пробелы

  • @yogesh6541
    @yogesh6541 2 года назад

    Always take new stuff for every video don't keep as it is of last session..it is difficult to understand for new viewers