/robotframework-api-example-test-suite

Example Robot Framework API test suite against RestfulBooker

Primary LanguageRobotFramework

README

Robot framework

Robot Framework API automation example using Mark Winteringham`s - Restful-Booker

By default this is using the live online version of RestfulBooker, but RestfulBooker can be ran locally, you can grab off git hub here

Documentation for the API can be found here

Who is this repository for?

Newcomers to Robot Framework interested in automated API testing, looking for examples

What is Robot Framework?

Robot framework is a python based, open source test automation framework with great extensibility. Robot framework is cross platform and will run on Mac, Linux and Windows.

See here for Robot Framework home page

What exactly is this?

A basic Robot Framework API test suite with the following tests:

  • Obtaining Auth Token
  • Get All Bookings IDs
  • Add New Booking
  • Validate New Booking Details
  • Get New Booking ID By Name
  • Get New Booking ID By Date
  • Update New Booking
  • Partial Update New Booking
  • Delete All Bookings <- commented out by default

The following supporting librarys are used in this suite alongside some of the built in librarys...

JSON Validator

RequestsLibrary

How do I get set up?

  • Install Python 3
  • Clone or download this repository
  • Using the command line navigate in to the project folder and execute the command pip install -r requirements.txt this will install robot framework and the required supporting library's and their dependencies

Once everything has been installed you can run the test suite from the command line in the projects folder with the commandrobot .\api.robot

By default it will run on the live site on the web, this can be changed at the command line to point to a local instance of restfulbooker by running robot -v BASE_URL:127.0.0.1:3001 .\api.robot or changing the ${BASEURL} variable in the api.robot file

Who do I talk to?