File action

The File action provides a solution for transactions that require a file uploaded to a form.

This action is recorded when the Recorder sees an interaction with a file input element; however, it requires additional information after the script is recorded.

If the script has upload transactions, the target file must be hosted somewhere on the web where the Dynatrace test locations can access it, and the file's URL must be provided in the script.

File upload consists of the following values:

  • target – The target locator for this action must be a form input field of type file.
  • file URL – URL for the file, hosted by the customer.

File upload process

The agent downloads the file (the file upload time it does not affect the test response time) and the file is cached locally on each agent that runs the test. Future test runs from the same agent use the cached file. Each file is cached based on the SHA-1 sum of its URL and the file extension appended at the end.

The agent clicks on the file input element (the Browse button) and intercepts the Open dialog before it takes place. It then populates the file input with the bytes for the cached file.