Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sometimes it is necessary to parameterize dynamic file upload. The recorded request typically will be a multipart post request where one of the fields has a value containing the file content. For example, the request will look like this

Info

-----------------------------3e04d523481038

Content-Disposition: form-data; name="submittedfile"; filename="recorded.pdf"

Content-Type: application/pdf 

%PDF-1.7

%����

7052 0 obj  

The field "submittedfile" here represents the recoded content of the file. In the course of load testing, you want to replace this content with dynamically selected files with the content of the files available locally on the load testing machine. To do so, create a dataset with a field for storing the paths of such files. Then parameterize the multipart request by replacing the field's value of the field with the recoded file content (in this case, "submittedfile" field) with the dataset.

In order to To parameterize the field with file content, the dataset column data must store the file path.

...