0
votes

Test 'download a file using Jmeter': On the web page, there is a button 'download' and clicking it downloads the file with .zip extension. When observed under Network tab of Developer tool (F12)>there are two requests: 1 is the application request which gives the response with link (aws-S3...) (if i copy paste this link, can download the zip file) and 2nd request shows the aws-S3..link. When need to perform this download performance testing with 100 users, how to configure in Jmeter. Please guide. below thing have been tried:

  1. Record a script>it records the first request (not the 2nd request of network tab as mentioned above)
  2. When run the script> this shows 200 code with response message as aws-S3..link
  3. Tried Save response to file listener> nothing has been downloaded.
1

1 Answers

5
votes
  1. Extract the download link from 1st response using i.e. Regular Expression Extractor
  2. Add put the JMeter Variable generated by the Regular Expression Extractor into "Path" input of the HTTP Request 2
  3. Add Save Responses to a file listener as a child of the HTTP Request 2

    JMeter Download File

See Performance Testing: Upload and Download Scenarios with Apache JMeter article for more information on simulating file upload/download events in JMeter web tests.