Testing File Download time and size

Hi,

I would like to test File download time and size from different geo locations to ensure the download time is not too high. What is the best way of doing it - The file sizes range in size from 100 MB to 1.8 GB.
Is Synthetic Browser appropriate for this or Synthetic API?

Currently, i am trying the below but it’s erroring out with - unknown error.
Also, i got spawnSync ETIMEDOUT sometimes.

Below is a sample.

$browser.get(‘http://www.google.com’)
var request = require(‘request’);
request(‘HTTP_FILE_GREATER_THAN_100MB’, function (error, response, body) {
if (!error && response.statusCode == 200) {
//console.log(body) // Show the HTML for the Google homepage.
console.log(‘Downloading file’)

}
})

Thanks,
Sd

Hi @de_sa. The issue you are going to run into is our script timeout of three minutes. The script must finish in that amount of time or it will fail.

Synthetics isn’t designed for large downloads like this. It is better served to test user interaction, and in this case that would be the process of downloading a file. You could simulate that with a smaller file, but that does not sound like what you would like to test.

I would also keep in mind that the downloads speeds for the end user are often out of your control.

Hello, I still have Qs regarding this topic:

What is the best way of doing it? Seems Scriptted browser is not the right one due to the fact of the 3 min timeout… so… can we use Simple Browser instead? or is there any type of large file download test we can run using New Relic?

Thx

@juan.p.zepeda.guevar - Scripted Browser would be the best option - Simple Browser has a page load timeout of 60 seconds which is not configurable.

New Relic doesn’t have a built in method for large file download testing - that’s not necessarily the goal of Synthetics, but you may be able to get that with a Scripted Browser monitor.

if I choose scripted browser then the script execution time should not be more than 3 minutes … is this correct?

Yes @juan.p.zepeda.guevar - that’s the maximum time your script should run for.