Assert File Download
  • 07 Jan 2025
  • 4 Minutes to read
  • Contributors
  • Dark
    Light

Assert File Download

  • Dark
    Light

Article summary

Note
This feature is available on certain plans.

Overview

The Assert File Download feature allows you to check the following four points:

  1. Confirm that a file has been downloaded
  2. Confirm the file name
  3. Verify that the file size is the expected size
  4. Verify that the file is an exact match
Notes
  • 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

  1. 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.
  2. To use the file download assertion function, you need to configure it before recording.
    1. Open any Autify NoCode Web scenario in your browser.
    2. Click on the “Autify Recorder (New)” extension icon at the top of your browser.
    3. Tick Allow Autify Recorder to manage your downloads.
    4. A dialog will appear asking for additional permissions to Manage your download. Select Allow.
      1. You only need to allow it once, the settings will be preserved unless you change it.

document_file_download_assertion_setting_1_en.png

document_file_download_assertion_setting_2_en.png

Autify Recorder is now ready for using this feature! Let's get started with recording.

How to record a new Assert file download step

  1. 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
  2. Download the target file
  3. Autify Recorder will automatically detect the download and the following window will appear
    file_download_assertion_recording_0_en.png
  4. Clicking the Choose file button will launch your system default file explorer (e.g. Finder). Find and select the target file and press the Open button.
    file_download_assertion_recording_1_en.png
  5. The selected file's information will be displayed. Click Save Assertion to add the step.
    file_download_assertion_recording_2_en.png
  6. Complete recording and save the scenario.
  7. The Assert file download step is added to your scenario (step 10 in the figure below).
    filedownloadassertion_scenario_en.png

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

  1. On the scenario editor, click Insert Step where you want to insert the Assert file download step. Next, click Assert File Download Step.
  2. For details on how to set up each assertion, see Configure Each Assertion.
    Screenshot 2024-12-17 at 17.55.34.png

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.

  1. Assert whether the file has been successfully downloaded or not.

  2. Assert if the file name is correct.

    1. 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.
    2. exe and msi files cannot be asserted.
    3. File names cannot be blank or spaces.
  3. Assert if the file is of the expected size.

    1. You can specify a range.
    2. If you want to specify an exact match for the file size, tick the Use exact file size checkbox and specify the exact size.
    3. You can verify that the size of the downloaded file is between 0.000kB - 102400.000kB (up to 3 decimal places).
  4. Assert exact match.

    1. 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.
    2. If the file to be downloaded changes each time, untick this assertion.
  5. 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.

filedownloadassertion_scenario_edit_en_2.png

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.

result_fda.png

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.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.