mochajs / mocha

☕️ simple, flexible, fun javascript test framework for node.js & the browser
https://mochajs.org
MIT License
22.53k stars 3k forks source link

Guide for setup Mocha with Node.js on TeamCity #295

Closed eshepelyuk closed 12 years ago

eshepelyuk commented 12 years ago

Hello

Is there any good guide to setup continuous integration process for running Mocha tests with node.js on TeacmCity , I've tried to play a lot with different reporters, but seems TeamCity doesn't understand the output of tests and no showing number of passed/failed tests

I'm using latest Mocha instaled with npm and TeamCity 6.5.5

tj commented 12 years ago

I didn't write that reporter I have no clue, before that I've never heard of teamcity

eshepelyuk commented 12 years ago
tj commented 12 years ago

it fully depends on the CI server... many allow arbitrary output and just work with the exit status, there's no Mocha limitation there at all, you have to research what you want for a CI server.

eshepelyuk commented 12 years ago

As far as in understand your point about return status - it means status of all tests run and this can only indicate OK or NOK for the whole build but not information about count of tests, exact failed/passed tests, stacktraces etc. Do you imply that such information should be retrieved from build output logs of CI server ? My question is about is there any CI server guide to show all detailed information about how to configure CI and Mocha maybe to show results of running tests including number of tests passed, number of tests failed, allowing navigation to failed tests, displaying stacktrace without inspecting output logs ?

tj commented 12 years ago

there's nothing I'm aware of, but like I said it will be more or less completely different per CI server. If you take something like cijoe it will just show you the terminal output, if it exits > 0 there's a failure, otherwise it's fine