This is a practical personal project to practice basic concepts of API Testing. The API is called "Reqres" and you can access here to view its functionalities and expected responses from the server. The main tools/technologies used are Postman, Newman, JavaScript and Chai BDD.
The scope of the project includes testing the following functionalities of the API:
- Login
- Register
- Create user data
- Update user data
- Delete user data
- Get a list of users
- Get a single user
- Basic Security and Authentication
Creating Test Scenarios and Test Cases for the different features listed before, including different test case design techniques such as:
- Equivalence Class Partition
- Decision Tables
- Positive/Negative Testing
- Basic Security Testing
- Error Guessing
Almost every request in the Test Cases must contain the following actions:
- Verify expected HTTP status code.
- Verify the response payload.
- Verify important headers (optional).
- Verify acceptable response time.
(Considering that the application is in a stable version, Smoke Testing has been omitted.)
- Install Nodejs
- Install newman with npm:
npm install -g newman
- Install newman html reporter:
npm install -g newman-reporter-html
- Clone this repository:
git clone https://github.com/iandav/reqres-api-testing/
- Run .json collections:
newman run collection_name.json -r html
- View test results created in the project folder as an html file.
Total | Failed | |
---|---|---|
Iterations | 1 | 0 |
Requests | 15 | 0 |
Prerequest Scripts | 2 | 0 |
Test Scripts | 15 | 0 |
Assertions | 44 | 14 |
Total Failures: |
---|
14 |