DEV Community

Discussion on: API Testing with Cypress: Part 2 - Creating your tests

Collapse
 
asn007_17 profile image
asn-007

To be more specific I would want to be able to continue test execution with the rest of the data from the fixture file when an assertion fails with one of the test data.

Ex: I have this json file as fixture,
when I assert "email" from the first fixture data which is invalid cypress throws an error and stops execution.

But I would like it to continue with the assertion for age and also the data from 2nd and 3rd fixture data and not just stop the entire execution at the 1st failure
[
{
"name": "valid1",
"email": "invalid1",
"age" : valid
},
{
"name": "valid2",
"email": "valid2",
"age" : valid
},
{
"name": "valid3",
"email": "valid3",
"age" : valid
}

]