feat(cypress): upload failure screenshots#8574
Conversation
|
Overall package sizeSelf size: 5.85 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
BenchmarksBenchmark execution time: 2026-05-20 15:07:46 Comparing candidate commit 216f16d in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 1485 metrics, 108 unstable metrics. |
5774881 to
fed2648
Compare
fed2648 to
48b752b
Compare
|
closing, as this was just a prototype |
What does this PR do?
Adds Cypress failure screenshot discovery and upload support for CI Visibility. When a Cypress test attempt fails and Cypress generated a screenshot, the plugin uploads the raw image bytes to
/api/unstable/ci/test-runs/{trace_id}/media, using the failed test span decimaltrace_idas the path key.For this PoC, screenshots are uploaded whenever they are present. The media API host is selected with
DD_POC_SITE, for exampleDD_POC_SITE=us1.staging.dogresolves tohttps://api.us1.staging.dog. The mock CI Visibility intake still uses the test URL override for integration coverage.Motivation
Cypress already captures screenshots for failed runs. CI Visibility can use those screenshots as failure media artifacts, associated by trace id with the failing test event.
Additional Notes
Validation run:
CYPRESS_VERSION=14.5.4 CYPRESS_MODULE_TYPE=commonJS ./node_modules/.bin/mocha --timeout 900000 integration-tests/cypress/cypress-reporting.spec.js --grep "uploads screenshots"CYPRESS_VERSION=14.5.4 CYPRESS_MODULE_TYPE=esm ./node_modules/.bin/mocha --timeout 900000 integration-tests/cypress/cypress-reporting.spec.js --grep "uploads screenshots"eslinton changed filesgit diff --checkThe commit is signed.