REST API testing - requirements
So let’s see what are we going to need to run our REST API test with Cypress. Make sure to:
Setting up the project
cd cypress-api-tests
Create npm package:
npm init -y
Now install Cypress:
npm i cypress
You can open Cypress from your project root using command. npx is included with npm version > v5.2 but you can install it separately. We will see our test running interactively with the browser
npx cypress open
It will start Cypress and create a cypress folder.
There are four subfolders in it: fixtures, plugins, support, and integration. In integration one there are some example tests that I have deleted. If you want to learn more about organizing tests, please take a look at Cypress docs. Additionally, in root, there is a cypress.json file created. Inside, you can see only curly brackets for now.