We’re happy to share that visual assertions for file downloads are now generally available to all customers and trial users! With visual assertions, you can validate the content of files downloaded from your web app to ensure they are accurate, compliant, and correctly formatted.
Name change
Visual download assertions were formerly known as GenAI download assertions.
Supported file types
The following file types are supported for visual assertions on file downloads:
| Category | File types |
|---|---|
| Documents | PDF, plain text (.txt) |
| Spreadsheets | Excel (.xlsx, .xls), CSV (.csv) |
| Images | PNG, JPEG, WebP |
| Video | MP4, MPEG, WebM, QuickTime (.mov), FLV, WMV, 3GPP |
| Audio | MP3, WAV, OGG, FLAC, AAC, M4A, PCM |
| Data files | JSON, XML, log files (.log) files. Binary data is not supported. |
Try it out
To add an assertion on downloaded file contents, take the following steps:
- Open your web app in the mabl Trainer.
- With the record button on, initiate the file download in your application. If you don’t have a convenient example to test in your app, try the examples in the mabl Sandbox: https://sandbox.mabl.com/downloads-pdfs instead.
- When the download completes, the Trainer automatically adds a download assertion step. Click on Edit assertions to add a visual assertion on the content of the downloaded file:
- Provide a natural language prompt that describes what you would like to validate. If you need to review the file contents, click on View file.
- When you are ready to check your assertion, click on Test assertion.
- Click OK to save the assertion.
When the test runs in the cloud, you can review the results of the visual assertion in the mabl Activity tab of the test output logs for a given step
Execution and usage
During training, visual assertions are unlimited so that you can iterate on your assertion as much as you need. When executing tests, however, keep in mind the following:
- Visual assertions, including visual download assertions, are limited to 30 per test.
- Cloud runs that include visual assertions consume an additional half credit.
- Visual assertions will fail when run within the context of a performance test.
Learn more
To learn more about validating downloaded files, check out the docs.