BT

InfoQ Homepage News Integrate JavaScript Tests Into Your Development Workflow

Integrate JavaScript Tests Into Your Development Workflow

Bookmarks

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
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.

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

Community comments

  • Chutzpah is not TFS only

    by Matthew Manela /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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 /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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 /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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 /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.