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

Flaky specs #8293

Open
4 of 26 tasks
filipefurtad0 opened this issue Oct 6, 2021 · 0 comments
Open
4 of 26 tasks

Flaky specs #8293

filipefurtad0 opened this issue Oct 6, 2021 · 0 comments
Labels
epic Group of issues tech debt

Comments

@filipefurtad0
Copy link
Contributor

filipefurtad0 commented Oct 6, 2021

This epic groups all flaky specs.

Some causes for flaky specs:

  1. Moving files around. Some files have been moved in the context of the migration from feature into system specs, and - as point 2 mentions - this can cause flakyness. The first approach therefore should be to update/move all feature specs into system specs. Some guidelines for this:

https://app.gitbook.com/@ofn-user-guide/s/ofn-testing-handbook/automated-testing-handbook/system-specs

  1. Sometimes the order of specs matters for flakiness, as pointed out here. Here's a list of reasons why this is so:
  • The database cleaner doesn't touch countries and states. If they get modified, that persists.
  • Some queries like Spree preferences are cached in memory. Resetting the database doesn't help.
  • Some code uses class level variables. If they are modified...
  • If code is monkey patched...
  • If code is loaded in a different order, e.g. require statements are executed in a different way...
  1. Discrepancy in system vs. local times. Some specs fail on the last day of the month, see this case.

  2. ? (WIP)

Some references on tackling flaky specs

i) in a system spec context:
https://www.jessespevack.com/2017-10-10-talk-rspec-to-me/

ii) https://nopecode.com/2021/03/03/your-flaky-system-test-again.html

iii) ? (WIP)

Issue list

@filipefurtad0 filipefurtad0 added tech debt epic Group of issues labels Oct 6, 2021
@sigmundpetersen sigmundpetersen changed the title [Flaky] Epic grouping all flaky specs Flaky specs Oct 6, 2021
@github-project-automation github-project-automation bot moved this to All the things in OFN Delivery board Feb 16, 2024
@sigmundpetersen sigmundpetersen moved this from All the things to Prioritized in OFN Delivery board Feb 19, 2024
@sigmundpetersen sigmundpetersen added epic Group of issues and removed epic Group of issues labels Feb 19, 2024
@sigmundpetersen sigmundpetersen moved this from Prioritised to All the things 💤 in OFN Delivery board Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Group of issues tech debt
Projects
Status: All the things 💤
Development

No branches or pull requests

2 participants