Get Knowledge from Video instead of Content:

Saturday 1 April 2017

File Download Scenario in LoadRunner


The content has been moved to PerfMatrix Site.

Link: https://www.perfmatrix.com/loadrunner-file-download-scenario/

Related Topic:

21 comments :

  1. Hi Gagan,

    I was asked one question during one of the interview regarding using output of on script as input for another script at the same time. can you please you me in solving this question?

    ReplyDelete
    Replies
    1. Hi Milind,

      One solution could be using file handling:
      1. Save (Write) output of Script A in a file
      2. Read and use in Script B as an input

      Make sure Script A and Script B has sufficient lag so that exception should not come.

      Delete
  2. Hi Gagan,

    How can we record the action of saving a downloaded file to a desired location in the system using AJAX Truclient or Web HTTP/HTML?

    I have tried doing it but observed following issues:

    1. Using HTTP/HTML- The save action was not recorded.
    2. The Truclient was not able to detect the window which opens to save the file in the system.

    Your help is appreciated.

    ReplyDelete
    Replies
    1. Hi Abdul,

      The basic concept of LR is "LR does not record client side activities", so you wont be able to record the pop-up.

      Secondly, you cant save the downloaded file, because LR captures the content in plain text format.

      Some points to be noted here:

      1. The file content is in plain text format and you cant retain the original file using those content.
      2. Saving the file to a local machine by opening "save as dialog", is a client side activity, which you cannot record it in Vugen.
      3. To record file download scenario you need to add above given code which shows the size and download time along with the response content you can see it in generation log.

      Delete
    2. Hi GaganDeep,
      How to calculate the file download time in truclient protocol

      Delete
    3. If you use TruClient-Web then above code should work.

      Delete
  3. Hi Gagandeep,

    Are you telling like with HTTP/HTML protocol, we are not able to record or even handle download/upload scenario?.

    If possible with HTTP/HTML protocol, then how can we manage this scenario, because it is not recording.

    ReplyDelete
    Replies
    1. I am telling you can not record file download/upload scenario (like browsing a file or path to save/upload the file) because it is client side activity, but you can handle it.

      If you read the post carefully then you will get the solution how we can manage this scenario.

      Delete
  4. Hi Gagandeep,

    I have tried your funtions, My file sizw is of only 14kb where as in script it is showing it as 50kb. could you tell me what would be the reason

    ReplyDelete
    Replies
    1. Along with file there are some informative content of the file which causes increase in the download size of the file. Actually this function calculates the transferred byte between server and client; not exactly the file.

      Delete
  5. Hi Gagandeep,

    I am getting below error while executing jmeter script from Linux machine.

    OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

    So, could you please help me on, how to and where(server side or jmeter side) to configure GC threads.

    Thanks,
    Babu Rao.

    ReplyDelete
    Replies
    1. Apologies, I did not face such issue so I do not have any idea on this.

      Delete
  6. Hi Gagandeep,

    I getting below error while executing the Jmeter test from linux environment with 20 users load.

    Error: Non HTTP response code: java.net.NoRouteToHostException/Non HTTP response message: Cannot assign requested address (Address not available).

    Could you please help me to resolve the above issue.

    Thanks In Advance,
    Babu Rao. B

    ReplyDelete
    Replies
    1. Did you check this solution?
      https://stackoverflow.com/questions/53189126/jmeter-java-net-noroutetohostexception-cannot-assign-requested-address-addre

      Delete
  7. Yes, I have modified the parameters as mentioned in the above solution. But, still i am getting issue with 20 Users load...I am able to execute the test with only 10 users without any issues.

    ReplyDelete
    Replies
    1. Hi Babu Rao,

      Could you please explain the issue?

      Delete
  8. Hi,

    I have designed API(Mail delivery) test like below.

    Load: 20 Users
    Ramp-up: 40 sec
    Duration: 3600 sec.
    Mail Content: 120kb
    Recipient: 1 eMail ID

    Command: jmeter -Jthreads=20 -Jrampup=40 -Jduration=3600 -n -t GA-API-LT-03-120k-withcompression.jmx -l Result_20U_1H.jtl

    When i execute the performance test from Unix environment with above design. Getting below error after 3 mins of execution.

    Error: Non HTTP response code: java.net.NoRouteToHostException/Non HTTP response message: Cannot assign requested address (Address not available).

    So, Please help to resolve the issue.

    Thanks,
    Babu Rao.B

    ReplyDelete
    Replies
    1. Please refer: https://stackoverflow.com/questions/53189126/jmeter-java-net-noroutetohostexception-cannot-assign-requested-address-addre

      Delete