Support attaching URLs to link to other content
- Dominant language
- No language data
- Stars
- 3.4k
- Forks
- 679
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
In Cucumber, attachments work by providing the attachment content to Cucumber which then includes it in the messages.
But sometimes you might just want to _link_ to content that exists elsewhere but is relevant to this test case/step. Maybe it's a dump of logs, or some screenshots, or something else - anything addressable by a URL. Currently there's no way to do this. The schema for attachments has a `url` field, but this is intended for externalising regular attachments as a post-processing step (as done in https://github.com/cucumber/html-formatter/issues/281) rather than linking to already-external content.
## Proposal
We can use the [existing sort-of-standard MIME type](https://www.iana.org/assignments/media-types/text/uri-list) `text/uri-list` for this. The idea is to:
- Provide a `link` function in Cucumber implementations that acts as a shorthand for attaching a URL with the above MIME type
- In formatters - particularly the HTML formatter - render those attachments as a simple link
This is a similar approach to what we've done before with `log`.
Contributor guide
Assessment
This issue has not been assessed yet.