views:

199

answers:

2

I want to start unit testing my javascript files as part of my build process in an MVC application I am building using jquery and jqueryUI.

I know how to use qunit and jsunit but I want to try and get VS to run these tests and integrate the results into my build process.

Has anyone got any ideas on where to begin with this? General pointers on where to begin would be as useful as solutions.

+4  A: 

Take a lookt at JSUnit MSBuild task. I'm sure there's something similar for qunit, JSSpec, etc.

mgroves
+1  A: 

the build task suggested by mgroves worked however it only unit tested the functions and not the javascript events.

I discovered Watin pronounced "What-In". This allows you to fully control web browser and interact with the loaded web pages. IT's early days yet but I think this is a very useful way forward.

Matt Smith
some might not consider Watin tests to be "unit" tests, but yeah Watin is cool :)
mgroves