Mocha has a feature allowing to retry a test if it fails (which is almost the standard behaviour for some of our tests).
https://mochajs.org/#retry-tests
Adding that at a configuration level could spare us a lot of false-positives (and therefore, spare us frustration and time too).
This is the controller panel for Smart Panels app
[CAM-7275] SPIKE: Add retries to E2E tests
Summary | Original: Add retries to E2E tests | New: SPIKE: Add retries to E2E tests |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Fix Version/s | Original: 7.7.0 [ 14607 ] | |
Resolution | New: Won't Fix [ 2 ] | |
Status | Original: In Progress [ 3 ] | New: Closed [ 6 ] |
Remaining Estimate | New: 0 minutes [ 0 ] | |
Original Estimate | New: 0 minutes [ 0 ] |
Workflow | Original: camunda BPM [ 41467 ] | New: Backup_camunda BPM [ 62526 ] |
From what I could read and try, the possibility exists and the feature is precisely meant for those tests which are (somewhat) randomly failing.
For the webapps, it would require to rewrite a lot of tests because the retries option only re-execute code in "beforeEach/afterEach" statements (and we mostly use the "before/after" ones).