What is Client and Server?
• What is a Client?
• A client is a computer hardware device or software that
accesses a service made available by a server. The server is
often (but not always) located on a separate physical computer.
• What is a Server?
• A server is a physical computer dedicated to run services to
serve the needs of other computers. Depending on the service
that is running, it could be a file server, database server, home
media server, print server, or web server.
What is an API?
• API is means Application Programming Interface.
• It enables communication and data exchange between two separate software systems.
• A software system implementing an API contains functions/sub-routines which can be executed by another
What is API testing?
• API Testing is entirely different from GUI Testing and mainly concentrates on the business logic layer of the
software architecture. This testing won't concentrate on the look and feel of an application.
• Instead of using standard user inputs(keyboard) and outputs, in API Testing, you use software to send calls to
the API, get output, and note down the system's response.
• API Testing requires an application to interact with API. In order to test an API, you will need to
Use Testing Tool to drive the API
Write your own code to test the API
API Testing V/S Unit Testing
Unit Testing API testing
Developers perform it Testers perform it
Separate functionality is tested End to end functionality is tested
Developer can access the source code Testers cannot access the source code
UI testing is also involved Only API functions are tested
Only basic functionalities are tested All functional issues are tested
Limited in scope Broader in scope
Usually ran before check-in Ran after build is created
API Testing V/S Unit Testing
What is Web Service?
• What is a Web Service: Web Service - service available over the web
• Enables communication between applications over the web
• Provides a standard protocol/format for communication
• Why we use it?
• Platform independent communication - using web services two different applications (implementation) can talk to each other
and exchange data/information
Order food Send order to Kitchen
C l i e n t R e q u e s t
A P I R e q u e s t
A P I R e s p o n s e
Web service API
Difference between API & Web service
1. Web Service is an API wrapped in HTTP.
2. All Web Services are API but APIs are not Web Services.
3. Web Service might not perform all the operations that an API would perform.
4. A Web Service needs a network while an API doesn't need a network for its
Components of Web Services : WSDL and UDDI
• What is WSDL?
• WSDL stands for Web Services Description
Language, an XML-based language that
describes Web services and how to access
and locate them.
• What is UDDI?
• UDDI stands for Universal Description,
Discovery and Integration. It is an open,
Internet-based specification that offers
directory service for storing information
about web services.
UDDI (Universal Description, Discovery and Integration)
Types of Web Services
• There are mainly two types of web services.
SOAP web services. (Simple Object Access Protocol)
RESTful web services. (Representational State Transfer)
• SOAP (Simple Object Access Protocol) – SOAP is a protocol which was designed
before REST and came into the picture. The main idea behind designing SOAP was to
ensure that programs built on different platforms and programming languages could
exchange data in an easy manner.
• REST – This was designed specifically for working with components such as media
components, files, or even objects on a particular hardware device. Any web service
that is defined on the principles of REST can be called a RestFul web service. A
Restful service would use the normal HTTP verbs of GET, POST, PUT and DELETE for
working with the required components.
SOAP Vs Rest
"marshalling" refers to the process of converting the data or the objects into a byte-stream, and "unmarshalling" is the
reverse process of converting the byte-stream back to their original data or object
HTTP V/S HTTPS
What Is HTTP?
HTTP stands for Hypertext Transfer Protocol. At it’s most
basic, it allows for the communication between different
systems. It’s most commonly used to transfer data from a
web server to a browser in order to allow users to view web
pages. It’s the protocol that was used for basically all early
What Is HTTPS?
HTTPS stands for Hypertext Transfer Protocol Secure. The
problem with the regular HTTP protocol is that the
information that flows from server to browser is not
encrypted, which means it can be easily stolen. HTTPS
protocols remedy this by using an SSL (secure sockets layer)
certificate, which helps create a secure encrypted
connection between the server and the browser, thereby
protecting potentially sensitive information from being stolen
as its transferred between the server and the browser.
The Main Difference Between HTTP and HTTPS
API/Web service testing challenges
1. Initial Setup of API Testing
2. Updating the Schema of API Testing
3. Testing Parameter Combinations
4. Sequencing the API Calls
5. Validating Parameters
Web Service API testing tools
Web service/API Testing process
RESTful web services
•RESTful web services
REpresentational State Transfer
A service represents a resource that can be accessed from the web
Commonly makes use of different HTTP request methods to
implement CRUD functions:
POST – Create new resource
GET – Retrieve resource
PUT – Update resource
DELETE – Delete resource
Different HTTP Methods
S2 – Server
S2 – Server
S1 – Client
3) Payload –JSON/XML
1) Status Code – 200 OK
2) Response Payload
3) String message Successful
C - Create → POST
R - Retrieve → GET
U - Update → PUT
D – Delete → DELETE
1) Create an account →POST Call
Account Type =“Savings”
2) Get an account by ID/Name →GET Call
URL → http://api/service/accounnt/1
3) Update an account →PUT Call
Create + Update
Address = NewYork
Account Type =Current
3) Delete an account →DELETE Call
What is URI and URL