October 2020
Intermediate to advanced
358 pages
8h 39m
English
An easy way to start testing your API is to focus just on the interface itself with what I call simple request tests, or SRTs. SRTs are just what the name sounds like: a simple HTTP request you can run to validate that the minimal elements of the API are working as you would expect. And that’s how I use SRTs—to validate the API.
Here are a few examples of SRTs used for testing an API that supports managing people’s contact information:
| | # person api test requests |
| | # 2020-02 mamund |
| | |
| | http://localhost:8181/ |
| | http://localhost:8181/list/ |
| | http://localhost:8181/filter?status=active |
| | http://localhost:8181/ -X POST -d \ |
| | id=q1w2e3r4&status=pending&email=test@example.org |
| | http://localhost:8181/q1w2e3r4 ... |