views:

116

answers:

3

Hi Can somebody fill me in on JavaScript Testing Frameworks?

I'm working on a project now and as the JS (Mostly jQuery) libraries grow, it's getting more and more difficult to introduce change or refactor, because I have no way of guaranteeing the accuracy of the code without manually testing everything.

I don't really know anything about JavaScript Testing Frameworks, or how they integrate/operate in a .Net project, so I thought I'd ask here.

What would a good testing framework be for .Net? What does a JavaScript test look like? (e.g. with NUnit, I have [TestFixture] classes & [Test] methods in a ProjectTests assembly) How do I run a javascript test? What are the conceptual differences between testing JS & testing C#? Is there anything else that would be worth knowing?

Thanks

Dave

+2  A: 

As for jQuery testing(and Javascript testing in general) you should maybe take a look at QUint, jQuerys testing suite. You simply include a couple of javascript-files, and a css-stylesheet, write your testes in the same document(or if you want to include them of course), and open the document. The testing framework sets up the page, and lets you run the test.

As for implementation with C# and .Net I can't help you.

tdolsen
+1  A: 

You should at least be aware of jsUnit.

John
+1  A: 

Already lot of questions (and replies) about this subject on stack overflow:

Kartoch