Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript Unit Tests with Team Foundation Server Build

We are using Team Foundation Server 2010 and we have some JavaScript unit tests running on our local machines using Jasmine.

We are using the workflow based builds.

Has anyone had any success running Jasmine tests during their builds? Can you break the build if the Jasmine tests fail?

like image 698
Paul Oliver Avatar asked Apr 13 '12 20:04

Paul Oliver


2 Answers

The way I've seen this done is using the Chutzpah Test Runner available on CodePlex: http://chutzpah.codeplex.com/

This allows you to run Jasmine/QUnit tests from a command-line which can then be easily integrated with a TFSBuild using the InvokeProcess Activity.

like image 157
Dylan Smith Avatar answered Nov 06 '22 16:11

Dylan Smith


you should checkout http://www.codit.eu/blog/2015/03/18/continuous-integration-with-javascript-nunit-on-tfsbuild-(part-23)/

The blogpost describes a complete scenario how to execute your JavaScript Unit tests on the Team Foundation Build server. Basically it uses Grunt (taskrunner) and Powershell. It also has an example of code coverage reports that you can use.

like image 23
emp Avatar answered Nov 06 '22 15:11

emp