Add Karma unit tests out of the box

We would love to see support out of the box for karma unit tests:

http://karma-runner.github.io/0.13/index.html

We can run it as a command in the meantime, so don’t worry too much about it, but would be nice if there was a simple step I could add instead.

If relevant, here are the steps:

1) Install npm on the build agent
2) Install the following npm packages:

a) npm install -g karma
b) npm install -g karma-jasmine
c) npm install -g karma-chrome-launcher

3) Add a build agent property:

Namespace: Karma
Run on: Agent
Type: Path finder plugin
Property name: Path
Executable: karma.cmd
Search paths: %APPDATA%\npm and %PATH%

4) Add a run executable action:

Executable path: $Agent.Karma.Path$
Working directory: %RepositoryPath%\src%ProjectName%.Tests\
Arguments: start --single-run

Hi Geert,

Thanks for this request and the steps. Karma is on our to-do list under Javascript unit testing frameworks alongside mocha, jasmine and qunit. We choose only to implement mocha for 1.7 but will get on to the others eventually.



Thanks and sorry for the late reply. Somehow I don’t get any notifications any longer for updates on the forums.

Currently using karma with junit export if you want unit tests to show up, as a hint if anyone wonders.