How can we help?

Tests with file uploads

You are here:

It is quite common to need file uploads in your tests. Some use cases:

  • You have a flow that requires one ore more file uploads in order to complete the test
  • You want to validate that only specific file types can be uploaded
  • Import data in your application from a file and test it

How to upload a file while creating a test

If you are creating a test using our chrome extension, there’s nothing you should do differently. Just select and upload the file as you would normally do when manually testing the flow. Trudon automatically saves the file for you and use it in the test run. Just make sure your file doesn’t exceed the 20MB limit.

In case you are creating a test without using the extension, there is a step type Upload file with two fields:

  • Selector – the CSS selector for the input file
  • File – the actual file to be used during the test

Troubleshooting with file uploads

Drag and drop file upload interfaces typically use a hidden file input element behind the scene. While Trudon can handle most common upload libraries, sometimes it cannot find the right input field when there is more than one hidden input file. When you encounter such a situation, please identify the correct input file field in your page, generate a selector for it and add the step manually in your test.

If a regular file input is not recorded in your test, you probably don’t have the right permissions for Trudon’s chrome extension. You just have to turn on the Allow access to file URLs. See the image below.


What happens to my files? We store them in the AWS secure cloud, using a private S3 bucket. When you execute a test, we will upload that exact file for you.

Are my files secure? Yes, Trudon automatically captures the files during test recording and stores them in your encrypted S3 private bucket on AWS.

Do file upload steps appear in the test results? Yes, with a screenshot highlighting the actual input file.

Can I select multiple files at the same time? Currently no. You need to select the files one at a time to ensure that they are correctly set, stored, and used in the test runs.

How large can my files be? Uploads are supported up to 20MB.

Can I use the same file name with different content in different tests? Yes! Files from one test don’t interfere with files from another test.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Need help?