I am building a RESTful API, and so far, to make sure that my resources work as I need them to, I am using a REST client called Postman. This makes it easy for me to store routes and quickly make requests to them for testing. My current collection of routes in Postman looks like this:
The trouble with testing the API is this way is I have to manually change resource IDs. For example, if I want to test the
PUT method on my posts resource, I have to first create a resource, find the ID, and then paste it into the
PUT URI. This is long!
What is considered professional practice for building a RESTful API? Should I be writing unit tests for each route, dynamically creating the post before testing methods like update?