BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Integrate JavaScript Tests Into Your Development Workflow

by Roopesh Shenoy on Jul 13, 2012 |

Chutzpah can run JavaScript tests from inside Visual Studio 2012. And TFS extends this by allowing you to run JavaScript Unit tests into your builds.

Visual Studio 2012 comes with much better unit testing support and supports several open source frameworks through a plugin architecture for test runners. Chutzpah leverages this to bring JavaScript Unit testing within Visual Studio. One interesting thing is that you can mix your C# and .js tests in a single run, instead of having to run them separately. You can read Anatomy of the Chutzpah test Adapter… by Matthew to learn more about how this Test Adapter works or even how to write your own adapter.

Chutzpah supports both QUnit and Jasmine testing frameworks. This article from the Visual Studio ALM team gives more details about how to setup TFS build runners to run these tests.

Note that Chutzpah also supports TeamCity. And if you don’t use TFS or TeamCity for running your builds? You could use the Chutzpah command line api to integrate it into your build server. You can even use other tools such as js-test-driver or PhantomJS

Visual Studio 2012 RC brings several other unit testing improvements as well, such as a continuous test runner, Smart test discovery and several enhancements for Metro Unit Testing. 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Chutzpah is not TFS only by Matthew Manela

Chutzpah does not require TFS to function. It has an API and a console application than can run JS tests directly. Chutzpah has been used succesfully for CI builds in TeamCity and in Jenkins.

Re: Chutzpah is not TFS only by Roopesh Shenoy

Noted (and updated) - Thanks. I couldn't find any reference for out-of-the-box integration with Jenkins similar to TFS/TeamCity, but you are right, the command line api can be used to wire it up. Is there any other API (other than the command-line)?

Re: Chutzpah is not TFS only by Matthew Manela

I have been looking into adding support for outputting the JUnit style xml file which would allow Jenkins to easily pick up the test results. Outside of that someone would have to implement that themselves by referencing the chutzpah.dll.

Re: Chutzpah is not TFS only by Roopesh Shenoy

Great. Thanks Matthew - as a .NET + Javascript developer myself, your work is highly appreciated!

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

4 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT