The mabl Trainer supports file upload steps, allowing you to test applications that involve uploads exactly as an end user would do. This guide outlines how to record a file upload step in the Trainer, where to manage file uploads for your mabl workspace, and some frequently asked questions.
To get started, open the mabl Trainer and navigate to the page in your application where the file upload step needs to occur. Make sure the Rec button is on.
- Click on the "File upload"/"Choose file" button in your application.
- When the system dialogue appears, select the file you would like to upload from your computer.
- Click Open. The Trainer will automatically record a step that sets the file input:
Set file input to "<name-of-file>".
- Record the action to submit the file upload in your application. (For example, click on the submit button.)
- Create an assertion to confirm the upload was successful. (This assertion will depend on what happens in the application after a successful file upload.)
Recorded click step may be unnecessary
In most cases, mabl needs to interact with a file-type input element. When you record a file upload step, mabl will record a click step to open the system dialog. This step is not necessary for replaying the test in the mabl Trainer or for running the test in the cloud, and it can be deleted.
To update the file input, click on the pencil icon next to the recorded file upload step. You can choose a new file input from the dropdown.
If you want to use a new file input that has not been uploaded in the mabl application, delete the existing file upload step and record a new upload step with new file input.
In order to view and manage the files that have been uploaded to tests in your workspace, you can visit the File uploads tab of the Configurations menubar.
By default, file uploads are supported up to 15 megabytes.
Early access for large file uploads
Support for large file uploads up to 100 MB is currently available as an early access program. To enable this feature, toggle on "Enable Large File Uploads" in the Labs page:
Settings > Labs. Uploading a file greater than 15MB requires the ability to connect to Google Cloud Storage.
Prior to general availability, functionality is subject to change. We highly encourage early access participants to share feedback with their customer success manager or in the mabl Product Portal.
Yes, when you edit a test that contains a file upload step in the mabl Trainer, the Trainer downloads the file to your local computer. Then, during replay, the Trainer accesses that file to complete the upload replay steps.
Mabl cannot interact with the dialog box for selecting file input during Trainer replay or local test runs. This dialog box is part of the operating system, not the browser, and it can only be dismissed manually.
No, this functionality is not currently supported.
No, mabl is not able to pick up multiple files selected simultaneously as of now. You need to select the files one at a time to ensure that they are properly selected.
Use the delete icon to delete file upload steps from the mabl Trainer and the File Uploads page.
Deleting files from the File Uploads page
- If a file is used in tests, the delete button will be disabled on the File Uploads page. You cannot delete a file that is used in a test.
- If you see a icon next to the file, you should confirm that the file isn't used in any tests or flows before deleting. (See more information on this in the next question.)
If you see a icon next to a file on the File Uploads page, it means that mabl could not determine whether the file was referenced in a test or flow. If you delete a file that is still referenced in a test or flow, you will not be able to open the test in the mabl Trainer, and the step will fail when run locally or in the cloud. If you are unable to open a test because of a deleted file input, contact mabl support.
When you record a file upload, mabl automatically captures the file and stores it in the mabl cloud. We need to store these uploads for later test runs so that mabl will be able to perform these uploads during tests.
Yes. After training the tests, the file uploads page will show you which test a particular file upload belongs to even if they share the same file name.
File uploads are available in all supported browsers.
Yes, mabl automatically captures the files used during training and stores them in your workspace-encrypted bucket for use while running tests. You can read more about encryption details here.
File uploads remain in the mabl cloud until you choose to delete them.
Updated about 2 months ago