Passing variables between tests in Cypress

Testing business workflows end2end with cy.task()

Paul de Witt
Feb 4 · 3 min read
Photo by Aaron Burden on Unsplash

I always try to follow Cypress’s best practices when writing robust and isolated test cases. If test data is needed I use fixtures, so that I can predict the outcome. But sometimes you want to test an entire workflow, where different types of users execute different parts of the process.