* ISTQB Certified Software Tes
1 posts
API TESTING:-
What is an API?
Let’s see some examples of an API in a more approachable way.
What is API Testing?
Let’s see how is UI testing is not similar to API testing:-
API Testing Types:-
API testing typically involves the following practices:
Common tests on APIs:-
Some of the common tests we perform on APIs are as follows:-
1. To verify whether the return value is based on input condition. Response of the APIs should be verified based on the request.
2. To verify whether the system is authenticating the outcome when the API is updating any data structure
3. To verify whether the API triggers some other event or request another API
4. To verify the behavior of the API when there is no return value
Advantages of API Testing:-
1. API Testing is time effective when compared to GUI Testing. API test automation requires less code so it can provide faster and better test coverage.
2. API Testing helps us to reduce the testing cost. With API Testing we can find minor bugs before the GUI Testing. These minor bugs will become bigger during the GUI Testing. So finding those bugs in the API Testing will be cost effective to the Company.
3. API Testing is language independent.
4. API Testing is quite helpful in testing Core Functionality. We can test the APIs without a user interface. In GUI Testing, we need to wait until the application is available to test the core functionalities.
5. API Testing helps us to reduce the risks. What exactly needs to be verified in API Testing? 1. Basically, on API Testing, we send a request to the API with the known data and we analyse the response. 2. Data accuracy 3. HTTP status codes 4. Response time 5. Error codes in case API returns any errors
6. Authorization checks
7. Non functional testing such as performance testing, security testing
Tools used for API Testing:-
Some of the tools used for API Testing are as follows:-
1. Postman
2. Katalon Studio
3. SoapUI
4. Assertible
5. Tricentis Tosca
6. Apigee
7. JMeter
8. Rest-Assured
9. Karate DSL
10. API Fortress
11. Parasoft
12. HP QTP(UFT)
13. vREST
14. Airborne
15. API Science
16. APIary Inspector
17. Citrus Framework
18. Hippie-Swagger
19. Httpmaster Express
20. Mockbin
21. Ping API
22. Pyresttest
23. Rest Console
24. RoboHydra Server
25. SOAP Sonar
26. Unirest
27. WebInject
Difference between API testing and Unit Testing:-
UNIT TESTING:-
1. Unit testing is conducted by Development Team
2. Unit testing is a form of White box testing
3. Unit testing is conducted prior to the process of including the code in the build
4. Source code is involved in Unit testing
5. In unit testing, the scope of testing is limited, so only basic functionalities are considered for testing
API TESTING:-
1. API testing is conducted by QA Team
2. API testing is a form of Black box testing
3. API testing is conducted after the build is ready for testing
4. Source code is not involved in API testing
5. In API testing, the scope of testing is wide, so all the issues that are functional are considered for testing
Challenges in API testing:-
Some of the challenges we face while doing API testing are as follows:-
1. Selecting proper parameters and its combinations
2. Categorizing the parameters properly
3. Proper call sequencing is required as this may lead to inadequate coverage in testing
4. Verifying and validating the output
5. Due to absence of GUI it is quite difficult to provide input values
Types of bugs we face when performing API testing:-
Issues observed when performing API testing are
1. Stress, performance, and security issues
2. Duplicate or missing functionality
3. Reliability issues
4. Improper messaging
5. Incompatible error handling mechanism
6. Multi-threaded issues
7. Improper errors
API Testing Best Practices:-
1. Test for the expected results
2. Add stress to the system by sending series of API load tests
3. Group API test cases by test category
4. Create test cases with all possible inputs combinations for complete test coverage
5. Prioritize API function calls to make it easy to test
6. Create tests to handle unforeseen problems
7. Automate API testing wherever it is possible.
Please log in to leave a comment.
Good content nicely ordered. thanks for the sharing.