最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Easy way to integrate Jasmine JavaScript unit testing with TFS Build CI - Stack Overflow

programmeradmin2浏览0评论

I've been writing JavaScript unit tests using Jasmine. However, those tests run inside a browser, not as part of MSTest.

I want my TFS Continuous Integration builds to break when a JavaScript unit test fails. I know there is a solution for this in Visual Studio 2012, but I'm on 2010 (and will be for a long time in the future probably).

Is there an easy way to integrate Jasmine based JavaScript unit tests with TFS Build?

I've been writing JavaScript unit tests using Jasmine. However, those tests run inside a browser, not as part of MSTest.

I want my TFS Continuous Integration builds to break when a JavaScript unit test fails. I know there is a solution for this in Visual Studio 2012, but I'm on 2010 (and will be for a long time in the future probably).

Is there an easy way to integrate Jasmine based JavaScript unit tests with TFS Build?

Share Improve this question asked Jul 12, 2012 at 5:56 user1147862user1147862 4,2268 gold badges39 silver badges56 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

The Chutzpah test runner enables you to run your QUnit and Jasmine JavaScript unit tests from the mand line or Visual Studio.

Therefore you should be able to integrate it into your TFS build via the InvokeProcess activity.

I'd use nodejs + jasmine-node, but you can also look at http://phantomjs/ with a junit reporter. Jasmine-node provides a junit reporter with the --junitreport output. You might also look at the TFS Build Extensions (http://visualstudiogallery.msdn.microsoft./2d7c8577-54b8-47ce-82a5-8649f579dcb6/view/Discussions/) and the activities in there. It includes a xml transform for JUnit to TRX (test results xml) which can be pushed into TFS.

发布评论

评论列表(0)

  1. 暂无评论