This repository contains a project setup for using Cypress with Gherkin to test REST APIs.
You can follow these steps to clone the repository and set up Cypress.
Make sure you have the following installed on your system:
-
Open Git Bash and navigate to your desired project directory.
cd path/to/your/project/directory
-
Clone the repository: git clone https://github.com/osama4test/cypress-gherkin-rest-api.git
-
Open the terminal in Visual Studio Code (VSCode).
-
Install Cypress: npm install cypress --save-dev
-
Open Cypress npx cypress open
cypress/
fixtures/
users.json
- Contains the data used for the tests.
integration/
features/
users.feature
- Contains the Gherkin scenarios for the Reqres API.
step_definitions/
users_steps.js
- Contains the step definitions for the Gherkin scenarios.
support/
commands.js
- Custom commands (if any).index.js
- Global configuration and behavior.pages/
apiPage.js
- Page object model for API requests.