/Restful-Booker-API-tests

API tests of https://restful-booker.herokuapp.com with Postman

Restul-Booker API tests

This repository contains API tests for https://restful-booker.herokuapp.com - an API playground which allows to perform all CRUD methods. The tests were created and performed in Postman and then exported to JSON files.

Test scenario categories

The test activities have been divided into categories:

  • Happy path: basic positive tests for a standard CRUD process

    1. GET get booking ids
    2. GET get booking
    3. GET get booking ids with params
    4. POST create booking
    5. GET get created booking
    6. (POST create authentication token)
    7. PUT update booking
    8. GET get updated booking
    9. (POST create authentication token)
    10. PATCH partial update booking
    11. GET get updated booking
    12. (POST create authentication token)
    13. DELETE delete booking
    14. POST create booking with param longer than 200 characters
    15. OPTIONS get options
    16. HEAD get booking ids without body
  • Negative tests with valid input

    1. (POST create authentication token)
    2. DELETE delete booking that doesn’t exist
    3. GET get booking which doesn't exist
    4. DELETE delete booking without permission
  • Negative tests with invalid input

    1. POST create booking with missing parameters
    2. POST create booking with invalid parameters - wrong firstname
    3. POST create booking with invalid parameters - wrong totalprice
    4. GET get booking with invalid parameters - wrong totalprice
    5. POST create booking with invalid parameters - wrong depositpaid
    6. GET get booking with invalid parameters - wrong depositpaid
    7. POST create booking with invalid parameters - wrong bookingdates
    8. POST create booking with invalid model
    9. PUT update booking with invalid authorisation token
    10. POST create empty booking

Test actions

For every response a test suite has been performed, for example:

  • For response status:
    • Status code is 200
  • For response headers:
    • Header Server is Cowboy
    • Header Content-Type is present
  • For response body:
    • Response is a JSON
    • Response schema is correct
    • JSON values are correct types
    • Check if totalprice is null
    • Check if lastname is McDrive
    • Body is correct
  • For performance:
    • Response time is less than 1000ms

Test results

All tests are passed.