Skip to content

feat: Add 'slowTestThreshold' and fix this.slow() inside specs#18496

Merged
chrisbreiding merged 22 commits intodevelopfrom
issue-447-configure-slow-test-threshold
Oct 25, 2021
Merged

feat: Add 'slowTestThreshold' and fix this.slow() inside specs#18496
chrisbreiding merged 22 commits intodevelopfrom
issue-447-configure-slow-test-threshold

Conversation

@BlueWinds
Copy link
Copy Markdown
Contributor

@BlueWinds BlueWinds commented Oct 14, 2021

User facing changelog

  • Adds slowTestThreshold config option to customize slow test threshold.
  • Changes the default slow test threshold from 75ms (mocha's default) to 10000ms for e2e tests and 250ms for component tests. To restore the old behavior, you can add "slowTestThreshold": 75 to your cypress configuration.

Additional details

A test that executes for longer than the slowTestThreshold time will be highlighted in yellow with the default spec reporter. This is a visual change only - slow tests still pass.

PR Tasks

@BlueWinds BlueWinds requested a review from a team as a code owner October 14, 2021 17:28
@BlueWinds BlueWinds requested review from emilyrohrbough and removed request for a team October 14, 2021 17:28
@cypress-bot
Copy link
Copy Markdown
Contributor

cypress-bot Bot commented Oct 14, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link
Copy Markdown

cypress Bot commented Oct 14, 2021



Test summary

18560 0 214 7Flakiness 6


Run details

Project cypress
Status Passed
Commit 41a2d1a
Started Oct 25, 2021 6:05 PM
Ended Oct 25, 2021 6:21 PM
Duration 16:36 💡
OS Linux Debian - 10.9
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
commands/xhr_spec.js Flakiness
1 ... > no status when request isnt forced 404
cypress/proxy-logging-spec.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code
2 Proxy Logging > request logging > xhr log has response body/status code
This comment includes only the first 5 flaky tests. See all 6 flaky tests in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@jennifer-shehane
Copy link
Copy Markdown
Member

Before

Screen Shot 2021-10-14 at 1 22 12 PM

After

Screen Shot 2021-10-14 at 1 21 10 PM

@brian-mann brian-mann requested review from brian-mann and removed request for chrisbreiding and emilyrohrbough October 14, 2021 18:36
Comment thread cli/types/cypress.d.ts Outdated
Copy link
Copy Markdown
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're going to do a product review next week on this, so hold off on merging until then. I think it will be fine though.

Comment thread packages/server/lib/config.ts Outdated
Comment thread system-tests/projects/e2e/cypress/integration/slowTestThreshold_spec.js Outdated
Copy link
Copy Markdown
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some of the files from the unified branch made it into this PR - packages/app, packages/frontend-shared, etc.

@BlueWinds
Copy link
Copy Markdown
Contributor Author

Looks like some of the files from the unified branch made it into this PR - packages/app, packages/frontend-shared, etc.

Fixed. I've been having a weird issue where whenever I switch from unified-desktop-gui to a devlop-based branch, the unification work leaves behind a bunch of files. I usually manually remove them, but forgot this time (and then used git commit -a).

@jennifer-shehane
Copy link
Copy Markdown
Member

@BlueWinds I think this is due to the files being generated when you switch to unified - and being part of their .gitignore, but when switching back to develop, those generated files are still there but not part of develop's .gitignore. You could probably just add those files to the develop .gitignore so that you don't have to deal with this.

@chrisbreiding chrisbreiding merged commit 776b730 into develop Oct 25, 2021
@jennifer-shehane jennifer-shehane deleted the issue-447-configure-slow-test-threshold branch August 28, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cypress should set a mocha slow threshold for more reasonable reporting

4 participants