DEV Community

Discussion on: API Testing with Cypress: Part 1 - Setup

Collapse
 
thiagojacinto profile image
Thiago Jacinto

Congrats, Murillo. Looking forward to the next chapters!

I just want to add that I saw the opportunity of using something like a JSON schema validator instead of the last expect that validates all fields of object. What do you think about that?

Collapse
 
murillowelsi profile image
Murillo Welsi de Souza Pereira

In fact this is a great idea, it would work perfectly for this scenario. Perhaps in a scenario where there are business rules, where the fields dynamically change payload it would easier to do this validation of the keys as I did.

I will try to add a contract test as you suggested in the next one.

Thanks for you suggestion, Thiago!