API Testing
API Testing
What is an API?
An Application Programming Interface (API) is a set of rules that allow different software
applications to communicate with each other. APIs define the methods and data formats that
applications can use to request and exchange information.
Key Concepts:
● Types of APIs: Web APIs, Library APIs, Operating System APIs, etc.
● RESTful APIs: APIs that follow REST (Representational State Transfer) architecture,
using standard HTTP methods.
● SOAP APIs: Use XML-based messaging for communication.
● GraphQL APIs: Allow fetching specific data instead of entire resources.
1. Test Case ID: Unique identifier for each test case
2. Test Scenario: Description of what is being tested
3. Preconditions: Any required setup before testing
4. Request Details: API endpoint, method, headers, parameters
5. Expected Response: Expected status code and response body
6. Actual Response: Captured response details
7. Pass/Fail Criteria: Whether the test passed based on expected vs. actual output
Method POST
Endpoint /api/login
Pass/Fail Pass
Method GET
Endpoint /api/user/profile
Pass/Fail Pass
Endpoint /api/user/email
Pass/Fail Pass
Method DELETE
Endpoint /api/user/delete
Pass/Fail Pass