My VS Code Setup To Practice TDD When Developing REST APIs
· One min read
A lot of people I know will repeatedly alternate between writing an endpoint in their IDE and Postman/Swagger to test it. I do not like this workflow because of the constant context switching. I also find that it's easy to forget to test a scenario or to test the wrong scenario. I've found that it's much easier to test the API in the IDE itself.
I personally prefer the Test Driven Development (TDD) approach. I find that it helps me to write better code and to think about the API design before I actually start writing code. I also find that it helps me to write better tests and to think about the different scenarios that I need to test for.
So, how can we do this in VS Code?