0
votes

Not able to download the file (from aws s3 bucket) using Jmeter 3.1.

We have scenario where when requested download api>response shows aws s3 bucket link (very lengthy link with signatures and all)> if copy paste this link in a browser>able to download load .zip file. To achieve the same thing in Jmeter followed below steps: 1. Run HTTP GET request for download api 2. Capture the response which has url of s3 bucket 3. Pass this url to next HTTP request and add save response to a file listener for this request>add view results tree 4. Getting an error as:

<?xml version="1.0" encoding="UTF-8"?>

SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.ASyyPZJxxxEBAGET

Whereas if i manually copy the response s3 url and paste it on any browser without any authenticaion/auth it is getting downloaded.

Please guide.

2

2 Answers

1
votes

You most probably are not passing the token that allows ypu to download the file.

See :

You can use Jmeter Header Manager config element to pass headers

Compare or record what is sent by browser to see what differs

1
votes

Most likely your "capture response URL" step fails as given the same URL (and request parameters, headers, cookies, etc.) JMeter and browser should provide the same result.

I would recommend doing the following:

  1. Add Debug Sampler and View Results Tree listener to your Test Plan and try to use in browser the URL you see in the View Results Tree listener. It might be the case your extractor fails and i.e. results a partial URL
  2. Compare 2 requests (coming from JMeter and browser) with a sniffer tool like Fiddler or Wireshark - this way you will be able to tell for sure what are the differences