API Connect Interview Questions And Answers
API Connect Interview Questions And Answers will be very helpful for the beginners and also for experienced candidates
1. What is Api?
Ans: An API (Application Programming Interface) is a collection of software functions and procedures, called API calls, that can be executed by other software applications. Application developers code that links to existing APIs to make use of their functionality. This link is seamless and end-users of the application are generally unaware of using a separately developed API.
During testing, a test harness-an application that links the API and methodically exercises its functionality-is constructed to simulate the use of the API by end-user applications.
The interesting problems for testers are:
1. Ensuring that the test harness varies parameters of the API calls in ways that verify functionality and expose failures. This includes assigning common parameter values as well as exploring boundary conditions.
2. Generating interesting parameter value combinations for calls with two or more parameters.
3. Determining the content under which an API call is made. This might include setting external environment conditions (files, peripheral devices, and so forth) and also internal stored data that affect the API.
4. Sequencing API calls to vary the order in which the functionality is exercised and to make the API produce useful results from successive calls.
2. Why maintaining the lifecycle of an API is important?
Ans: An API is designed to access the features or the functions of an operating system. Creating an API is not always a simple job. It needs a lot of money to be invested. If the API doesn’t work properly due to lack of maintenance, there are certain things that can go wrong. There are chances of introduction of lots of errors. Because it is possible to integrate applications with each other, an API designed for a specific task might be used for others and thus the future cost can be saved. However, this is only possible when the lifecycle of an API is maintained.
3. Can You Tell Us Which Java API Helps In Developing A RESTFul Web Service?
Ans: There are many frameworks and libraries available that a developer can use to create RESTful web services in Java. For example, the JAX-RS library is a standard way to develop a REST web service.
Also, Jersey is another most popular implementations of JAX-RS which offers more than what the specs recommend. There are others like RESTEasy, RESTlet, and Apache CFX.
If you like Scala, then you should be using Play framework to develop RESTful web services.
4. Mention what is the difference between RPC or document style web services? How you determine to which one to choose?
Ans: In document style web services, we can transport an XML message as part of SOAP request which is not possible in RPC style web service. Document style web service is most appropriate in some application where XML message behaves as document and content of that document can alter and intention of web service does not rely on the content of XML message.
5. How to test API’s ?
Ans: To test the API’s you should follow the following steps
Select the suite in which you want to add the API test case
- Choose test development mode
- Develop test cases for the desired API methods
- Configure application control parameters
- Configure test conditions
- Configure method validation
- Execute API test
- View test reports
- Filter API test cases
- Sequence API test cases.
6. List out the tools or API for developing or testing web api?
Ans: Testing tools for web services for REST APIs includes
Spring REST web service using MVC
- Jersey API
7. What exactly do you know about the Rest API?
Ans: Developers often have to make requests and have to receive responses. REST API is nothing but a set of functions through which developers can perform the same task. The best thing is it can easily be accessed or can be made available through HTTP protocol. The developers can always make sure of reliability as well as the functionality of the tasks and the good thing is they are all similar to each other which makes them simple to handle and operate.
8. Explain API framework?
Ans: API framework is self-explanatory. Values for test run and for holding the configurable parts, config file is used. Automated test cases must represent in “ parse-table” format within config file. When testing API, it is not necessary to test each API so the config file have some section whose all API are activated for that specific run.
9. What Do You Understand By Payload In RESTFul Web Service?
Ans: Request body of every HTTP message includes request data called as Payload. This part of the message is of interest to the recipient.
We can say that we send the payload in POST method but not in and methods.
10. What are the tools used for API test automation?
Ans: While testing Unit and API testing, both target source code, if an API method is using code based on .NET then the tool which is supporting should have .NET
Automation tools for API testing can be used are
NUnit for .NET
JUnit for Java
11. Explain what is REST API?
Ans: It is a set of functions to which the developers performs requests and receive responses. In REST API interaction is made via HTTP protocol
REST – stands for Representational State Transfer, it is quickly becoming defacto standard for API creation.
REST stands for Representational State Transfer. REST is an architectural style of developing web services which take advantage of the ubiquity of HTTP protocol and leverages HTTP method to define actions. It revolves around resource where every component is a resource which can be accessed by a common interface using HTTP standard methods.
In REST architecture, a REST Server provides access to resources and REST client accesses and presents those resources. Here each resource is identified by URIs or global IDs. REST uses different ways to represent a resource like text, JSON, and XML.XML and JSON are the most popular representations of resources these days.
12. Explain the architectural style for creating web api?
Ans: The architectural style for creating web api are
HTTP for client server communication
XML/JSON as formatting language
Simple URI as the address for the services
13. What are the benefits of using IBM API connect according to you?
Ans: It is actually an approach that always makes sure of properly creating an API which is necessary to get errors free results. In addition to this, it is also necessary that API’s run in a reliable manner and can be managed securely. For all this, IBM API can simply be trusted. It is actually one of the best API lifecycle management solutions that are widely trusted.
14. In API document explain how to document each function ?What are the tools used for documentation?
Ans: Description: Small description about what a function does
Syntax: Syntax about the parameter of the code, the sequence in which they occur, required and optional elements etc.
Parameters: Functions parameters
Error Messages: Syntax of error messages
Example Code: Small snippet of code
Related Links: Related functions
Popular tools used for API documentations are JavaDoc.
15. State The Core Components Of An HTTP Request?
Ans: Each HTTP request includes five key elements.
The Verb which indicates HTTP methods such as GET, PUT, POST, DELETE. 2.URI stands for Uniform Resource Identifier (URI).It is the identifier for the resource on the server. 3. HTTP Version which indicates HTTP version, for example-HTTP v1.1. 4. Request Header carries metadata (as key-value pairs) for the HTTP Request message. Metadata could be a client (or browser) type, the format that client supports, message body format, and cache settings. 5. Request Body indicates the message content or resource representation.
16. Explain The Caching Mechanism?
Ans: Caching is a process of storing server response at the client end. It makes the server save significant time from serving the same resource again and again.
The server response holds information which leads a client to perform the caching. It helps the client to decide how long to archive the response or not to store it at all.
17. Explain The RESTFul Web Service?
Ans: Mostly, there are two kinds of Web Services which are quite popular.
SOAP (Simple Object Access Protocol) which is an XML-based way to expose web services.
Web services developed using REST style are known as RESTful web services. These web services use HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
18. What Purpose Does The OPTIONS Method Serve For The RESTful Web Services?
Ans: This method lists down all the operations a web service supports. It makes read-only requests to the server.
19. How does the API Builder work?
Ans: API Builder is a PLSQL program consists of four SQL files
For setting API parameters and starting the process one file is responsible
Two files are created for temporary tables and Master package to create the outputted code
Fourth file creates “spooled” output of the code into a file called “output_script_.sql”
2o. Explain what is TestApi ?
Ans: TestApi is a library of utility and test APIs that enables testers and developers to create testing tools and automated tests for .NET and Win32 application. It provides a set of common test building blocks, types, data-structure and algorithms.
21. Mention the steps for testing API ?
Ans: API testing steps
Select the test case that has to be fulfilled
For API call develop a test case
To meet the test case configure the API parameters
Determine how will you validate a successful test
Using programming language like PHP or NET execute the API call
Allow the API call to return the data to validate.
22. Mention, Whether You Can Use GET Request Instead Of PUT, To Create A Resource?
Ans: No, you shouldn’t use a PUT or POST method. Instead, apply the GET operation which has view-only rights.
23. What are the features of API connect for the core IT sector and what makes business trust this approach for large-scale deployments?
Ans: One of the leading features about the API Connect is it simply boost the rate of innovation in core IT sector. It makes language reading easy and at the same time help developers to impose a strict upper limit on the code while performing a specific task. Every customer can be paid special attention by any business with the help of this approach. Also, the delivery of services, as well as applications can be made better and up to an excellent extent. This is the reason why a lot of businesses are adopting it.
24. Write the procedure or the modules of creating an API in a stepwise manner?
8. Management and administration
In this to this, integration can also be done in case the need of same is felt.
25. What are the types of Bugs will API testing finds?
Ans: The types of Bugs, API will find Missing or duplicate functionality Fails to handle error conditions gracefully
- Unused flags
- not implemented errors
- Inconsistent error handling
- Multi-threading issues
- Improper errors.
26. Mention the key difference between UI level testing and API testing?
Ans: UI ( User Interface) refers to testing graphical interface such as how user interacts with the applications, testing application elements like fonts, images, layouts etc. UI testing basically focuses on look and feel of an application.
While, API enables communication between two separate software systems. A software system implementing an API contains functions or sub-routines that can be executed by another software system.
27. Mention what is JAX-WS and JAX-RS?
Ans: Both JAX-WS and JAX-RS are libraries (APIs) for doing communication in various ways in Java. JAX-WS is a library that can be used to do SOAP communication in JAVA, and JAX-RS lets you do the REST communication in JAVA.
28. Name any two important tasks that you need to perform when it comes to testing an API?
Ans: Configuring the application control parameters and view & execute the API test reports are the very important tasks.
29. What are the common tests performed on API’s?
Ans: The common tests performed on API’s
Verification of the API whether it is updating any data structure
Verify if the API does not return anything
Based on input conditions, returned values from the API’s are checked
Verification of the API whether it triggers some other event or calls another API.
30. Mention what is the difference between PUT and POST?
Ans: “PUT”puts a file or resource at a particular URI and exactly at that URI. If there is already a file or resource at that URI, PUT changes that file or resource. If there is no resource or file there, PUT makes one
POST sends data to a particular URI and expects the resource at that URI to deal with the request. The web server at this point can decide what to do with the data in the context of specified resource.
31. Mention what the main areas to be taken in consideration while writing API document ?
Ans: The key area to be considered when writing API documents are:
- source of the content
- Document plan or sketch
- Delivery layout
Information required for each function in the document
Automatic document creation programs.
32. What are the main challenges of API testing?
Ans: The main challenges in API testing is:
- Parameter Selection
- Parameter Combination
- Call sequencing.
33. Who can use IBM API connect and why?
Ans: IBM API is a good option to consider for those who are engaged in It operations, Developers and business promoters. It has been designed to help them in different aspects such as decision taking, reliable management of operations and helping programmers to ensure proper integration with each other.
34. What is API testing with runscope?
Ans: Runscope is a web application that provides backend services and easy to use interface for testing APIs.
35. What is API testing?
Ans: API (Application Programming Interface) specifies how some software components should interact with other, in other words it’s a set of functions and procedures that allows the creation of applications which access the features or data of an application or operating system. Testing of these functions is known as API testing.
36. Mention what are the different application integration styles?
Ans: The different integration styles includes
- Shared database
- Batch file transfer
- Invoking remote procedure (RPC)
Swapping asynchronous messages over a message oriented middle-ware (MOM)
37. What are the tools used for API testin?
Ans: The tools used for various API testing are
- SoapUI Pro
- LoadUI Pro
- Alertsite API monitoring
38. What is Input injection and what are different ways of doing it ?
Ans: Input Injection: It is the act of simulating user input, in several ways you can simulate user input.
- Direct Method Invocation
- Invocation using an accessibility interface
- Simulation using low-level input
- Simulation using a device driver
- Simulation using a robot
39. Explain what are the principles of API test design?
Ans: The principle for API test design are
Setup: Create objects, start services, initialize data etc
Execution: Steps to exercise API or scenario, also logging
Verification: Oracles to evaluate execution outcome
Reporting: Pass, failed or blocked
Clean up: Pre-test state
40. Explain how JAXB related to RESTful web api?
Ans: JAXB stands for java arch for xml binding.
41. Suppose you are writing an API document, what are the prime factors that you pay attention to?
Ans: While writing an API, the very first thing to consider is to provide the source of the content so that it can be assured that the outcome will be free from any form of errors. Next is to pay attention to the Delivery Layout. Users also need to provide the information for all the functions present in the document.
42.Name and compare the three editions of API Connect?
Ans: The three editions of API Connect ar
Essentials is available free of cost for developers and business. In this edition, no IDM support is available. Professional is the edition that can be considered for departmental use. It enables users to add nodes with a data center but there is a limit on the same. The third edition is the Enterprise which has all the features that can be accessed anytime. Full support of IBM is available all the time.
43 .While testing an API, is there always a need to test the entire API that are configured in the same file?
Ans: No, there is no need of same. This is because in a specific file, all API’s are similar in every aspect. Testing one means all other are tested.
44. How can you say that API testing is different from UI level testing?
Ans: Testing the graphical interface is generally considered as UI testing. It basically includes testing the ways users interact with the applications and its elements such as images. Its prime aim is to check whether the layout and the appearance of an application is fine or not. On the other side, API testing is meant to enable the communication among the software systems that are separate. Execution among different applications can be done through an API.
45. What exactly is the motive of API connect by IBM
Ans: IBM API aim is to make the application highly reliable and scalable. API’s are generally the data applications which are small in size and are meant to help experts in performing a specific task. IBM API cut down all the errors from the work of programmers and the key challenges that are associated with the integration approach.
46. Name one feature about IBM API Connect that makes it the ideal option to consider for any form of development process in the IT?
Ans: The API connect is capable to handle the multiple languages when it comes to development and supports all size applications. It is based on the frameworks of Node.js and Java and thus there is no need for the users to worry about anything when it comes to using them for the development and integration purposes.
47. What are the tests that you can perform on an API? Are these tests related to each other in some way?
Ans: API can be verified to know whether it’s updating any data structure or is not performing this task. This is actually the most common test that can simply be performed. All the returned values from an API can be checked and this is another common test. In addition to this, sometimes an API triggers another one without intimation and this is another test that needs to be performed.
48. What if one module of an API has data error in it? Can it be considered for further use?
Ans: Errors are quite common in API’s. However, this doesn’t mean that you can proceed with them further. There is always a need rectify the same for the purpose of integration. If modules have data error, there are chances that the entire project may get fail.