Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to upload test replay only for failing test cases #28015

Closed
leroydev opened this issue Oct 10, 2023 · 5 comments
Closed

Being able to upload test replay only for failing test cases #28015

leroydev opened this issue Oct 10, 2023 · 5 comments
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature Test Replay type: feature New feature that does not currently exist

Comments

@leroydev
Copy link

leroydev commented Oct 10, 2023

What would you like?

I'd like to be able to configure Cypress test replays to only be uploaded when a test fails.
I couldn't find a way to accomplish this myself , after:spec does work for this in the case of videos but I haven't found a way to influence test replays in this way.

This might be a quick fix to alleviate #27818 partly, as we're also heavily impacted by that. I can however imagine that it's only possible to prevent test replay uploads (instead of also preventing creation) for succeeding testcases and the performance impact is mostly in the creation of test replays, so I'm not entirely sure whether this will help with the test replay performance impact.

Why is this needed?

Test replays aren't that interesting for tests that succeed.

@leroydev leroydev changed the title Only enabling test replay when a test fails Being able to configure test replay only for failing test cases Oct 10, 2023
@jennifer-shehane
Copy link
Member

@leroydev Can you share the Test Replay link where you’re seeing the slow performance? We’d like to prioritize a fix for that.

We plan to add some reporting on the time to upload Test Replays so everyone can see how much time that’s adding and we could also optimize it. For now, I do suspect it’s as you said, that the capturing for Test Replay is likely more of the slowdown than the upload time.

@leroydev
Copy link
Author

leroydev commented Oct 16, 2023

@jennifer-shehane My apologies, I just noticed you replied.
Run with test replay, takes 59:13: https://cloud.cypress.io/projects/pswr65/runs/931/overview?roarHideRunsWithDiffGroupsAndTags=1
Run without test replay on the same commit, takes 22:41: https://cloud.cypress.io/projects/pswr65/runs/933/overview?roarHideRunsWithDiffGroupsAndTags=1

@mattleonowicz
Copy link

Since videoUploadOnPasses property was removed from configuration, I suppose you're not willing to add something similar for replays. Is it possible to remove replays of successful tests before the uploading begins, like presented here?

@jennifer-shehane
Copy link
Member

In 13.6.0 we added logging of upload times for Test Replay so that users can see the time spent on upload. We're also intending to internally look at this data to make more informed decisions on next steps on how to handle uploads. There are other options like uploading in the background that could be considered.

@jennifer-shehane jennifer-shehane changed the title Being able to configure test replay only for failing test cases Being able to upload test replay only for failing test cases Nov 29, 2023
@jennifer-shehane jennifer-shehane added type: feature New feature that does not currently exist Test Replay labels Nov 29, 2023
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Dec 12, 2023

Hi everyone. We've looked at some of the upload timing that we've been seeing for Test Replay upload. The majority of uploads for Test Replay are happening under 300ms, with the slowest time (p99) being 4 seconds. Due to the upload of the Protocol not being a large amount of time spent and the fact that we've fixed A LOT of perf issues in v13 where we're often seeing those runs faster now, we are not considering adding this as a feature.

Please take a look at the upload time for your Test Replay and let us know if there's a long upload time that you think is an issue.

Terminal Output

Screenshot 2024-06-28 at 10 45 41 AM (1)

@jennifer-shehane jennifer-shehane added the stage: wontfix Cypress does not regard this as an issue or will not implement this feature label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: wontfix Cypress does not regard this as an issue or will not implement this feature Test Replay type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

3 participants