giovedì, settembre 06, 2007

[jsn]Configuring JSUnit for Visual Studio 200X

I want to share this things, because today it take me a while to get the hang of it.
I now going to explain how to integrate JSUnit into your visual studio 2005/2008 Express/Standard/* version.
the procedure is the same, so now I show you what you need:

I only get this method work on firefox, probably because an IE restriction on file: protocol,
is not mandatory but i reccomend to install this both plugin for Firefox:
Firebug and web developer toolbar

Ok,
  1. open up Visual Studio

  2. On the menu go under Tools (Alt+T)- External Tools (E)

  3. Click on the Add button

  4. in the title box write "JSUnit"

  5. click on the "..." button to search your firefox executable (probably under "C:\Program Files\Mozilla Firefox\firefox.exe") and fill the Command Box

  6. on the Arguments box write "file://path/to/jsUnit/testRunner.html?testPage=$(ItemPath)&autoRun=true"

  7. Click on the OK button



where path/to/jsUnit is the path where you install your jsunit copy.


to test it open the file
path/to/jsUnit/tests/jsUnitAssertionTests and from Tools select JSUnit.

ps.following the instruction on this page
you can also install javascript lint :D
Posta un commento