This repository contains automated tests for the Transaction API. The tests are crafted using Postman and executed with Newman, ensuring comprehensive coverage and reliability of the API endpoints.
- Overview
- API Endpoints Covered
- Tools Used
- Setup Instructions
- Running the Tests
- Project Structure
- Contributing
- License
The Transaction API provides a set of endpoints for managing financial transactions, including creating, updating, retrieving, and deleting transactions. This project automates the testing of these endpoints to ensure the API's functionality, reliability, and consistency.
The following API endpoints are covered in the automation:
GET /transactions
: Retrieve a list of all transactions.GET /transactions/:id
: Retrieve the details of a specific transaction.POST /transactions
: Create a new transaction.PUT /transactions/:id
: Update an existing transaction.DELETE /transactions/:id
: Delete a transaction.
For detailed API documentation, refer to the Postman documentation here.
- Postman: Used for creating, organizing, and running the API test cases.
- Newman: A command-line tool used to run Postman collections in various environments and integrate them into CI/CD pipelines.
- Node.js installed on your machine.
- Newman installed globally:
npm install -g newman
- Postman installed for running and modifying the collections.
Clone this repository to your local machine:
git clone https://github.com/sadmanpieal/Transaction-API-Testing.git
cd Transaction-API-Testing
To run the tests using Newman, use the following command:
newman run Transaction-API.postman_collection.json
This command will execute the entire suite of tests against the Transaction API.
If you wish to generate an HTML report after running the tests, use:
newman run Transaction-API.postman_collection.json -r html --reporter-html-export newman-report.html
The report will be saved as newman-report.html
.
##Test Report https://docs.google.com/spreadsheets/d/1E29MZSOyZaeVR97Q3cnHiEBf8x-GJHDQ/edit?gid=1581453724#gid=1581453724
##Bug Report https://docs.google.com/spreadsheets/d/1Jb6S90nTIfhPxPG23Om_8bcPWzQ7DUso/edit?gid=1600159292#gid=1600159292
The repository is structured as follows:
Transaction-API-Testing/
│
├── Transaction-API.postman_collection.json # Postman collection file containing all API requests and tests.
├── newman/ # Folder containing Newman reports and other artifacts (if applicable).
└── README.md # Project documentation (this file).
If you would like to contribute to this project, please fork the repository and submit a pull request. All contributions are welcome!
This project is licensed under the MIT License. See the LICENSE file for details.