You are on page 1of 51

Fundamentals of API Automation

1
Let’s Get Started
Why API automation is increasing in demand?

API vs Web Services vs Micro Services

Agenda for
today’s SOAP vs REST vs GraphQL

webinar
What are the tools available to test
manually/automate API?

Q&A
What is API all about?
What is API all about?
Application Programming Interface (API) allow
two different pieces of software to
interact with one another
What are the payment options available
for IRCTC when purchasing a ticket?
Do you think all these payment options
built in same technologies?
Do you think all these payment options
built in same architecture?
If No, then how does they interact
between them (IRCTC to Payment
Gateways) seamlessly?
Almost all of the modern Applications use API to talk to backend systems.
ALM
Let’s Summarize so far

What is API all about?

How an API works?

Who does use API in today’s world?

Future of API in terms of growth

Selenium uses API internally


m

UI Automation

API Automation

Unit Automation

Lorem ipsum dolor sit amet, consectetur libero.


API vs Web Services vs Micro Services
API vs Web Services
API can be one of these

Does it require Web based conversation?


API can be one of these

Does it require Web based conversation?


API vs Web Services

Source: MuleSoft Blog


API VS WEB SERVICES

API
API communication over COM, RMI, JAR, C,

API C++, .dll , Web and many

WS
WEB SERVICES
API communication over Web
What are Micro Services ??
Micro Services

Get Order Status


1) Get User Information
2) Get Order Details
3) Get Product Details
4) Get Pricing Details

If you want to see the Order Status of your recent purchase, what will you see in this page?
Monolithic applications

Get Order Status


1) Get User Information
2) Get Order Details
3) Get Product Details

Page renders,
only when it is
fully done
Testing requires all to be re-tested for any changes
Micro Services applications
Get Order Status
1) Get User Information
a) Get Order Details
b) Get Product Details
c) Get Pricing Details

Page loads super


fast as each micro
service are
independent

Independent testing of micro services are quite faster !!


Micro Services applications
You can use same micro Amazon.com
services for your web,
mobile and other partner
integrations too. 2014
API Gateway

Get Pricing2016 Get Order Get Product

Data Source
May the UI differs but
not the system behind
Summary

All Web services are APIs but all APIs are not Web services.

Web services are a type of API, which must be accessed through a network connection

API can be: COM, DLL, JAR, RMI + (XML, JSON :: HTTP)

Web Services always travels over HTTP(S) and API does not have to !

Micro Services are independent API that are specific to business domain.
SOAP vs REST vs GraphQL
SOAP - Simple Object Access Protocol (1998)

REST - Representational State Transfer (2000)

GraphQL – Graphical Query Language (2015)


SOAP 1998

SOAP (Simple Object Access Protocol) is XML


a messaging protocol specification for
exchanging structured information in
the implementation of Web Services. GET, POST

Higher Payload

No Cache
REST 2000

Representational state transfer (REST) is XML, JSON, TXT, HTML


a software architectural style that
defines a set of constraints to be used
for creating Web Services GET, POST, DELETE
PUT, PATCH, HEAD ..

Lower Payload

Stateless, Cache
GraphQL 2015

GraphQL is an open-source JSON

data query and manipulation


language for APIs, and a runtime for
fulfilling queries with existing data Asynchronous

HTTP, AMQP, MQTT

Send Only required data


Let’s Summarize

SOAP still has use in certain situations, slowly fading.

REST and JSON continues to be the most used in recent years

GraphQL solved many REST’s problems, and seems to be the new REST

Automation engineer should know how to automate – REST or GraphQL

Automation engineer / tester mostly do not decide the protocol / architecture.


(Automation) Tools
Swagger
The design and documentation platform for teams and individuals working with the OpenAPI spec.
PostMan
Collaboration Platform for API Development – Document, Develop, Test, Automate, Deploy
PostMan
Collaboration Platform for API Development – Document, Develop, Test, Automate, Deploy
SoapUI
Perfect (Automated) Testing Tool – SOAP & REST
REST-Assured
Java framework – Automate
Karate
Karate is the only BDD open-source tool to combine API test-automation, mocks, performance
testing and even UI automation into a single, unified framework.
Katalon Studio
Web, API, Mobile, Desktop Automated Test tool
TRICENTIS TOSCA
Codeless automation platform – UI ( Web, Mobile) , API, CI/CD
Which one is good or the best?
5 minimal contents to learn for API automation?
Any one tool is fine

Request and Responses – Types and Formats

Authorizations – Basic, OAuth2, Token

Parameters – Query, Form, Path

Headers and Cookies – Content Type, Accept

At least one framework – Rest Assured or Karate


Can I learn this FREE? If yes, where?

01 LinkedIn Learning

02 Coursera

03 QwikLabs

04 Test Automation University

05 Udemy
to the world of API automation learning

You might also like