- Print
- DarkLight
Overview
The Assert File Download feature allows you to check the following four points:
- Confirm that a file has been downloaded
- Confirm the file name
- Verify that the file size is the expected size
- Verify that the file is an exact match
- Currently, it is not possible to make assertions on the file's content
- This feature is only available on environments that are not real mobile devices. When executed on a real mobile device, the
Assert file download
step will be skipped.
Now, let's see how to add an Assert file download
step!
Allow Autify Recorder to manage downloads
- This function is available in “Autify Recorder (New)” version 1.0.19 or higher. Please check the version of “Autify Recorder (New)” installed on your browser and update it if needed.
- To use the file download assertion function, you need to configure it before recording.
- Open any Autify NoCode Web scenario in your browser.
- Click on the “Autify Recorder (New)” extension icon at the top of your browser.
- Tick
Allow Autify Recorder to manage your downloads
. - A dialog will appear asking for additional permissions to
Manage your download
. SelectAllow
.- You only need to allow it once, the settings will be preserved unless you change it.
Autify Recorder is now ready for using this feature! Let's get started with recording.
How to record a new Assert file download
step
- Start a new recording session for a new scenario or an existing scenario and operate the website to the point where you want to download a file
- Download the target file
- Autify Recorder will automatically detect the download and the following window will appear
- Clicking the
Choose file
button will launch your system default file explorer (e.g. Finder). Find and select the target file and press theOpen
button.
- The selected file's information will be displayed. Click
Save Assertion
to add the step.
- Complete recording and save the scenario.
- The
Assert file download
step is added to your scenario (step 10 in the figure below).
For details on how to set up and modify each assertion, see Configure Each Assertion.
How to add (or edit) an Assert file download
step from the scenario editor
- On the scenario editor, click
Insert Step
where you want to insert theAssert file download
step. Next, clickAssert File Download Step
. - For details on how to set up each assertion, see Configure Each Assertion.
Configure each assertion
By default, the Assert file download
function will assert all of the following four points but you can also select which ones to assert.
Assert whether the file has been successfully downloaded or not.
Assert if the file name is correct.
- You can use the wildcard “*” to match a string of zero or more characters.
For example, if you specify “hatty*.pdf”, the filename “hatty_20241211.pdf” is a pass.
If “*.pdf” is specified, any filename is a pass as long as the file format is pdf. - exe and msi files cannot be asserted.
- File names cannot be blank or spaces.
- You can use the wildcard “*” to match a string of zero or more characters.
Assert if the file is of the expected size.
- You can specify a range.
- If you want to specify an exact match for the file size, tick the
Use exact file size
checkbox and specify the exact size. - You can verify that the size of the downloaded file is between 0.000kB - 102400.000kB (up to 3 decimal places).
Assert exact match.
- Use the data integrity and file uniqueness functions (MD5 hash values) to determine if the downloaded files have not been tampered with and if they match the files specified during scenario creation.
- If the file to be downloaded changes each time, untick this assertion.
You can change the file to be asserted by clicking the
Upload File
button. If you change the file, the expected name and size of the file will be overwritten with the new values.
Limitations
- Maximum file size is 100MB per file.
- Maximum total file size is 1GB per scenario.
Understanding the file download assertion step results
Let's look at the downloaded file in the Test Result Details page!
In blue, you can see the file name.
The results of the four assertions are displayed on the right side.
If the file is not downloaded after 30 seconds, only the first assertion ("Assert file download") is performed.
Is the downloaded file saved?
If you have not enabled the file download feature
No, downloaded files will not be saved anywhere.
The downloaded files are temporarily saved in the test environment while the test is running. However, a new test environment is created at every test run and is deleted once the test is complete. Any downloaded file will be deleted at that time.
If you have enabled the file download feature
The downloaded files are stored on Amazon S3.
The downloaded files are stored for 30 days. After 30 days, the files will no longer be accessible from test results, regardless of the test result retention period of your plan.