________________________________________________
This project focuses on testing the API of https://automationexercise.com/, an online platform for practicing API testing. Created a Postman test collection, tested it manually in Postman, and integrated Newman with GitHub Actions to execute the tests in CI pipeline, ensuring continuous API quality and reliability. ***
git clone https://github.com/anikush-yes/AutomationExercise_API_Testing.git
cd AutomationExercise_API_Testing
(Or the name You gave)
npm install -g newman
### 1.Using Postman
Import the AutomationExercise_API_Testing.postman_collection.json into Postman
Set API base URL https://automationexercise.com/api/ in Postman environment variables
Run the collection manually
npm test
All valid requests should return 200 OK.
Invalid requests should return proper error messages (400/404/405).
API response times should be under 1000ms.
GET /productsList
- Retrieve all products
POST /productsList
- Verify invalid request handling
GET /brandsList
- Retrieve all brands
PUT /brandsList
- Verify method not supported
POST /searchProduct
- Search for products
POST /searchProduct
(without parameter) - Verify bad request handling
POST /verifyLogin
- Verify login with valid credentials
POST /verifyLogin
(without email) - Verify error handling
POST /verifyLogin
(invalid details) - Check invalid login attempt
DELETE /verifyLogin
- Verify unsupported method handling
POST /createAccount
- Create a new user
PUT /updateAccount
- Update user details
GET /getUserDetailByEmail
- Retrieve user details
DELETE /deleteAccount
- Delete user account
Invalid product search
Account creation without required fields
Retrieving non-existent user account
GET /productsList HTTP/1.1
Host:
{
"responseCode": 200,
"products": [
{
"id": 1,
"name": "T-shirt",
"price": "15.99",
"brand": "Nike",
"category": {
"usertype": {
"usertype": "Men"
},
"category": "Clothing"
}
}
]
}
POST /searchProduct HTTP/1.1
Host:
Content-Type: application/x-www-form-urlencoded
search_product=jeans
{
"responseCode": 200,
"products": [
{
"id": 5,
"name": "Blue Jeans",
"price": "49.99",
"brand": "Levi's",
"category": {
"usertype": {
"usertype": "Men"
},
"category": "Clothing"
}
}
]
}
***
Ensure the API base URL is correctly set before running the tests.
Some tests rely on valid user credentials, update them as needed.
This project is licensed under the MIT License. ***
⭐ If you like this project, don’t forget to give it a star! ⭐