I want to automate web api testing, but I am a beginner to automation. I have list of REST API's which I want to automate. Can someone please suggest from where should I start? Can I use Selenium to automate?
Asked
Active
Viewed 8,555 times
-1
-
You can create test cases in postman(chrome app). – Jay Modi Jun 28 '16 at 10:10
-
@Jay How to do that? Do you have any wiki for it? – Anil Reddy Yarragonda Jan 18 '17 at 08:19
-
@AnilReddyYarragonda I have added answer below. check it out. – Jay Modi Jan 18 '17 at 12:54
2 Answers
2
You can write test cases with postman and test all your web apis.
Like test response time, status code, content-type and much more.
here is one simple example. Type this in the test tab of postman.
var contentTypeHeaderExists = responseHeaders.hasOwnProperty("Content-Type");
tests["Has Content-Type"] = contentTypeHeaderExists;
if (contentTypeHeaderExists) {
tests["Content-Type is application/json"] =
responseHeaders["Content-Type"].has("application/json");
}
Advanced use cases includes grouping and saving different types of APIs by their modules types.
for more details check this blog

Jay Modi
- 3,161
- 4
- 35
- 52
1
You can use any of the external libraries out there to automate
the REST APIS
. Below are few of them you can use:-
Once you are done with the API Automation using external libraries you can club the same with Selenium
to develop Integration Tests
which will perform some work on FrontEnd
using Selenium
library and it can also perform some Backend
work using any of the aforesaid clients.

Paras
- 3,197
- 2
- 20
- 30