Version:   Beta                                                                       Updated On:  07/Aug/2017


          UI Automation Testing is costly, mostly unstable ( because of various reasons ), time consuming and doesn’t give results as quickly as expected from stack holders. Developer will feel held up because of this. 

Other complaints are; most of the times UI automation test case failure/s doesn’t give exact root cause/s of failure/s and developer needs to spend valuable time finding out root case of bug/s.

API testing goes a level deeper than UI Automation, it is fast , stable , easy to maintain and quick yields accurate info related to a bug ( mostly ).

Lets take example of a product ordering flow of an e-commerce website. As this is most critical feature of software; it must be constantly tested in PROD , QA and Dev environments. In this scenario API testing will help more than UI testing to find out problem/s quicker and inform about it much earlier.

Mark Watney Quote from The Martian movie “At some point, everything’s gonna go south on you and you’re going to say, this is it. This is how I end. Now you can either accept that, or you can get to work. That’s all it is. You just begin. You do the math. You solve one problem and you solve the next one, and then the next. And If you solve enough problems, you get to come home.” [ so true ; in everyday’s work of Automation Engineer ]


1.  What is API

2.  Why API Testing Is Necessary

3.  What Are Different Kinds Of API

4.  API Related Common Info    

5.  Case Studies

6.  API + Cucumber

7.  Running API Test Cases Constantly and Sending out reports ( TBD )

8.  IRC Integration to run , post results etc ( TBD )

9.  Additional Info

10.  Tools


1. What is API ?



2.  Why API testing is necessary ?




3.  What are different kind of API ?



4.  API Related Common Info

4.1   What is “cURL” ?

               4.1.1  9 uses for cURL worth knowing

4.2   Different Response Status Codes



4.3   Why , What , How  RESTful




5. Case Studies : 

Case Study 1:   Wunderlist  + cURL

1.  Create a new account in 

2.  Goto , click on “MY APPS”

3.  Create a new app 


XXXX4852acb2d8XXXXXX , XXXXX07fa01b277d19193162ae0381cf1e61619d160188dc2616eacXXXXX , 


curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX  -H “X-Client-ID: XXXX4852acb2d8XXXXXX” -X GET

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX” -H “X-Client-ID: XXXX4852acb2d8XXXXXX  -X GET

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX” -H “X-Client-ID: XXXX4852acb2d8XXXXXX”  -X GET

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX”  -H “X-Client-ID: XXXX4852acb2d8XXXXXX” -H “Content-Type: application/json; charset=utf-8” -X GET

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX”  -H “X-Client-ID: XXXX4852acb2d8XXXXXX” -X GET

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX” -H “X-Client-ID: XXXX4852acb2d8XXXXXX” -H “Content-Type: application/json; charset=utf-8”  -X POST -d ‘{“title”:”new-list”}’

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX  -H “X-Client-ID: XXXX4852acb2d8XXXXXX ” -H “Content-Type: application/json; charset=utf-8” -X POST -d ‘{“list_id”:XXX0528XX, “title”:”vikram-tasks”}’

curl -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX” -H “X-Client-ID: XXXX4852acb2d8XXXXXX” -H “Content-Type: application/json”  -X PATCH -d ‘{“revision”:1,”title”:”XXXXX”}’

curl -i -H “X-Access-Token: XXXXX654bc6d4aed7432b1c6d2a43598d37ab8165ce16f4b1e2e1d0XXXXX” -H “X-Client-ID: XXXX4852acb2d8XXXXXX”   -X DELETE

File Upload – 4 API calls

stat -f%z  KYC.png   -> gives file size in bytes

curl -i -H “X-Access-Token: dummy” -H “X-Client-ID: dummy” -H “Content-Type: application/json; charset=utf-8”  -X POST -d ‘{“content_type”:”image/png”,”file_name”:”KYC.png”,”file_size”:”530145″}’

201 Created

From response body get values of “url” , “authorization” , “date” to use in below cURL call

Option 1: Works only when curl is called in same directory as file 

curl -i -H ‘Authorization: AWS …’ -H ‘x-amz-date: Tue, 29 Dec 2015 16:10:16 UTC +00:00’ -H ‘Content-Type: ‘ -X PUT  ‘’ 

Option 2:

curl -i -H ‘Authorization: AWS…’ -H ‘x-amz-date: Mon, 04 Jan 2016 14:26:19 UTC +00:00’ -H ‘Content-Type: ‘ -X PUT  ‘’  –upload-file “/Users/vikram-anna/Desktop/Rocky.jpg”

200 OK

curl -i -H “X-Access-Token: dummy  -H “X-Client-ID: dummy  -H “Content-Type: application/json; charset=utf-8”  -X PATCH  -d'{“state”:”finished”}’

200 OK

curl -i -H “X-Access-Token: dummy  -H “X-Client-ID: dummy  -H “Content-Type: application/json; charset=utf-8”  -X POST -d ‘{“upload_id”:45936173,”task_id”:1548767307}’

201 Created

curl -i -H “X-Access-Token: dummy”  -H “X-Client-ID: dummy ” -H “Content-Type: application/json; charset=utf-8” -X POST -d ‘{“title”:”FOLDER-API”, “list_ids”:[231294978]}’

201 Created 


Case Study 2:   Twitter API  + Postman

Refer to youtube video names “Using Postman for Chrome to Connect To Twitter API


Application Settings

1. Consumer Key      ( API Key )

2.  Consumer Secret ( API Secret ) 

Your Access Token

1. Access Token 

2. Access Token Secret 


Case Study 3:   Spotify ( WIP )

3.1   Types of API requests ?


3.2   Web API Tutorial


3.3   Spotify API Console


3.4   Understanding the Spotify Web API


3.5   API References



Case Study 4 :  ( WIP )


6.  API + Cucumber


7. Running API Test Cases Constantly and Sending out reports ( TBD )


8. IRC Integration to run , post results etc ( TBD )

9 . Additional Notes ( WIP ) driven API testing framework )

??.  What is “REST”

??. Difference between REST and RESTful

??  What , Why “Node.js”

??  What is “JSON Object” ?

?? JSON vs Form Params

??  rest-assured ( Open Source Framework based on Java Language ) 

Introduction To RestAssured Java REST API library for Test Automation ( EvilTester – Software Testing )

Java DSL for easy testing of REST services

( Demo project for reference to newcomers ) ( Building micro services testing framework )

( RESTful API Testing with Rest-Assured ) (  How To Post A JSON Request : REST Assured ) (  Testing REST services with REST Assured )

( Refer to conversation August 10, 2016 at 10:25 am )  

chrome://net-internals Chrome net-internal tool to check traffic ( James Willet – Technical Testing ) 

10. Tools 

1.  Paw

2.  Postman