Skip to content

Automated API tests with Cypress and Ajv to validate response schemas. A basic demo to show you how to get automated schema validation going in your project.

License

Notifications You must be signed in to change notification settings

AhmedAlsaab/cypress-schema-validation-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Automated API tests with Cypress and Ajv to validate response schemas. A basic demo to show you how to get automated schema validation going in your project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published