2/21/19

Webservices/API Testing FAQ’s Part 1

1.What is Client and Server?
  • A server is a connection point for several clients, that will handle their requests. A client is software that (usually) connects to the server to perform actions. The client provide a user interface that allows users to carry out actions.
2. What is Presentation, Business & Database Layer
3. What is an API? Can you give some Examples?
  • An API (Application Programming Interface) is a software intermediary that enables two applications to communicate with each 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
  • API examples:
  • Google Maps API, Amazon Advertising API, Twitter API, YouTube API, etc.
4. What are main differences between API and Web Service?
  • All Web services are APIs but not all APIs are Web services.
  • Web services might not contain all the specifications and cannot perform all the tasks that APIs would perform.
  • A Web service uses only three styles of use: SOAP and REST for communication whereas API may be exposed to in multiple ways.
  • A Web service always needs a network to operate while APIs don’t need a network for operation.
5. Who can use a Web API?    
  • Web API can be consumed by any clients which support HTTP verbs such as GET, PUT, DELETE, POST.
  • Since Web API services do not require configuration, they can be easily used by any client.
  • In fact, even portable devices such as mobile devices can easily use Web API.
6. What is API Testing?
  • API testing is a kind of software testing which determines if the developed APIs meet expectations regarding the functionality, reliability, performance, and security of the application.
7. What are the advantages of API Testing? 
  • API testing provides access to the application without a user interface. The core and code-level of functionalities of the application will be tested and evaluated early before the GUI tests. This will help detect the minor issues which can become bigger during the GUI testing.
  • API testing usually is less time consuming than functional GUI testing.
  • API test automation requires less code so it can provide better and faster test coverage compared to GUI test automation.
  • In API testing, data is exchanged using XML or JSON. These transfer modes are completely language-independent, allowing users to select any code language when adopting automation testing services for the project.
8. What are differences between API Testing and Unit Testing?
9. What are the types of webservices?
  • Rest (Representational state transfer)
  • SOAP (Simple Object Access Protocol)
10. SOAP vs REST Web Services
11. What are the common API testing types?
  • Functional Testing
  • Load testing
  • Runtime/ Error Detection
  • Security testing
  • Penetration testing
  • Fuzz testing
  • Interoperability testing
12. What must be checked when performing API testing?
  • During the API testing process, a request is raised to the API with the known data. This way you can analyze the validation response. While testing an API, you should consider:
  • Accuracy of data
  • Schema validation
  • HTTP status codes
  • Data type, validations, order and completeness
  • Authorization checks
  • Implementation of response timeout
  • Error codes in case API returns, and
  • Non-functional testing like performance and security testing
13. What is the best approach method to perform API testing?
  • The following factors should be considered when performing API testing:
  • Defining the correct input parameters
  • Verifying the calls of the mixture of two or more added value parameters
  • Defining the basic functionality and scope of the API program
  • Writing appropriate API test cases and making use of testing techniques such as equivalence class, boundary value, etc. to check the operability.
  • Testing case execution
  • Comparing the test result with the expected result
  • Verifying the API behavior under conditions such as connection to files and so on.
14. What are tools could be used for API testing?
A few of common tools are:
  • Postman
  • SoapUi
  •  Tosca
  • Apigee
  • Katalon Studio  etc.
15. What are major challenges faced in API testing?
  • Parameter Selection
  • Parameter Combination
  • Call sequencing
  • Output verification and validation
  • Another important challenge is providing input values, which is very difficult as GUI is not available in this case.
16.  What kinds of bugs that API testing would often find?
  • Missing or duplicate functionality
  • Fails to handle error conditions gracefully
  • Stress
  • Reliability
  • Security
  • Unused flags
  • Not implemented errors
  • Inconsistent error handling
  • Performance
  • Multi-threading issues
  • Improper errors
17. What is API documentation?
  • The API documentation is a complete, accurate technical writing giving instructions on how to effectively use and integrate with an API.
  • It is a compact reference manual that has all the information needed to work with the API.
18. What are API documentation templates that are commonly used?
  • Swagger
  • Miredot
  • Slate
  • FlatDoc
  • API blueprint
  • RestDoc
  • Web service API specification

0 comments:

Post a Comment