Book Image

JMeter Cookbook

By : Bayo Erinle
Book Image

JMeter Cookbook

By: Bayo Erinle

Overview of this book

Table of Contents (16 chapters)
JMeter Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Uploading files with your scripts


Uploading files is a common functionality in web applications. Social networks, for example, encourage you to upload a profile picture when registering for an account. Attaching files to e-mails is also a fairly common routine task. Services such as Dropbox allow you to upload multiple files through their web and platform-native applications. JMeter allows you to test such applications by providing a mechanism to upload files as part of your test plan. In this recipe, we will cover how to upload files with JMeter.

How to do it…

Perform the following steps to upload files with your scripts:

  1. Launch JMeter.

  2. Add HTTP(S) Test Script Recorder by navigating to WorkBench | Add | Non-Test Elements | HTTP Mirror Server and configure it appropriately.

  3. Start the HTTP(S) Test Script Recorder.

  4. Point your browser to http://angular-file-upload.appspot.com/.

  5. Click on the Choose File button to choose a single text file.

  6. Choose a file to upload.

  7. Stop the script recorder.

  8. Add the View...