Download and save files in JMeter
Is there an开发者_如何学Pythony way to configure in JMeter to save the files coming from a response?
In the dialog box, choose 'save file'?I have been struggling with issue for a week and finally got the solution.
You need to add a Listener "Save response to a file" with that request only that fetches file and then give a location where u want to save the file.
Jmeter saves 2 files one contains response Result and other is the original file.
File format is same as what is fetched from database well in my case the file name that is saved by jmeter on the location is "TEXTFILE_1.octet-stream".
Rename this file to original format like file.jpg or whatever is the format.
You will get the original file and for checking the file integrity, data loss and data corruption, CRC check can be done for the file obtained from jmeter and file before upload - CRC value for the file should be same.
Hope it helps.
To retrieve files from the server by clicking the "download" button in your app, in JMETER click the box "download embedded content" OR make your request point directly to the file you are trying to download. You may need to do a regex on the page to get the file location and then create a separate response just for the downloadable file.
Have you tried using Save Responses to File? If your sampler accesses the URL of the file you're trying to download, it should save the content. I haven't tried it myself, but dialog in this thread seems to indicate that it should work.
精彩评论