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.
Perform the following steps to upload files with your scripts:
Launch JMeter.
Add HTTP(S) Test Script Recorder by navigating to WorkBench | Add | Non-Test Elements | HTTP Mirror Server and configure it appropriately.
Start the HTTP(S) Test Script Recorder.
Point your browser to http://angular-file-upload.appspot.com/.
Click on the Choose File button to choose a single text file.
Choose a file to upload.
Stop the script recorder.
Add the View...