This repository contains API tests for the ResReq application using Mocha, Chai, and Supertest.
- Node.js installed on your machine. You can download it from here.
-
Clone the repository:
git clone https://github.com/blackfyre/vendease-platform-api-testing.git
-
Navigate to the project directory:
cd vendease-platform-api-testing -
Install dependencies:
npm install
To run the API tests, execute the following command:
npm testThis will trigger Mocha to execute the tests, and Chai assertions will be used for validation.
The test suite (ResReq API Tests) is designed to create users in the ResReq application and validate the API responses.
Each test case in the suite creates a user, measures the response time, checks the status code,
validates the response schema against the JSON schema, and ensures that the headers contain the required Content-Type information.
- The users are specified in the
fixtures/users.jsonfile. - Status code
201is expected for a successful user creation. - The response schema is validated against the defined JSON schema.