The project was made to practice API testing skills in Postman. Automated tests were written for the test scenarios shown below. The tests were run directly in the Postman app and via the command-line Collection Runner (Newman), which allows you to run and test a Postman Collection directly from the command-line.
newman run AutomationExercise_API_Testing.postman_collection.json -e AutomationExercise.postman_environment.json
- API URL: https://automationexercise.com/api/productsList
- Request Method: GET
- Response Code: 200
- Response JSON: All products list
- API URL: https://automationexercise.com/api/productsList
- Request Method: POST
- Response Code: 405
- Response Message: This request method is not supported.
- API URL: https://automationexercise.com/api/brandsList
- Request Method: GET
- Response Code: 200
- Response JSON: All brands list
- API URL: https://automationexercise.com/api/brandsList
- Request Method: PUT
- Response Code: 405
- Response Message: This request method is not supported.
- API URL: https://automationexercise.com/api/searchProduct
- Request Method: POST
- Request Parameter: search_product (For example: top, tshirt, jean)
- Response Code: 200
- Response JSON: Searched products list
- API URL: https://automationexercise.com/api/searchProduct
- Request Method: POST
- Response Code: 400
- Response Message: Bad request, search_product parameter is missing in POST request.
- API URL: https://automationexercise.com/api/verifyLogin
- Request Method: POST
- Request Parameters: email, password
- Response Code: 200
- Response Message: User exists!
- API URL: https://automationexercise.com/api/verifyLogin
- Request Method: POST
- Request Parameter: password
- Response Code: 400
- Response Message: Bad request, email or password parameter is missing in POST request.
- API URL: https://automationexercise.com/api/verifyLogin
- Request Method: DELETE
- Response Code: 405
- Response Message: This request method is not supported.
- API URL: https://automationexercise.com/api/verifyLogin
- Request Method: POST
- Request Parameters: email, password (invalid values)
- Response Code: 404
- Response Message: User not found!
- API URL: https://automationexercise.com/api/createAccount
- Request Method: POST
- Request Parameters: name, email, password, title (for example: Mr, Mrs, Miss), birth_date, birth_month, birth_year, firstname, lastname, company, address1, address2, country, zipcode, state, city, mobile_number
- Response Code: 201
- Response Message: User created!
- API URL: https://automationexercise.com/api/deleteAccount
- Request Method: DELETE
- Request Parameters: email, password
- Response Code: 200
- Response Message: Account deleted!
- API URL: https://automationexercise.com/api/updateAccount
- Request Method: PUT
- Request Parameters: name, email, password, title (for example: Mr, Mrs, Miss), birth_date, birth_month, birth_year, firstname, lastname, company, address1, address2, country, zipcode, state, city, mobile_number
- Response Code: 200
- Response Message: User updated!
- API URL: https://automationexercise.com/api/getUserDetailByEmail
- Request Method: GET
- Request Parameters: email
- Response Code: 200
- Response JSON: User Detail