Skip to content

Latest commit

 

History

History

rest-basics

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

TeSTing ReST

An introduction to what ReST (Representational State Transfer) is, how to spy on what a webpage is doing using developer tools and how to interact with a ReST API using Postman.

Presented at

  1. Cape Town Testing on 20 February 2020. See introduction slides here.

Pre-requisites

  1. Download and install Postman. Its available for Windows, Linux and Mac.
  2. Open Postman and create a new workspace (or use an existing one).
  3. Import the Postman environments for the Restful Booker Platform
    1. The Production environment references the Web UI version at https://automationintesting.online
    2. The Heroku environment references the platform version at https://restful-booker.herokuapp.com
  4. Import the Postman collection for the Automation In Testing Restful Booker platform.

Workshop

  1. Explore the Restul Booker web application
  2. Open your browser Developer Tools (usually by pressing F12)
    1. Create a few bookings with valid / invalid data
    2. Do you see anything interesting in the requests being sent by the web application using Developer Tools
  3. Read through the Restful Booker API documentation or as a PDF version (extracted on 17 February 2020)
  4. What can't you do through the Web UI?
  5. Explore the Postman environment setup
    1. Environment level variables assist in exploring multiple environments
  6. Explore Postman collection setup
    1. Collection level variables reduce maintenance by sharing values across various requests (e.g. for authorisation)
      1. Tests functionality can be used to programmatically set variable values
    2. Compare the request configuration and methods to the Restful Booker API documentation
      1. Some requests don't work on both environments - can you find which ones?
  7. Create and manipulate your own test data in the Heroku environment

Further reading and information of interesting

  1. Restful Booker source
  2. HTTP methods
  3. HTTP Status Codes
  4. URL encoding
  5. API Testing from Entry Level to PhD
  6. the difference between ReST and CRUD
  7. EvilTester ReST API Handout
  8. API Security Breach - Facebook