Archi's Academy

GetStarted

GetStarted
Get in touch

API Automation Testing

Yes, when it comes to using Cypress, many users think about front-end testing. But we can use Cypress when writing e2e API tests. Cypress helps you test the entire lifecycle of HTTP requests within your application.

Cypress provides you access to the objects with information about the request, enabling you to make assertions about its properties. Additionally, you can even stub and mock a request’s response.

Common testing scenarios that are possible are asserting on a request’s body, request’s URL, request’s headers, stubbing a response’s body, a response’s status code, a response’s headers, delaying a response, waiting for a response to happen, etc.

Cypress itself provides detailed documentation for this and an example is provided on :

https://example.cypress.io/commands/network-requests

Thanks to Archi's Academy for providing me the interest to learn these advanced testing processes.

Surumi-skill-training

Surumi Riju

Monday, Jan 18, 2021