Author image David E. Wheeler
and 1 contributors


Test.Harness.Director - Run TAP standard JavaScript test scripts with statistics in Director




STOP! If all you want to do is write a test script, consider using Test.Simple. Test.Harness is the module that reads the output from Test.Simple, Test.More and other modules based on Test.Builder. You don't need to know about Test.Harness to use those modules.

Test.Harness.Director runs JavaScript tests in Director and expects to get the results from the TestResults attribute of the Test.Builder object constructed by each test script. These results conform to a format called TAP, the Test Anything Protocol. It is defined in See Test.Harness for details on the output.

Class Methods

  Test.Harness.Director.runTests('javascript_funtion_1', 'javascript_funtion_2');

Constructs a new Test.Harness.Director object and calls its runTests() instance method, passing all arguments along.


  var harness = new Test.Harness.Director();

Constructs a new Test.Harness.Director object.

Instance Methods

  harness.runTests('javascript_funtion_1', 'javascript_funtion_2');

This method runs all the given test functions and divines whether they passed or failed based on the contents of the TestRusults attribute of their global Test.Builder.Test object. It prints out each individual test that failed along with a summary report and a how long it all took. When all tests have been run, a diagnostic message will be output. See Test.Harness for details on the output.

See Also

To actually use this module, there is a a fair amount of Director scaffolding required. See for additional downloads and documentation.

Test.Harness, the base class for this class.

Test.Simple and Test.More, modules with which to write tests.


Gordon McCreight <> and David Wheeler <>.


Copyright 2005 by David Wheeler <>

This program is free software; you can redistribute it and/or modify it under the terms of the Perl Artistic License or the GNU GPL.

See and

1 POD Error

The following errors were encountered while parsing the POD:

Around line 58:

You forgot a '=back' before '=head1'