0% found this document useful (0 votes)
2 views3 pages

API Testing Interview Questions Guide

The document provides a comparison between SOAP and REST APIs, highlighting that SOAP is a protocol while REST is an architectural pattern, with REST supporting multiple data formats including JSON. It discusses major challenges in API testing, such as parameter selection and output verification, and explains key concepts in REST architecture, including resources, HTTP protocols, and request components. Additionally, it outlines the characteristics of REST and the use of SOAP for web services.

Uploaded by

nikithamathew2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

API Testing Interview Questions Guide

The document provides a comparison between SOAP and REST APIs, highlighting that SOAP is a protocol while REST is an architectural pattern, with REST supporting multiple data formats including JSON. It discusses major challenges in API testing, such as parameter selection and output verification, and explains key concepts in REST architecture, including resources, HTTP protocols, and request components. Additionally, it outlines the characteristics of REST and the use of SOAP for web services.

Uploaded by

nikithamathew2
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

[Link]

com/api-testing-interview-questions

[Link]

What are the differences between SOAP and REST API?

Sr. SOAP API REST API


No.

1. SOAP stands as Simple Object Access REST stands as Representational State Transfer.
Protocol.

2. SOAP is a protocol. REST is an architectural pattern.

3. SOAP can work with XML format. In SOAP REST permit different data format such as Plain text, HTML, XML, JSON
all the data passed in XML format. etc. But the most preferred format for transferring data is in JSON.

22) What are the major challenges faced during API testing?

The major challenges faced during the API testing are:

● Parameter Selection

● Parameter Combination

● Call sequencing

● Output verification and validation

● A major challenge is providing input values which are very difficult because GUI is not available.

25) What is Resource in REST?

REST architecture treats any content as resource, which can be text files, HTML pages, images, videos or dynamic business
information. REST server gives the functionality to access the resources and modifies them. We can identify the each resources by
URIs/ global IDs.

26) What is the way to represent the resource in REST?

REST uses different representation to define the resources like text, JSON and XML. The most popular representation of resources
is JSON and XML.

27) What protocol is used by the RESTFUL Web Services?

RESTFUL Web Services uses the HTTP protocol. They use the HTTP protocol as a medium of communication between the client
and the server.
[Link]

28) What are the characteristics of REST?

Here, are the two characteristics of REST.

1. REST is stateless. With the use of the REST API the server has no status, we can restart the server between two calls,
inspite of all the data is transferred to the server.

2. Web Services uses POST method to perform operations, while REST uses GET method to access the resources.

29) What is messaging in RESTFUL Web Services?

RESTFUL Web Services use the HTTP protocol as a communication tool between the client and the server. This is the technique
when the client sends a message in the form of HTTP request the server send back the HTTP reply which is called Messaging. This
message consists message data and Meta data i.e. information on the message itself.

30) What are the components of an HTTP request?

An HTTP request have five components. These are:

1. Action showing HTTP method like GET, PUT, POST, DELETE.

2. Uniform Resource Identifier (URI): URI is the identifier for the resource on the server.

3. HTTP version: Indicate the HTTP version like- HTTP V1.1.

4. Request Header: Request Header carries metadata for the HTTP request message. Metadata could be a client type,
format supported by the client, format of a message body, cache setting etc.

5. Request Body: Resource body indicates message content or resource representation.

31) What is the HTTP protocol supported by REST?

GET: GET is used to request data from the specified resource.

GET request can be cached and bookmark. It remains in the browser history and has length restriction. When dealing with sensitive
data GET requests should not be used.

POST: POST is used to send data to server for creation or updating the resources.

POST requests are never cached or bookmark.

PUT: PUT replaces the current representation of the target resource with the request payload.

DELETE: DELETE removes the specified resource.

OPTIONS: OPTION is used to describe the communication option for the target resources.
[Link]

HEAD: HEAD asks for response which is identical to GET requests, but without the response body.

32) Can we use GET request instead of PUT to create a resource?

PUT or POST method is used create a resource. GET is only used to request the resources.

33) What is URI? What is the purpose of web-based service and what is it's format?

URI stands for Uniform Resource Identifier. It is a string of characters designed for unambiguous identification of resources and
extensibility by the URI scheme. The purpose of URI is to locate the resource on the server hosting of the web service.

A URIs format is <protocol>://<service-name>/<Resource Type>/<ResourceID>

34) What are SOAP Web Services?

SOAP (Simple Object Access Protocol) is defined as the XML based protocol. SOAP is also known for developing and designing web
services and also enable the communication between the applications developed on different platform by using different
programming languages on the internet. SOAP is platform and language independent.

35) When we can use SOAP API?

We can use SOAP API to perform the operation on records like create, retrieve, update or delete. We can use API to manage
password, perform searches etc.

You might also like