API protocols are standardized communication formats that define how different systems exchange data over networks.
Protocols are like languages - they define the format, rules, and standards for communication. REST is the most common modern protocol, using standard HTTP methods. SOAP is older and heavier but more structured. Understanding protocols is essential for effective API testing because each has different characteristics and testing approaches.
| Method | Purpose | Example |
|---|---|---|
| GET | Retrieve data | GET /api/users/123 |
| POST | Create new resource | POST /api/users |
| PUT | Update entire resource | PUT /api/users/123 |
| DELETE | Delete resource | DELETE /api/users/123 |
Scenario: You're assigned to test a legacy banking system that uses SOAP API and a modern mobile app that uses REST API. Both systems need to transfer funds between accounts. Explain how you would test both, highlight the differences in testing approaches, and recommend which protocol is better for new features.