Skip to content

Instantly share code, notes, and snippets.

@jaetask
Created February 1, 2019 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaetask/a1c1b209adf817c4a56c45a71a60b007 to your computer and use it in GitHub Desktop.
Save jaetask/a1c1b209adf817c4a56c45a71a60b007 to your computer and use it in GitHub Desktop.
[Cypress before / beforeEach optimisation] Descrease time to test by only requesting the base page once #cypress
// If all the tests happen on a single page with no dynamic changes
// use before instead of before each
// This exponentially reduces the test time. from 7.5s to 1.2s for only 5 tests.
before(() => {
cy.visit('/style-guide');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment