Testing JavaScript Blocks with Team Foundation Server Build

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

We use assemblies based on the sequence of actions.

Has anyone had successful Jasmine tests during their build? Can you break the assembly if Jasmine’s tests fail?

+7
source share
2 answers

The way I did this was using the test runner Chutzpah, available on CodePlex: http://chutzpah.codeplex.com/

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

+7
source

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

The blog post describes a complete script on how to run your JavaScript module tests on a Team Foundation Build server. It mainly uses Grunt (taskrunner) and Powershell. It also has an example of code coverage reports that you can use.

+1
source

All Articles