Project

General

Profile

Actions

Bug #17500

closed

Fix flaky integration tests

Added by Peter Amstutz over 3 years ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Story points:
-
Release relationship:
Auto

Description

The following tests tend to fail with "Timed out retrying after 4000ms"

favorites.spec.js
1) can copy selected into the collection

This one too:

sharing.spec.js
1) can share projects to other users

Also

page-not-found.spec.js 
1) Page not found tests

Subtasks 1 (0 open1 closed)

Task #17544: Review 17500-cypress-flakyness-fixesResolvedPeter Amstutz04/20/2021Actions
Actions #1

Updated by Peter Amstutz over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Ward Vandewege over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Peter Amstutz over 3 years ago

  • Assigned To set to Ward Vandewege
Actions #4

Updated by Lucas Di Pentima over 3 years ago

I've been looking for methods to reduce test flakyness. I think that one of the causes is the fact that we use cy.visit() to go to specific URLs. This makes the browser go to the url and reloading the entire app in the process... which introduces delays because on app boostrap, there're lots of things going on in the background.

One idea would be to stop using cy.visit() and somehow access the app's router from Cypress, so we can push new URLs to the browser's history and let the app react to it, this I think will improve response times a lot. I've found a couple of hints on how to do this:

https://github.com/cypress-io/cypress/issues/128#issuecomment-406155816

and more react specific:

https://github.com/cypress-io/cypress/issues/3120#issuecomment-453254393

Actions #5

Updated by Peter Amstutz over 3 years ago

  • Target version changed from 2021-04-14 sprint to 2021-04-28 bughunt sprint
Actions #6

Updated by Peter Amstutz over 3 years ago

  • Description updated (diff)
Actions #7

Updated by Peter Amstutz over 3 years ago

  • Assigned To changed from Ward Vandewege to Lucas Di Pentima
Actions #8

Updated by Lucas Di Pentima over 3 years ago

  • Status changed from New to In Progress
Actions #9

Updated by Lucas Di Pentima over 3 years ago

Updates at arvados-workbench2|e76af0d - branch 17500-cypress-flakyness-fixes

Test runs: Fixes:
  • Avoids using multi-slash URLs on Cypress requests.
  • Fixes issue that made the 'page not found' message to not be displayed on unknown routes.
  • Adds app router navigation capabilities to Cypress tests, to improve reliability and speed.
  • Adds object cleanup before every test to avoid potential issues and test slowness.
  • Fixes cy.loginAs() command to avoid leaking session data if used more than once on a single test.
  • Fixes favorites suite test that relied on the above bug to sometimes pass.
Actions #10

Updated by Peter Amstutz over 3 years ago

Lucas Di Pentima wrote:

Updates at arvados-workbench2|e76af0d - branch 17500-cypress-flakyness-fixes

Test runs: Fixes:
  • Avoids using multi-slash URLs on Cypress requests.
  • Fixes issue that made the 'page not found' message to not be displayed on unknown routes.
  • Adds app router navigation capabilities to Cypress tests, to improve reliability and speed.
  • Adds object cleanup before every test to avoid potential issues and test slowness.
  • Fixes cy.loginAs() command to avoid leaking session data if used more than once on a single test.
  • Fixes favorites suite test that relied on the above bug to sometimes pass.

This LGTM

Actions #11

Updated by Anonymous over 3 years ago

  • Status changed from In Progress to Resolved
Actions #12

Updated by Peter Amstutz 7 months ago

  • Release set to 38
Actions

Also available in: Atom PDF