I have a restful style nodejs service that does not have an interface, it just takes data and then does something with it.
I have a module that tested most of the method level materials that I want, but now I want to basically do some automated tests to prove that it all works together. When I use ASP.MVC and IIS, since the server is always on, so I just configure the script (insert the dummy guff in the DB), then do the HttpRequest and send it to the server and claim that I am returning what I expect.
However, there are several problems in nodejs, since applications must be run through the command line or some other mechanism, so given that I have app.js that will start listening, is there any way for me to automatically launch this before I ran my tests and then close it after completing my tests?
I am currently using Yadda with Mocha for my testing, so I can save it in BDD style, however I hope that launching the web application is an agnostic of the frameworks I use.
source
share