O'Reilly logo

JMeter Cookbook by Bayo Erinle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dealing with file downloads

It is not uncommon to come across scenarios where you need to simulate downloading a file or multiple files from an external server when recording your test scripts. JMeter provides the ability to record and play back file downloads.

How to do it…

In this recipe, we will cover how to use JMeter in a file download scenario. Perform the following steps:

  1. Launch JMeter.
  2. Add Thread Group to the new test plan by navigating to Test Plan | Add | Threads (Users) | Thread Group.
  3. Add the HTTP Request sampler by navigating to Thread Group | Add | Sampler | HTTP Request.
  4. Fill in its attributes in the following way:
    • Server Name or IP: docs.spring.io
    • Method: GET
    • Path: /spring-data/jpa/docs/1.5.x/reference/pdf/spring-data-jpa-reference.pdf ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required