Here is a note, on how to run your
javascript unit tests (which you can write using qUnit test framework) in Visual
Studio 2012.
Javascript unit tests - Visual Studio 2012 integration:
1.
Install Chutzpah Test Adapter
This extension allows you to run javascript
unit tests, from within the Test
Explorer pane of Visual Studio.
In Visual
Studio, select the Tools | Extensions
and Updates … menu.
Select Online.
Select the search icon, located at the top
right.
Type Chutzpah.
Navigate to Chutzpah Test Adapter for Visual Studio 2012.
Select Download.
Follow the prompts, to install.
2.
Install Chutzpah Test Runner
This extension allows you to run javascript
unit tests, from the Solution Explorer
in Visual Studio.
It also allows you to launch the tests in a
browser, which is important for javascript development.
In Visual
Studio, select the Tools | Extensions
and Updates … menu.
Select Online.
Select the search icon, located at the top
right.
Type Chutzpah.
Navigate to Chutzpah – A JavaScript Test Runner.
Select Download.
Follow the prompts, to install.
Your Extensions
and Updates window should now look a bit like this:
3. Restart Visual Studio.
The
Chutzpah tools are now installed.
___________________________________
screenshots
Here is a screenshot, of javascript unit tests running within Visual Studio 2012:
Here is a screenshot, of javascript unit tests running from a browser (launched from with Visual Studio 2012 -> Solution Explorer pane):
if you find that some or all of your tests are failing, when run from Test Explorer, then see this post:
ReplyDeletehttp://antipatterns.blogspot.nl/2013/01/tests-fail-with-errors-when-using.html