IeUnit

version 2.3


First Release: Oct/29/2002
Last Updated: Dec/15/2006

IeUnit is a simple framework to test logical behaviors of web pages. It helps software engineers to create, organize and execute functional unit tests.

The architecture of IeUnit is based on the xUnit framework that has been adapted to various languages and platforms. IeUnit is implemented in JavaScript language and tailored to Windows platform. By leveraging services provided by Internet Explorer browser, its DHTML model and related COM technologies IeUnit offers a simple and efficient test framework.

Main features of IeUnit are:

The following is a simple test case with IeUnit framework:

function HelloWorldTest() {
    assimilate(this, new IeUnit());

    this.setUp = function() {
        this.openWindow("http://localhost/HelloWorld.html");
    };

    this.tearDown = function() {
        this.closeWindow();
    };

    // Verify that the page contains only the text "Hello World!"
    this.testCheckText = function() {
        this.assertPageHasText("Hello World!");
    };

    // Verify that the style of the text is the HTML element H1
    this.testCheckStyle = function() {
        this.assertEquals("H1", this.findByText("Hello").tagName);
    };
}

The following shows the execution of above test case:

C:\Program Files\IeUnit\samples\HelloWorld>StartTest HelloWorldTest.jst

Running case HelloWorldTest ...
RptTest: testCheckText:                 OK
RptTest: testCheckStyle:                OK
RptCase: HelloWorldTest:                successes: 2, failures: 0
RptSuite: Total Duration: 4.375sec,          Successes: 2, Failures: 0


Online Demo


The integrated GUI script helper QuickFocus significantly reduces the learning curve and simplifies the script development process.  The following flash demos show how QuickFocus works:

License

IeUnit is released under the MIT License

Developer Information


Project Administrator:

Contributors: