An easy way to integrate Jasmine JavaScript testing with TFS Build CI

I wrote JavaScript tests using Jasmine. However, these tests are performed inside the browser, and not as part of MSTest.

I want my TFS Continuous Integration assemblies to crash when the JavaScript unit test fails. I know there is a solution in Visual Studio 2012, but I am in 2010 (and will probably be a long time in the future).

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

+6
source share
2 answers

Chutzpah test runner allows you to run your QUnit and Jasmine JavaScript test tests from the command line or Visual Studio.

Therefore, you should be able to integrate it into your TFS assembly using the InvokeProcess operation.

+7
source

I would use nodejs + jasmine-node, but you can also look at http://phantomjs.org/ with a junit reporter. Jasmine-node provides a junit reporter with the --junitreport output. You can also watch the TFS build extensions (http://visualstudiogallery.msdn.microsoft.com/2d7c8577-54b8-47ce-82a5-8649f579dcb6/view/Discussions/) and the actions there. It includes the conversion of xml for JUnit to TRX (xml test results) that can be ported to TFS.

0
source

Source: https://habr.com/ru/post/920287/


All Articles