Automated API testing for Automation Exercise using Postman and Newman.
This project contains Postman collections for testing the Automation Exercise website API. The goal is to automate API testing, ensuring the backend services work as expected and return the correct responses.
Make sure you have the following installed before starting:
Clone the repository and install the required dependencies:
git clone https://github.com/AgneKal/postman-testing.git
cd your-repository-name
npm install
- Import the Postman collection from the
/postman
directory into your Postman app. - Use Postman to manually run the API requests.
To run the tests using Newman in the command line, execute the following:
npm test
You can also generate HTML reports with Newman:
newman run report
The test files are structured as follows:
📁 postman
┗📄 Automation-exercise.postman_collection.json # Postman collection
Example API request:
{
"method": "GET",
"url": "https://automationexercise.com/api/products",
"header": [],
"body": {},
"description": "Get all products"
}
This project is licensed under the ISC License - see the LICENSE file for details.
Agne: Github