Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 838 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 838 Bytes

cypress-ajv-demo

Automated API tests with Cypress and Ajv to validate response schemas

About

This project uses Cypress to send automated API requests to the free publicly hosted cat facts API and runs basic assertions but also validates the response schema returned from the API. The purpose of this project is to demonstrate how to get schema validation going alongside your automated API tests.

This project validates a very basic schema, so to learn more on schema validation and how to validate complex JSON schemas you should checkout the Ajv docs here, and JSON schemas here.

Setup

Clone the repo down and get into the project's root directory, then:

npm install
npm run test