BT

Your opinion matters! Please fill in the InfoQ Survey!

Integrate JavaScript Tests Into Your Development Workflow

| by Roopesh Shenoy  Followers on Jul 13, 2012. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

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. 

Rate this Article

Adoption Stage
Style

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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT