Cypress the test in parallel with different data sets

  • I want to run a single test in parallel with different data sets.
    I am storing the data set in fixtures.

  • You would have to load all your data into objects from the fixtures, but you could then add each response to an array and shift each time inside a while loop. Your error reporting won’t be great but you should be able to process all of your data sets with minimal code duplication. Something like this, maybe:

    it(‘tests my data sets’, () => {
        const datasets = [dataset1, dataset2, dataset3];
        while(dataset.length > 0) {
            cy.intercept('GET', '/todos', req => req.reply(datasets.shift()));

Suggested Topics