“ JavaScript application testing has a well-earned reputation for being a giant pain in the ass. Existing solutions suffer from complex setup, difficult APIs, lack of automation, or expensive licensing fees. But there’s no denying that solid testing is the key to a better quality, more maintainable app. And that’s where FuncUnit comes in. FuncUnit is a free, open source JavaScript web application testing framework that’s powered by jQuery, Selenium, QUnit, and Envjs. It provides: - Functional testing. Simulates clicks, keypresses, and drags to test event handling and UI changes. - Easy syntax. It’s jQuery and QUnit syntax, natural for any jQuery developer. - Run with just a browser.

Developers run tests as they work to prevent regressions. - Run the same test automated. QA can run nightly scripts that test every supported browser - Simple setup. All you need is a browser. Come join us as we cover these features and more in a live demo. We’ll walk through setting up, writing, and running tests on a complex, AJAX heavy jQuery application. Come learn how to be a master of application testing!”

My thoughts

FuncUnit rock the house. You get all the qUnit stuff, but you can also use selenium, writing test with javascript.

Here what would look like a typical test:

test("JavaScript results",function(){
  // wait until we have some results
    equal( S('.autocomplete_item').size(), 5, "there are 5 results")

Once your tests are ready, you can launch functional tests in firefox and ie in command line:

envjs ../../pages/mypage_test.html

Basically it makes writing tests as easy as possible for javascript developers.

One thought on “#jqcon – funcUnit: Selenium and qUnit glory

  1. Any chance you could explain how “but you can also use selenium, writing test with javascript” would be implemented?

Comments are closed.