How to run Test explorer while running your Node.js NTVS project at the same time RRS feed

  • Question

  • I hit F5 to run the Node project and the Node command window opens and runs and then a browser opens and I can get the initial page request run. The problem is that I now want to run some Mocha or any type of test code. But in Visual Studio, the Test Explorer will now not let me run the tests. If I had not run the Node app, I could run them, but the problem is that I need to have the test scripts to HTTP calls to my node service to test it out! Anyone have a best practice here? I think I could open Visual Studio a second time and have a completely separate solution I open up that has the test JavaScript code. Or, I guess I could open up the node command prompt outside of visual studio and run my node app and then use visual studio to use Test Explorer. I just need to know the recommended practice for creating and running unit tests that do HTTP calls to my Node listener to pick up at the same time.
    Friday, October 16, 2015 5:13 PM


  • Hi eljamaki,

    Not debugging (F5) your app, just run it using "Start without debugging(Ctrl+F5)", and then you could run your test in the test explorer windows.

    But if you debug other app, it really has a limitation to run the test in the test explorer windows if all projects are in the same solution.



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by eljamaki Tuesday, October 20, 2015 3:47 PM
    Monday, October 19, 2015 4:17 AM