Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions content/en/tests/setup/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@ For more information about custom measures, see the [Add Custom Measures Guide][

If the browser application being tested is instrumented using [Browser Monitoring][6], the Cypress test results and their generated RUM browser sessions and session replays are automatically linked. For more information, see the [Instrumenting your browser tests with RUM guide][7].

### Upload test failure screenshots

When enabled, Test Optimization uploads screenshots that Cypress captures when a test fails. They appear in the {{< ui >}}Media{{< /ui >}} tab of the Test Optimization test details side panel. Use them to inspect browser state at the time of failure.

{{< img src="continuous_integration/tests/setup/cypress-failure-screenshot-media-tab.png" alt="A Cypress failure screenshot displayed in the Media tab of the Test Optimization test details side panel." style="width:100%;" >}}

To enable screenshot uploads, set the `DD_TEST_FAILURE_SCREENSHOTS_ENABLED=1` environment variable. In your Cypress configuration, set [`screenshotOnRunFailure`][8] to `true`.
Comment thread
juan-fernandez marked this conversation as resolved.
Outdated

[1]: https://docs.cypress.io/guides/tooling/plugins-guide#Using-a-plugin
[2]: https://docs.cypress.io/api/plugins/after-run-api
Expand All @@ -410,6 +417,7 @@ If the browser application being tested is instrumented using [Browser Monitorin
[5]: /tests/guides/add_custom_measures/?tab=javascripttypescript
[6]: /real_user_monitoring/application_monitoring/browser/setup/
[7]: /continuous_integration/guides/rum_integration/
[8]: https://docs.cypress.io/app/references/configuration#Screenshots
{{% /tab %}}

{{% tab "Vitest" %}}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading