Attachments
Attachments are a great way to enrich the test case scenario so that the tester better understands what to do and what to expect at each step. With Allure TestOps, you can attach various types of files to a specific step.
To add an attachment to a test case step:
- Open the step menu.
- Select an action in the Add attachment section:
- Files — upload one or more files from your device. In the upload dialog, you can specify the title and media type for each file.
- Table — create a table of arbitrary size and fill it with data. This is equivalent to uploading a CSV or TSV data file.
- Text — enter arbitrary data and specify its media type, which defaults to plain text. This is equivalent to uploading a file with the same media type and content.
In the web interface, Allure TestOps provides both a download link for the attachment and a preview for supported media types.
Adding attachments is also available in the test results during the execution of test case steps.
Screenshots
Supported media types: image/bmp
, image/gif
, image/jpeg
, image/png
, image/svg+xml
, image/tiff
, image/*
.
Whenever running a test case involves interacting with a graphical interface (whether it is a desktop app, a mobile app, or a website), attaching screenshots to a step can help the tester visually confirm whether the website or app has loaded properly.
Note that in some situations, it may be even more informative to attach a video.
Videos
Supported media types: video/mp4
, video/ogg
, video/webm
.
Attaching a video to a test case step serves a similar purpose to attaching a screenshot. It helps to better understand how the system is expected to respond to user input.
In the web interface, click the attached video to play it in the browser.
Text
Supported media types: text/html
, text/plain
, text/*
.
Attaching text is useful when you need to provide the tester with a long value to compare with something they observe during the test, such as webpage content.
Alternatively, use the Text command to input text directly in the web interface.
Allure TestOps supports two types of text attachments: plain text and formatted text. Formatted text allows the use of a limited subset of HTML tags.
Tables
Supported media types: text/csv
, text/tab-separated-values
.
You can present arbitrary data as tables in Allure TestOps. To do this, format the data as comma-separated values (CSV) or tab-separated values (TSV) and attach it to the step. The table will be displayed on the test case page, without needing to download and open the file.
Alternatively, use the Table command to create a table in the web interface.
URI lists
Supported media types: text/uri-list
.
Attach a URI list if you want the tester to visit multiple links, e.g., to check several pages of a website.
The URI list format is one URI per line. Allure TestOps will make each link clickable in the web interface.
Documents
Supported media types: text/xml
, application/xml
, application/json
, application/yaml
.
If you attach an XML, JSON, or YAML document to your test case and specify the corresponding media type, Allure TestOps will display the document with syntax highlighting.
Other files
Allure TestOps does not impose any restrictions on the types of files that can be attached to a test case, although it cannot generate previews for all file types. For unsupported formats, a Download link will be displayed instead of a preview.