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:
- IeUnit scripts test directly against real browser with
real JavaScript engine, and thus provide higher confidence than other
frameworks which test against simulated (and complex) browsers and JavaScript
engines.
- IeUnit test scripts are in JavaScript which is widely
used and well documented. There is no need to learn proprietary scripting
languages.
- IeUnit offers a very simple installation procedure. There
is no need to install other depended libraries except the major Windows
system components. If you know JavaScript and DHTML you can install
IeUnit and start coding test cases within minutes.
- IeUnit allows extension in an object oriented way. You
can integrate you own test classes or test suites by dropping in you
code into pre configured directories.
- IeUnit provides a script helper, QuickFocus (screenshots),
that enables users to inspect web pages and generate script code with
mouse clicks.
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:
- James X. Li (VisuMap
Technologies Inc., Calgary, Canada)