Automating and Testing a REST API

Automating and Testing a REST API Cover

A Case study in REST API Testing and Automating using: Java, RestAssured, Tracks, Postman, cURL and HTTP Proxies

This 200+ page e-book documents a case study of testing and automating a REST API based application.

It covers interactive testing of the application through the GUI, and via cURL and HTTP Proxies.

And automating with Java and REST-assured.

Comprehensively documented, with full source code available, you're sure to learn something new.

This is the support page for the book with links to the source, tools and the free supporting videos mentioned in the text.

Buy the ebook

More Info

Tools etc.

Tracks

Tracks is an open source application written in Ruby on Rails which implements the David Allen "Getting Things Done" time management methodology.

Tracks Installers

Virtual Machine Software

Prebuild Tracks Virtual Machines

cURL

You can install cURL on windows using:

see the videos below for each of these installation approaches

HTTP Proxies

The easiest HTTP Proxies to use are:

You could also use:

REST

You can find information about REST:

REST API Tools

Tools not used in the case study:

REST Java API Libraries

The case study uses REST-assured:

Other libraries are available:

Lists of APIs to Experiment With

Source

The source code for all the Java code used to automate Tracks as part of the case study is available on Github

There is a video below showing how to install and use the source code.

Postman Collection

The Postman Collection for the case study is available in the above source code and shared on the Postman site:


Videos

I created supporting videos for some of the chapters and sections in the book. These make most sense when read in conjunction with the book but offer a visual insight into tools used which the book can't cover quite as well.

Installing Tracks

Installing Tracks to a VM using Turnkey.

The last time I used the Turnkey VM I used the VMWare Player 12 and used the following steps:

Note: The Bitnami install mentioned has been discontinued,read more information here

An overview of Tracks GUI

Installing cURL for Windows

Install cURL using one click installer from confusedbycode.com

Install cURL using chocolatey

Install cURL from official site on Windows

An overview of REST interaction with CURL

Using HTTP Debug Proxies as part of your REST testing

Using HTTP Debug Proxies as Fuzzers to Create Data

Postman REST GUI Client

An overview of the Postman GUI client

Using Postman GUI Client with an HTTP Proxy

Installing and Using the Java Source Code

In the video I show:


Related Reading

Other Blog posts and information you might want to read related to the material in the book, I include a lot of extra references in the book, but these were found after publication and I did not want to keep adding more links into the book, so I added them here instead, I also included a few from the book:

Blog Posts and Sites:

Book Versions

Ebook

Ebook on sale at leanpub has had the following releases:

Paperpack

Paperback edition currently in proof creation and review mode. Will be the same as the 2017/07/03 release.

Bitnami Tracks

On 4th August 2017 I was told that Bitnami had discontinued the Tracks VM and self contained install.

This is unfortunate as I found it the most reliable and easiest way of getting started. Turnkey is now the simplest way of getting started.

I emailed Bitnami, just in case they could reinstate the installs but on 8th August I learned that the installs would not be reinstated. I suspect the following links will forever remain 'discontinued'.

You should probably use Turnkey Tracks installers and VMs (but see the additional information below).

Using Bitnami VMs

You can still use Bitnami VMs but you have to install Tracks yourself. The following instructions are the steps I took to install Tracks into the Bitnami Ruby Infrastructure VM.

Turnkey Icon Workarounds

Stas Wasserman was kind enough to describe some additional information and workarounds on the Turnkey install:

bundle exec rake assets:precompile RAILS_ENV=production