Clone wiki

qunit-webdriver-runner / Home


This is a very simple runner of QUnit tests that can be integrated into a Maven project.

How does it work?

  • The module assumes that all your javascript, html and css files (product and test) are included as resources.
  • At the beginning of your test, start a QunitWebDriver passing the class loaders that are capable of locating all your resources.
  • QunitWebDriver will start a Jetty webserver that can serve requests from the resource files.
  • QunitWebDriver will then download, configure and start an instance of FireFox browser using WebDriver.
  • Lastly, you call QunitWebDriver.runTest() passing the html page that will load qunit and run your tests.
  • QunitWebDriver checks the UI of the page to verify that no test has failed.


Build or download the .jar and include it in your project (sorry, I don't have a Maven repo available!). In the sample below, I copied the .jar into the /lib folder of my project



This is what a test looks like

public class QunitTest {

    public static QunitWebDriver driver;

    public static void start() throws Exception
        // these are the class loaders particular to my project
        driver = QunitWebDriver.start(

    public void test()

    public static void stopServer() throws Exception


A sample project that uses the runner can be found here:

- Federico