🔌 One of my projects to practice API testing was creating a collection of requests to test a sample, locally available API.
- The API connected my client to a simple database containing one table with some mock hotel employee data.
- The API was designed using the REST approach and contained five endpoints.
- I accessed the API documentation via Swagger and created a collection of requests using Postman.
- For each request, I wrote some basic test scripts.
- The API did not require authentication.
🔄 The API allowed me to practice the CRUD operations using four HTTP methods:
- Create/POST: Add an employee;
- Read/GET: Get status; Get an employee by name/by id;
- Update/PATCH: Update an employee's data;
- Delete/DELETE: Delete an employee.
🚀 Here's what the simple API allowed me to practice:
- Manually testing all the endpoints.
- Using code snippets available in Postman.
- Writing my own simple assertions using JavaScript.
- Using collection viariables.
- Using random/dynamic data.
- Testing for different status codes.
- Validating JSON schema and response values.
- Running the collection using Postman and via CLI.