Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automated Unit testing for Javascript integrated with CruiseControl, nUnit, nAnt and ASP.net MVC

I work for a team of ASP.net MVC and they are using Cruisecontrol, nUnit and nAnt for the automated testing and build. I am new to the group and i handle the Javascript layer and i am looking for ways to incorporate my work with my teams workflow.

Are there any possoble way to do this?

Thanks

like image 943
brianff Avatar asked Oct 27 '22 06:10

brianff


2 Answers

A few thoughts:

  • There is JSUnit, a unit test framework for JavaScript. I used it a 2 years ago and it was pretty good. Something better may be out there now.
  • I assume they're using source code control of some form, and that Cruise Control monitors the repository. If so, then just make sure your JavaScript is kept in the same repo, so it will trigger builds, automatic kickoff of unit tests, etc.
  • If you have portions of your JavaScript layer that can only be tested in a browser, think about using Selenium or a similar tool to create a kind of automated tests that drive the browser through various scenarios. I'm sure there is a way to kick these off from Cruise Control.
like image 151
Charlie Flowers Avatar answered Nov 11 '22 15:11

Charlie Flowers


Just a couple of days ago, John Resig announced a JavaScript unit test automator he's working on called Test Swarm. It's just now going into alpha, but it might be worth watching.

like image 33
Andrew Hedges Avatar answered Nov 11 '22 16:11

Andrew Hedges