javascriptjquerybrowseracceptance-testing

What JavaScript UI testing framework should I use for a simple HTML5 + jQuery app?


I'm about to write a simple HTML5 + JavaScript (jQuery) app in my spare time in order to keep up with the latest web technologies (at work it's more advanced C# backend stuff).

I'd like to develop in the same fashion that I've done for the last ten years or so, namely TDD style.

Being new to the TDD/BDD/AcceptanceTDD world in HTML/JavaScript, my question is: is there a great framework or the like for writing test against a web page in a browser (out-of-the-box support for many browsers being a definitive plus)?

The reason I'd like to use JavaScript is two-fold. 1. I'd like to learn more JavaScript, and 2. I'd like to use the same language(s) for the tests as I do for development.

Otherwise, I could simply use my C# skills and use Selenium, WatiN, or a similar framework.

I've found Jasmine, QUnit, and a homegrown solution using jQuery at MSDN, but don't get a feel for the flow nor complexity, so recommendations and first hand experiences are more than welcome.


Solution

  • I ended up using QUnit since I found it very simple to just insert the PUT (Page Under Test) in an <iframe>, and use jQuery to access it from the unit tests.

    That way I don't need any other external dependencies other than the browser itself (the logic resides 100% in the client) and any text editor.