How do you test your REST API?

faraazahmad

Syed Faraaz Ahmad

Posted on March 13, 2020

How do you test your REST API?

I have a basic REST API in a server file. If I want to run tests on the routes, how do I do so?

I can think of 2 ways to do so:

  1. In the test command, first start the server using a child process and then send requests to localhost in the unit tests.

  2. Write unit tests for all the functions I've written in my code and run them without running the server (Does this mean I can't do integration testing?)

I'm really not sure what to do, I need help.

💖 💪 🙅 🚩
faraazahmad
Syed Faraaz Ahmad

Posted on March 13, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

How do you test your REST API?
question How do you test your REST API?

March 13, 2020