Software Testing
Software Testing Methodologies: Learn QA Models
What is Software Testing Methodology? Software Testing Methodology is defined as strategies and...
Before going to API Testing tutorial, let's first understand
API (Application Programming Interface) is a computing interface which enables communication and data exchange between two separate software systems. Software system that executes an API includes several functions/subroutines that another software system can perform. API defines requests that can be made, how to make requests, data formats that can be used, etc. between two software systems.
API TESTING is a software testing type that validates Application Programming Interfaces (APIs). The purpose of API Testing is to check the functionality, reliability, performance, and security of the programming interfaces. In API Testing, instead of using standard user inputs(keyboard) and outputs, you use software to send calls to the API, get output, and note down the system's response. API tests are very different from GUI Tests and won't concentrate on the look and feel of an application. It mainly concentrates on the business logic layer of the software architecture.
API automation Testing requires an application that can be interacted via an API. In order to test an API, you will need to
In this API testing tutorial, you will learn more about-
An output of API could be
Let's look at an example of each of the above Types in this api testing tutorial
Any Type of Data
Example: There is an API function which should add two integer numbers.
Long add(int a, int b)
The numbers have to be given as input parameters. The output should be a summation of two integer numbers. This output needs to be verified with an expected outcome.
Calling needs to be done such as
add (1234, 5656)
Exceptions have to be handled if the number is exceeding the integer limit.
Status (say Pass or Fail)
Consider the below API function -
They return any value such as True (in case of success) or false (In case of error) as an output.
A more accurate Test Case would be, can call the functions in any of the scripts and later check for changes either in the database or the Application GUI.
Calling of another API / Event
In this case, we call one of the API function which in turn will call another function.
For example - First API function can be used for deleting a specified record in the table and this function, in turn, calls another function to REFRESH the database.
Test cases of API testing are based on
API Testing Approach is a predefined strategy or a method that the QA team will perform in order to conduct the API testing after the build is ready. This testing does not include the source code. The API testing approach helps to better understand the functionalities, testing techniques, input parameters and the execution of test cases.
Following points helps the user to do API Testing approach:
Unit testing | API testing |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
API automation testing should cover at least following testing methods apart from usual SDLC process
Following tutorials provide a detailed guide to automate API test.
How to test API with REST Assured
Besides there are other tools for API testing. Check them here
Challenges of API testing includes:
API consists of a set of classes/functions/procedures which represent the business logic layer. If API is not tested properly, it may cause problems not only the API application but also in the calling application. It is an indispensable test in software engineering.
What is Software Testing Methodology? Software Testing Methodology is defined as strategies and...
What is Test Documentation? Test documentation is documentation of artifacts created before or...
What is Manual Testing? Manual testing is testing of the software where tests are executed...
Orthogonal Array Testing Orthogonal Array Testing (OAT) is software testing technique that uses...
What is Integration Testing? INTEGRATION TESTING is defined as a type of testing where software...
What is Automation Testing? Automation Testing or Test Automation is a software testing technique...