Screenshot & video support
cbrunnkvist opened this issue · comments
Current behavior
For projects that do not yet use / cannot use the Cypress Dashboard, the current way to save test evidence TC is to register screenshots and videos as Build Artifacts. This makes them discoverable from the Build page, but associating them with failing tests requires mentally mapping the filenames to the failing tests, which is a bit of a hassle.
Describe the solution you'd like
TC has built-in support for associating metadata with tests, including (since 2018) screenshots. It would be nice if we could hook into the screenshot event and emit the testMetadata type='image'
service message. A tangential and equally missing feature is artifacts in the first place: there should be an option to turn on "Automatically publish test evidence as artifacts" so that the user does not have to reinvent the proper Ant-style search pattern each time.
Describe alternatives you've considered
Doing this manually after-the-fact (i.e. after Cypress finished, find each media file and echo something) is near impossible because test by file names (suite, test, retries...) lose all case-information and has _
-replaced chars.
Additional context
Since videos are recorded one-per-suite, I do not think there is any way to make these easily included - apart from registering one and the same video for each test (could be better than nothing). There is no suite-level metadata in TC.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@cbrunnkvist i will try to take a look into this