+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainer.html b/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainer.html
new file mode 100644
index 0000000..df6a997
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainer.html
@@ -0,0 +1,16 @@
+
+
+
+
+ JsUnit Test Container
+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainerController.html b/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainerController.html
new file mode 100644
index 0000000..3130d76
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/app/testContainerController.html
@@ -0,0 +1,77 @@
+
+
+
+
+ JsUnit Test Container Controller
+
+
+
+
+Test Container Controller
+
+
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/app/xbDebug.js b/ant-jsunit-hieatt/trunk/lib/jsunit/app/xbDebug.js
new file mode 100644
index 0000000..b7167ec
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/app/xbDebug.js
@@ -0,0 +1,306 @@
+// xbDebug.js revision: 0.003 2002-02-26
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ * Full Terms at /xbProjects-srce/license/mpl-tri-license.txt
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Netscape code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Bob Clary
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ChangeLog:
+
+2002-02-25: bclary - modified xbDebugTraceOject to make sure
+ that original versions of wrapped functions were not
+ rewrapped. This had caused an infinite loop in IE.
+
+2002-02-07: bclary - modified xbDebug.prototype.close to not null
+ the debug window reference. This can cause problems with
+ Internet Explorer if the page is refreshed. These issues will
+ be addressed at a later date.
+*/
+
+function xbDebug()
+{
+ this.on = false;
+ this.stack = new Array();
+ this.debugwindow = null;
+ this.execprofile = new Object();
+}
+
+xbDebug.prototype.push = function ()
+{
+ this.stack[this.stack.length] = this.on;
+ this.on = true;
+}
+
+xbDebug.prototype.pop = function ()
+{
+ this.on = this.stack[this.stack.length - 1];
+ --this.stack.length;
+}
+
+xbDebug.prototype.open = function ()
+{
+ if (this.debugwindow && !this.debugwindow.closed)
+ this.close();
+
+ this.debugwindow = window.open('about:blank', 'DEBUGWINDOW', 'height=400,width=600,resizable=yes,scrollbars=yes');
+
+ this.debugwindow.title = 'xbDebug Window';
+ this.debugwindow.document.write('xbDebug Window
Javascript Debug Window
');
+ this.debugwindow.focus();
+}
+
+xbDebug.prototype.close = function ()
+{
+ if (!this.debugwindow)
+ return;
+
+ if (!this.debugwindow.closed)
+ this.debugwindow.close();
+
+ // bc 2002-02-07, other windows may still hold a reference to this: this.debugwindow = null;
+}
+
+xbDebug.prototype.dump = function (msg)
+{
+ if (!this.on)
+ return;
+
+ if (!this.debugwindow || this.debugwindow.closed)
+ this.open();
+
+ this.debugwindow.document.write(msg + ' ');
+
+ return;
+}
+
+var xbDEBUG = new xbDebug();
+
+window.onunload = function () {
+ xbDEBUG.close();
+}
+
+function xbDebugGetFunctionName(funcref)
+{
+
+ if (!funcref)
+ {
+ return '';
+ }
+
+ if (funcref.name)
+ return funcref.name;
+
+ var name = funcref + '';
+ name = name.substring(name.indexOf(' ') + 1, name.indexOf('('));
+ funcref.name = name;
+
+ if (!name) alert('name not defined');
+ return name;
+}
+
+// emulate functionref.apply for IE mac and IE win < 5.5
+function xbDebugApplyFunction(funcname, funcref, thisref, argumentsref)
+{
+ var rv;
+
+ if (!funcref)
+ {
+ alert('xbDebugApplyFunction: funcref is null');
+ }
+
+ if (typeof(funcref.apply) != 'undefined')
+ return funcref.apply(thisref, argumentsref);
+
+ var applyexpr = 'thisref.xbDebug_orig_' + funcname + '(';
+ var i;
+
+ for (i = 0; i < argumentsref.length; i++)
+ {
+ applyexpr += 'argumentsref[' + i + '],';
+ }
+
+ if (argumentsref.length > 0)
+ {
+ applyexpr = applyexpr.substring(0, applyexpr.length - 1);
+ }
+
+ applyexpr += ')';
+
+ return eval(applyexpr);
+}
+
+function xbDebugCreateFunctionWrapper(scopename, funcname, precall, postcall)
+{
+ var wrappedfunc;
+ var scopeobject = eval(scopename);
+ var funcref = scopeobject[funcname];
+
+ scopeobject['xbDebug_orig_' + funcname] = funcref;
+
+ wrappedfunc = function ()
+ {
+ var rv;
+
+ precall(scopename, funcname, arguments);
+ rv = xbDebugApplyFunction(funcname, funcref, scopeobject, arguments);
+ postcall(scopename, funcname, arguments, rv);
+ return rv;
+ };
+
+ if (typeof(funcref.constructor) != 'undefined')
+ wrappedfunc.constructor = funcref.constuctor;
+
+ if (typeof(funcref.prototype) != 'undefined')
+ wrappedfunc.prototype = funcref.prototype;
+
+ scopeobject[funcname] = wrappedfunc;
+}
+
+function xbDebugCreateMethodWrapper(contextname, classname, methodname, precall, postcall)
+{
+ var context = eval(contextname);
+ var methodref = context[classname].prototype[methodname];
+
+ context[classname].prototype['xbDebug_orig_' + methodname] = methodref;
+
+ var wrappedmethod = function ()
+ {
+ var rv;
+ // eval 'this' at method run time to pick up reference to the object's instance
+ var thisref = eval('this');
+ // eval 'arguments' at method run time to pick up method's arguments
+ var argsref = arguments;
+
+ precall(contextname + '.' + classname, methodname, argsref);
+ rv = xbDebugApplyFunction(methodname, methodref, thisref, argsref);
+ postcall(contextname + '.' + classname, methodname, argsref, rv);
+ return rv;
+ };
+
+ return wrappedmethod;
+}
+
+function xbDebugPersistToString(obj)
+{
+ var s = '';
+ var p;
+
+ if (obj == null)
+ return 'null';
+
+ switch (typeof(obj))
+ {
+ case 'number':
+ return obj;
+ case 'string':
+ return '"' + obj + '"';
+ case 'undefined':
+ return 'undefined';
+ case 'boolean':
+ return obj + '';
+ }
+
+ if (obj.constructor)
+ return '[' + xbDebugGetFunctionName(obj.constructor) + ']';
+
+ return null;
+}
+
+function xbDebugTraceBefore(scopename, funcname, funcarguments)
+{
+ var i;
+ var s = '';
+ var execprofile = xbDEBUG.execprofile[scopename + '.' + funcname];
+ if (!execprofile)
+ execprofile = xbDEBUG.execprofile[scopename + '.' + funcname] = { started: 0, time: 0, count: 0 };
+
+ for (i = 0; i < funcarguments.length; i++)
+ {
+ s += xbDebugPersistToString(funcarguments[i]);
+ if (i < funcarguments.length - 1)
+ s += ', ';
+ }
+
+ xbDEBUG.dump('enter ' + scopename + '.' + funcname + '(' + s + ')');
+ execprofile.started = (new Date()).getTime();
+}
+
+function xbDebugTraceAfter(scopename, funcname, funcarguments, rv)
+{
+ var i;
+ var s = '';
+ var execprofile = xbDEBUG.execprofile[scopename + '.' + funcname];
+ if (!execprofile)
+ xbDEBUG.dump('xbDebugTraceAfter: execprofile not created for ' + scopename + '.' + funcname);
+ else if (execprofile.started == 0)
+ xbDEBUG.dump('xbDebugTraceAfter: execprofile.started == 0 for ' + scopename + '.' + funcname);
+ else
+ {
+ execprofile.time += (new Date()).getTime() - execprofile.started;
+ execprofile.count++;
+ execprofile.started = 0;
+ }
+
+ for (i = 0; i < funcarguments.length; i++)
+ {
+ s += xbDebugPersistToString(funcarguments[i]);
+ if (i < funcarguments.length - 1)
+ s += ', ';
+ }
+
+ xbDEBUG.dump('exit ' + scopename + '.' + funcname + '(' + s + ')==' + xbDebugPersistToString(rv));
+}
+
+function xbDebugTraceFunction(scopename, funcname)
+{
+ xbDebugCreateFunctionWrapper(scopename, funcname, xbDebugTraceBefore, xbDebugTraceAfter);
+}
+
+function xbDebugTraceObject(contextname, classname)
+{
+ var classref = eval(contextname + '.' + classname);
+ var p;
+ var sp;
+
+ if (!classref || !classref.prototype)
+ return;
+
+ for (p in classref.prototype)
+ {
+ sp = p + '';
+ if (typeof(classref.prototype[sp]) == 'function' && (sp).indexOf('xbDebug_orig') == -1)
+ {
+ classref.prototype[sp] = xbDebugCreateMethodWrapper(contextname, classname, sp, xbDebugTraceBefore, xbDebugTraceAfter);
+ }
+ }
+}
+
+function xbDebugDumpProfile()
+{
+ var p;
+ var execprofile;
+ var avg;
+
+ for (p in xbDEBUG.execprofile)
+ {
+ execprofile = xbDEBUG.execprofile[p];
+ avg = Math.round(100 * execprofile.time / execprofile.count) / 100;
+ xbDEBUG.dump('Execution profile ' + p + ' called ' + execprofile.count + ' times. Total time=' + execprofile.time + 'ms. Avg Time=' + avg + 'ms.');
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/readme.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/readme.txt
new file mode 100644
index 0000000..af36471
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/readme.txt
@@ -0,0 +1,3 @@
+This directory contains shell scripts (*.sh) and AppleScripts (*.scpt) to start and stop browsers.
+
+The shell scripts invoke the AppleScripts, so use the shell scripts.
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.scpt b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.scpt
new file mode 100644
index 0000000..dd22a35
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.scpt differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.sh
new file mode 100644
index 0000000..9aa0ff4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-firefox.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Starts Firefox. Use this instead of calling the AppleScripts directly.
+
+osascript bin/mac/stop-firefox.scpt
+osascript bin/mac/start-firefox.scpt $1
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.scpt b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.scpt
new file mode 100644
index 0000000..3c08204
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.scpt differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.sh
new file mode 100644
index 0000000..e920dc6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/start-safari.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Starts Safari. Use this instead of calling the AppleScripts directly.
+
+osascript bin/mac/stop-safari.scpt
+osascript bin/mac/start-safari.scpt $1
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.scpt b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.scpt
new file mode 100644
index 0000000..ff1b6d3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.scpt differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.sh
new file mode 100644
index 0000000..f5c878f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-firefox.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Stops Firefox. Use this instead of calling the AppleScripts directly.
+
+osascript bin/mac/stop-firefox.scpt
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.scpt b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.scpt
new file mode 100644
index 0000000..5d420d5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.scpt differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.sh
new file mode 100644
index 0000000..56d20fc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/mac/stop-safari.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Stops Safari. Use this instead of calling the AppleScripts directly.
+
+osascript bin/mac/stop-safari.scpt
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/start-firefox.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/start-firefox.sh
new file mode 100644
index 0000000..6dca980
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/start-firefox.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+killall -9 -w firefox-bin
+firefox $1 &
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/stop-firefox.sh b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/stop-firefox.sh
new file mode 100644
index 0000000..074355e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/bin/unix/stop-firefox.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+killall -9 -w firefox-bin
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/css/jsUnitStyle.css b/ant-jsunit-hieatt/trunk/lib/jsunit/css/jsUnitStyle.css
new file mode 100644
index 0000000..cee6849
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/css/jsUnitStyle.css
@@ -0,0 +1,83 @@
+body {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ color: #000;
+ font-size: 0.8em;
+ background-color: #fff;
+}
+
+a:link, a:visited {
+ color: #00F;
+}
+
+a:hover {
+ color: #F00;
+}
+
+h1 {
+ font-size: 1.2em;
+ font-weight: bold;
+ color: #039;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+h2 {
+ font-weight: bold;
+ color: #039;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+h3 {
+ font-weight: bold;
+ color: #039;
+ text-decoration: underline;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+h4 {
+ font-weight: bold;
+ color: #039;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+}
+
+.jsUnitTestResultSuccess {
+ color: #000;
+}
+
+.jsUnitTestResultNotSuccess {
+ color: #F00;
+}
+
+.unselectedTab {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ height: 26px;
+ background: #FFFFFF;
+ border-style: solid;
+ border-bottom-width: 1px;
+ border-top-width: 1px;
+ border-left-width: 1px;
+ border-right-width: 1px;
+}
+
+.selectedTab {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ height: 26px;
+ background: #DDDDDD;
+ font-weight: bold;
+ border-style: solid;
+ border-bottom-width: 0px;
+ border-top-width: 1px;
+ border-left-width: 1px;
+ border-right-width: 1px;
+}
+
+.tabHeaderSeparator {
+ height: 26px;
+ background: #FFFFFF;
+ border-style: solid;
+ border-bottom-width: 1px;
+ border-top-width: 0px;
+ border-left-width: 0px;
+ border-right-width: 0px;
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/images/green.gif b/ant-jsunit-hieatt/trunk/lib/jsunit/images/green.gif
new file mode 100644
index 0000000..b57ca34
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/images/green.gif differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/images/logo_jsunit.gif b/ant-jsunit-hieatt/trunk/lib/jsunit/images/logo_jsunit.gif
new file mode 100644
index 0000000..65b4bda
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/images/logo_jsunit.gif differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/images/powerby-transparent.gif b/ant-jsunit-hieatt/trunk/lib/jsunit/images/powerby-transparent.gif
new file mode 100644
index 0000000..69c7d9d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/images/powerby-transparent.gif differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/images/red.gif b/ant-jsunit-hieatt/trunk/lib/jsunit/images/red.gif
new file mode 100644
index 0000000..262550d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/images/red.gif differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AbstractJsUnitServer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AbstractJsUnitServer.class
new file mode 100644
index 0000000..86bcd15
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AbstractJsUnitServer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AcceptorFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AcceptorFunctionalTest.class
new file mode 100644
index 0000000..50a3af7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/AcceptorFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpProcessStarter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpProcessStarter.class
new file mode 100644
index 0000000..e24bf30
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpProcessStarter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpRemoteServerHitter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpRemoteServerHitter.class
new file mode 100644
index 0000000..07c8240
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BlowingUpRemoteServerHitter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecification.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecification.class
new file mode 100644
index 0000000..9857d78
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecification.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecificationTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecificationTest.class
new file mode 100644
index 0000000..9f62a6e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserLaunchSpecificationTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriter.class
new file mode 100644
index 0000000..aea160a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriterTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriterTest.class
new file mode 100644
index 0000000..55d8506
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserResultLogWriterTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserTestRunner.class
new file mode 100644
index 0000000..e8babc4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/BrowserTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerConnectionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerConnectionTest.class
new file mode 100644
index 0000000..525ed95
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerConnectionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerInteractionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerInteractionTest.class
new file mode 100644
index 0000000..4ab84b7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientServerInteractionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientSideConnection.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientSideConnection.class
new file mode 100644
index 0000000..bbcc42a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ClientSideConnection.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ConfigurationFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ConfigurationFunctionalTest.class
new file mode 100644
index 0000000..b065bf0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ConfigurationFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DefaultProcessStarter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DefaultProcessStarter.class
new file mode 100644
index 0000000..73eb942
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DefaultProcessStarter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DisplayerFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DisplayerFunctionalTest.class
new file mode 100644
index 0000000..2cb7a04
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DisplayerFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTest.class
new file mode 100644
index 0000000..cbe939b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager$1.class
new file mode 100644
index 0000000..47baec4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager.class
new file mode 100644
index 0000000..916ed68
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManager.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$1.class
new file mode 100644
index 0000000..f40904d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$2.class
new file mode 100644
index 0000000..254eb1b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest.class
new file mode 100644
index 0000000..d61c29c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunManagerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunResultTest.class
new file mode 100644
index 0000000..ec51184
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestRunResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder$1.class
new file mode 100644
index 0000000..65b5ccc
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder.class
new file mode 100644
index 0000000..ed095d0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilder.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$1.class
new file mode 100644
index 0000000..77e48b1
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$2.class
new file mode 100644
index 0000000..780cc67
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$3.class
new file mode 100644
index 0000000..ee73c36
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest.class
new file mode 100644
index 0000000..bc7ea12
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DistributedTestSuiteBuilderTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyBrowserResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyBrowserResult.class
new file mode 100644
index 0000000..4bb53e8
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyBrowserResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyConfigurationSource.class
new file mode 100644
index 0000000..816d952
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyFarmConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyFarmConfigurationSource.class
new file mode 100644
index 0000000..d2f4c6a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyFarmConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyHttpRequest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyHttpRequest.class
new file mode 100644
index 0000000..a6d13fc
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/DummyHttpRequest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/EndToEndTestCase.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/EndToEndTestCase.class
new file mode 100644
index 0000000..b36dd09
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/EndToEndTestCase.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$1.class
new file mode 100644
index 0000000..2ba33fb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$2.class
new file mode 100644
index 0000000..64cbb73
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest.class
new file mode 100644
index 0000000..f5fa8dd
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ExternallyShutDownStandaloneTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest$1.class
new file mode 100644
index 0000000..dd4b328
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.class
new file mode 100644
index 0000000..1e413cf
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTest.class
new file mode 100644
index 0000000..07624d8
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTestSuite.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTestSuite.class
new file mode 100644
index 0000000..56d9f2e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerFunctionalTestSuite.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerLandingPageFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerLandingPageFunctionalTest.class
new file mode 100644
index 0000000..b72391c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FarmServerLandingPageFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestCase.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestCase.class
new file mode 100644
index 0000000..7c39233
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestCase.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestConfigurationSource.class
new file mode 100644
index 0000000..4c2fbdb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestFarmConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestFarmConfigurationSource.class
new file mode 100644
index 0000000..69a8433
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestFarmConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestSuite.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestSuite.class
new file mode 100644
index 0000000..fd9cbec
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/FunctionalTestSuite.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ImpureUnitTestSuite.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ImpureUnitTestSuite.class
new file mode 100644
index 0000000..fb76e37
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ImpureUnitTestSuite.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidBrowserIdException.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidBrowserIdException.class
new file mode 100644
index 0000000..420c6f1
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidBrowserIdException.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$1.class
new file mode 100644
index 0000000..a38eb9f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$2.class
new file mode 100644
index 0000000..dce92a7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest.class
new file mode 100644
index 0000000..428dfa5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/InvalidRemoteMachinesDistributedTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServer.class
new file mode 100644
index 0000000..5acc07e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServerTest.class
new file mode 100644
index 0000000..70f4a6e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitFarmServerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitServer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitServer.class
new file mode 100644
index 0000000..b14c279
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitServer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServer.class
new file mode 100644
index 0000000..1a6cdec
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$1.class
new file mode 100644
index 0000000..6294d60
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$2.class
new file mode 100644
index 0000000..bcb4179
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$InvalidConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$InvalidConfigurationSource.class
new file mode 100644
index 0000000..d15c07d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest$InvalidConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest.class
new file mode 100644
index 0000000..d9207f3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/JsUnitStandardServerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/LaunchTestRunCommand.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/LaunchTestRunCommand.class
new file mode 100644
index 0000000..7ab58b2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/LaunchTestRunCommand.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MessageReceiver.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MessageReceiver.class
new file mode 100644
index 0000000..7c9e3fd
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MessageReceiver.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserResultRepository.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserResultRepository.class
new file mode 100644
index 0000000..48a7d3a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserResultRepository.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserTestRunner.class
new file mode 100644
index 0000000..2888a24
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockBrowserTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockMessageReceiver.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockMessageReceiver.class
new file mode 100644
index 0000000..ab18f61
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockMessageReceiver.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockProcessStarter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockProcessStarter.class
new file mode 100644
index 0000000..7861b25
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockProcessStarter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockRemoteServerHitter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockRemoteServerHitter.class
new file mode 100644
index 0000000..938f724
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockRemoteServerHitter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockTestRunListener.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockTestRunListener.class
new file mode 100644
index 0000000..b1c51a5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/MockTestRunListener.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/NoUrlSpecifiedException.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/NoUrlSpecifiedException.class
new file mode 100644
index 0000000..2202756
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/NoUrlSpecifiedException.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$1.class
new file mode 100644
index 0000000..4771da0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$2.class
new file mode 100644
index 0000000..b257b65
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest.class
new file mode 100644
index 0000000..0d4a02b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/OverrideURLDistributedTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$1.class
new file mode 100644
index 0000000..0fcd8dd
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$2.class
new file mode 100644
index 0000000..9fee3ba
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$3.class
new file mode 100644
index 0000000..139b730
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType.class
new file mode 100644
index 0000000..5f7d07b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PlatformType.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ProcessStarter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ProcessStarter.class
new file mode 100644
index 0000000..f713364
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ProcessStarter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PureUnitTestSuite.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PureUnitTestSuite.class
new file mode 100644
index 0000000..4f7b31d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/PureUnitTestSuite.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSource.class
new file mode 100644
index 0000000..6a2d101
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceFunctionalTest.class
new file mode 100644
index 0000000..a2d64ba
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceTest.class
new file mode 100644
index 0000000..84b121d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteConfigurationSourceTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1$1.class
new file mode 100644
index 0000000..87c44b0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1.class
new file mode 100644
index 0000000..2d27979
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1.class
new file mode 100644
index 0000000..c70bc79
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest.class
new file mode 100644
index 0000000..c6afbe2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineRunnerHitterTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineServerHitter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineServerHitter.class
new file mode 100644
index 0000000..8c64067
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteMachineServerHitter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteServerHitter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteServerHitter.class
new file mode 100644
index 0000000..703470f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteServerHitter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunFinishedReceiver.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunFinishedReceiver.class
new file mode 100644
index 0000000..ca19c58
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunFinishedReceiver.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunStartedReceiver.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunStartedReceiver.class
new file mode 100644
index 0000000..9e1a897
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient$TestRunStartedReceiver.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient.class
new file mode 100644
index 0000000..5386658
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClient.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClientTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClientTest.class
new file mode 100644
index 0000000..944704c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RemoteTestRunClientTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest$1.class
new file mode 100644
index 0000000..acbc560
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest.class
new file mode 100644
index 0000000..3ba929e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ResultAcceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RunnerFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RunnerFunctionalTest.class
new file mode 100644
index 0000000..0791520
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/RunnerFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerLandingPageFunctionalTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerLandingPageFunctionalTest.class
new file mode 100644
index 0000000..2f31a8a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerLandingPageFunctionalTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerRegistry.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerRegistry.class
new file mode 100644
index 0000000..8bfacec
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerRegistry.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection$ReaderThread.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection$ReaderThread.class
new file mode 100644
index 0000000..75b9f15
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection$ReaderThread.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection.class
new file mode 100644
index 0000000..c87875d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/ServerSideConnection.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$1.class
new file mode 100644
index 0000000..31379fa
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$2.class
new file mode 100644
index 0000000..8df17b4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest.class
new file mode 100644
index 0000000..fb9a639
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SpecificBrowserDistributedTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest$1.class
new file mode 100644
index 0000000..f4c3408
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest.class
new file mode 100644
index 0000000..13407d4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StandaloneTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StubConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StubConfigurationSource.class
new file mode 100644
index 0000000..44ecea9
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/StubConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest$1.class
new file mode 100644
index 0000000..995d348
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest.class
new file mode 100644
index 0000000..c10723c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/SuccessfulStandaloneTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestPortManager.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestPortManager.class
new file mode 100644
index 0000000..8fddc7e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestPortManager.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunListener.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunListener.class
new file mode 100644
index 0000000..ff87105
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunListener.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManager.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManager.class
new file mode 100644
index 0000000..127347b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManager.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$1.class
new file mode 100644
index 0000000..181a5cf
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$FailingBrowserTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$FailingBrowserTestRunner.class
new file mode 100644
index 0000000..657754a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$FailingBrowserTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$KillableBrowserTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$KillableBrowserTestRunner.class
new file mode 100644
index 0000000..44cb6ff
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$KillableBrowserTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$SuccessfulBrowserTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$SuccessfulBrowserTestRunner.class
new file mode 100644
index 0000000..1e9458e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest$SuccessfulBrowserTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest.class
new file mode 100644
index 0000000..cbe4177
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunManagerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer$StopMessageReceiver.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer$StopMessageReceiver.class
new file mode 100644
index 0000000..8f6b2a2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer$StopMessageReceiver.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer.class
new file mode 100644
index 0000000..e4e83a5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest$1.class
new file mode 100644
index 0000000..612ae18
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest.class
new file mode 100644
index 0000000..cbdc245
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunNotifierServerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunResultTest.class
new file mode 100644
index 0000000..0f8a512
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TestRunResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest$1.class
new file mode 100644
index 0000000..0f5a5bb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest.class
new file mode 100644
index 0000000..97c9f07
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimedOutBrowserStandaloneTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutChecker.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutChecker.class
new file mode 100644
index 0000000..ea609c3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutChecker.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest$MockProcess.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest$MockProcess.class
new file mode 100644
index 0000000..cc21ebd
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest$MockProcess.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest.class
new file mode 100644
index 0000000..efe1b66
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TimeoutCheckerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$1.class
new file mode 100644
index 0000000..35188c6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$2.class
new file mode 100644
index 0000000..9668697
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$3.class
new file mode 100644
index 0000000..df22dfb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest.class
new file mode 100644
index 0000000..d9bc118
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/TwoValidLocalhostsDistributedTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UnitTestSuite.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UnitTestSuite.class
new file mode 100644
index 0000000..41dfca6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UnitTestSuite.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest$1.class
new file mode 100644
index 0000000..a87058a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest.class
new file mode 100644
index 0000000..a913f29
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/UrlOverrideStandaloneTestTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/XmlRenderable.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/XmlRenderable.class
new file mode 100644
index 0000000..26baf28
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/XmlRenderable.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BlockingTestRunner.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BlockingTestRunner.class
new file mode 100644
index 0000000..3a936d5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BlockingTestRunner.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserResultAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserResultAware.class
new file mode 100644
index 0000000..6127bc9
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserResultAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserTestRunnerConfigurationAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserTestRunnerConfigurationAction.class
new file mode 100644
index 0000000..a75125e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/BrowserTestRunnerConfigurationAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerAction.class
new file mode 100644
index 0000000..54e276c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest$SuccessfulRemoteServerHitter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest$SuccessfulRemoteServerHitter.class
new file mode 100644
index 0000000..1624496
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest$SuccessfulRemoteServerHitter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest.class
new file mode 100644
index 0000000..a3ed8fb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/DistributedTestRunnerActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderable.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderable.class
new file mode 100644
index 0000000..45b2250
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderable.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderableTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderableTest.class
new file mode 100644
index 0000000..20ecde4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ErrorXmlRenderableTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction$1.class
new file mode 100644
index 0000000..a560735
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction.class
new file mode 100644
index 0000000..a587126
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$1.class
new file mode 100644
index 0000000..315953d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$2.class
new file mode 100644
index 0000000..8db4cac
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$3.class
new file mode 100644
index 0000000..f61542d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest.class
new file mode 100644
index 0000000..c61126f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/FarmServerConfigurationActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/IndexAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/IndexAction.class
new file mode 100644
index 0000000..3b6e2e6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/IndexAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitBrowserTestRunnerAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitBrowserTestRunnerAction.class
new file mode 100644
index 0000000..dc7ab77
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitBrowserTestRunnerAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitFarmServerAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitFarmServerAction.class
new file mode 100644
index 0000000..a4e1511
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitFarmServerAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitServerAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitServerAware.class
new file mode 100644
index 0000000..a91ca81
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/JsUnitServerAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionAction.class
new file mode 100644
index 0000000..c085f28
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionActionTest.class
new file mode 100644
index 0000000..05f0872
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionResult.class
new file mode 100644
index 0000000..a78a742
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionSource.class
new file mode 100644
index 0000000..4b27d42
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/LatestVersionSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RemoteRunnerHitterAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RemoteRunnerHitterAware.class
new file mode 100644
index 0000000..87047e2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RemoteRunnerHitterAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RequestSourceAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RequestSourceAware.class
new file mode 100644
index 0000000..36ebf9b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/RequestSourceAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorAction.class
new file mode 100644
index 0000000..867d99b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorActionTest.class
new file mode 100644
index 0000000..88424eb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultAcceptorActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerAction.class
new file mode 100644
index 0000000..bca194f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest$1.class
new file mode 100644
index 0000000..897df72
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest.class
new file mode 100644
index 0000000..243d3b6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/ResultDisplayerActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/StandaloneTestAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/StandaloneTestAware.class
new file mode 100644
index 0000000..f9c1acb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/StandaloneTestAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerAction.class
new file mode 100644
index 0000000..6d5bbdf
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest$Executor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest$Executor.class
new file mode 100644
index 0000000..28ea811
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest$Executor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.class
new file mode 100644
index 0000000..21ce218
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionTest.class
new file mode 100644
index 0000000..16cabf2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/TestRunnerActionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/VersionGrabberAware.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/VersionGrabberAware.class
new file mode 100644
index 0000000..5851e2e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/VersionGrabberAware.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlProducer.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlProducer.class
new file mode 100644
index 0000000..9b08db6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlProducer.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlResult.class
new file mode 100644
index 0000000..2ef27bb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/action/XmlResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSource.class
new file mode 100644
index 0000000..7d49fb3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSourceTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSourceTest.class
new file mode 100644
index 0000000..7f81234
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ArgumentsConfigurationSourceTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSource.class
new file mode 100644
index 0000000..cf2f010
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source1.class
new file mode 100644
index 0000000..e9774cd
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source2.class
new file mode 100644
index 0000000..5281d62
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest$Source2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest.class
new file mode 100644
index 0000000..94dd39a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/CompositeConfigurationSourceTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/Configuration.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/Configuration.class
new file mode 100644
index 0000000..6e80173
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/Configuration.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationException.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationException.class
new file mode 100644
index 0000000..936168d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationException.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$1.class
new file mode 100644
index 0000000..b60054a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$10.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$10.class
new file mode 100644
index 0000000..ffbaeb5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$10.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$11.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$11.class
new file mode 100644
index 0000000..37b1ebf
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$11.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$2.class
new file mode 100644
index 0000000..ef9b6c4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$3.class
new file mode 100644
index 0000000..ee7bd9f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$4.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$4.class
new file mode 100644
index 0000000..a7fb786
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$4.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$5.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$5.class
new file mode 100644
index 0000000..eea4d11
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$5.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$6.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$6.class
new file mode 100644
index 0000000..c12b3c8
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$6.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$7.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$7.class
new file mode 100644
index 0000000..113d01c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$7.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$8.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$8.class
new file mode 100644
index 0000000..f30ec58
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$8.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$9.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$9.class
new file mode 100644
index 0000000..30aa434
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty$9.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty.class
new file mode 100644
index 0000000..28e16df
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationProperty.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSource.class
new file mode 100644
index 0000000..bfcce26
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSourceResolutionTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSourceResolutionTest.class
new file mode 100644
index 0000000..dd2bc51
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationSourceResolutionTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$1.class
new file mode 100644
index 0000000..fd5a780
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$2.class
new file mode 100644
index 0000000..a8ae5f3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$3.class
new file mode 100644
index 0000000..f67d77a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$4.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$4.class
new file mode 100644
index 0000000..38f1ed0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$4.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$DuplicatesConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$DuplicatesConfigurationSource.class
new file mode 100644
index 0000000..4616d6e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$DuplicatesConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$FullValidForBothConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$FullValidForBothConfigurationSource.class
new file mode 100644
index 0000000..7f24d10
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$FullValidForBothConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$MinimalValidForBothConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$MinimalValidForBothConfigurationSource.class
new file mode 100644
index 0000000..1d48dae
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$MinimalValidForBothConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$ValidForStandardInvalidForFarmConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$ValidForStandardInvalidForFarmConfigurationSource.class
new file mode 100644
index 0000000..b3d583b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest$ValidForStandardInvalidForFarmConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest.class
new file mode 100644
index 0000000..cecbe38
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ConfigurationTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/DelegatingConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/DelegatingConfigurationSource.class
new file mode 100644
index 0000000..9ab21c3
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/DelegatingConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.class
new file mode 100644
index 0000000..5bdc29a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.class
new file mode 100644
index 0000000..21068bc
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfiguration.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfiguration.class
new file mode 100644
index 0000000..01eb22e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfiguration.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfigurationSource.class
new file mode 100644
index 0000000..206539d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/FarmConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesConfigurationSourceTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesConfigurationSourceTest.class
new file mode 100644
index 0000000..0557007
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesConfigurationSourceTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesFileConfigurationSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesFileConfigurationSource.class
new file mode 100644
index 0000000..f3877e6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/PropertiesFileConfigurationSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ServerType.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ServerType.class
new file mode 100644
index 0000000..eb8c009
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/configuration/ServerType.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptor.class
new file mode 100644
index 0000000..b8448ae
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest$MockAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest$MockAction.class
new file mode 100644
index 0000000..e887e39
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest$MockAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest.class
new file mode 100644
index 0000000..e895e4c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserResultInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptor.class
new file mode 100644
index 0000000..d6ca972
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$1.class
new file mode 100644
index 0000000..432e258
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$MockJsUnitAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$MockJsUnitAction.class
new file mode 100644
index 0000000..1655c28
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest$MockJsUnitAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.class
new file mode 100644
index 0000000..73d5a36
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerSource.class
new file mode 100644
index 0000000..51e4f59
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/BrowserTestRunnerSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.class
new file mode 100644
index 0000000..ec29d6a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptor.class
new file mode 100644
index 0000000..2b1d102
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest$MockAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest$MockAction.class
new file mode 100644
index 0000000..5221999
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest$MockAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest.class
new file mode 100644
index 0000000..82066ec
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/FarmServerInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/JsUnitInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/JsUnitInterceptor.class
new file mode 100644
index 0000000..1caf6e7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/JsUnitInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/MockActionInvocation.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/MockActionInvocation.class
new file mode 100644
index 0000000..da36500
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/MockActionInvocation.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.class
new file mode 100644
index 0000000..f1de128
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest$MockAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest$MockAction.class
new file mode 100644
index 0000000..2016b10
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest$MockAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.class
new file mode 100644
index 0000000..49833e9
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptor.class
new file mode 100644
index 0000000..77af985
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest$RequestSourceAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest$RequestSourceAction.class
new file mode 100644
index 0000000..b313b66
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest$RequestSourceAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest.class
new file mode 100644
index 0000000..e7296ae
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/RequestSourceInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptor.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptor.class
new file mode 100644
index 0000000..38345dc
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptor.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest$VersionGrabberAction.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest$VersionGrabberAction.class
new file mode 100644
index 0000000..1a7dd81
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest$VersionGrabberAction.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest.class
new file mode 100644
index 0000000..50d9752
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/interceptor/VersionGrabberInterceptorTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/BrowserResultRepository.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/BrowserResultRepository.class
new file mode 100644
index 0000000..c626ed2
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/BrowserResultRepository.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository$1.class
new file mode 100644
index 0000000..01e13fa
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository.class
new file mode 100644
index 0000000..bff887b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/FileBrowserResultRepository.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/StubBrowserResultRepository.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/StubBrowserResultRepository.class
new file mode 100644
index 0000000..a05fa72
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/logging/StubBrowserResultRepository.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/AbstractResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/AbstractResult.class
new file mode 100644
index 0000000..5c7728b
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/AbstractResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Browser.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Browser.class
new file mode 100644
index 0000000..546969f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Browser.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResult.class
new file mode 100644
index 0000000..2536fe6
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultBuilder.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultBuilder.class
new file mode 100644
index 0000000..16c9ed0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultBuilder.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultTest.class
new file mode 100644
index 0000000..0cdd6ae
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultWriter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultWriter.class
new file mode 100644
index 0000000..d71b590
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserResultWriter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserSource.class
new file mode 100644
index 0000000..39b6219
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserTest.class
new file mode 100644
index 0000000..b612b5d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/BrowserTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResult.class
new file mode 100644
index 0000000..592c00c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilder.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilder.class
new file mode 100644
index 0000000..9064c78
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilder.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilderTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilderTest.class
new file mode 100644
index 0000000..07efbf5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DistributedTestRunResultBuilderTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DummyBrowserSource.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DummyBrowserSource.class
new file mode 100644
index 0000000..7e4e2b7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/DummyBrowserSource.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ExternallyShutDownBrowserResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ExternallyShutDownBrowserResultTest.class
new file mode 100644
index 0000000..5ed0e19
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ExternallyShutDownBrowserResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/FailedToLaunchBrowserResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/FailedToLaunchBrowserResultTest.class
new file mode 100644
index 0000000..b78f815
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/FailedToLaunchBrowserResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Result.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Result.class
new file mode 100644
index 0000000..20bbd72
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/Result.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$1.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$1.class
new file mode 100644
index 0000000..814ea79
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$1.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$2.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$2.class
new file mode 100644
index 0000000..769ffe8
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$2.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$3.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$3.class
new file mode 100644
index 0000000..19073bb
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$3.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$4.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$4.class
new file mode 100644
index 0000000..61a7328
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$4.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$5.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$5.class
new file mode 100644
index 0000000..78e2537
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$5.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$6.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$6.class
new file mode 100644
index 0000000..131818d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$6.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$7.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$7.class
new file mode 100644
index 0000000..4c162c7
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType$7.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType.class
new file mode 100644
index 0000000..9d1cc73
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/ResultType.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResult.class
new file mode 100644
index 0000000..a8241b4
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultBuilder.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultBuilder.class
new file mode 100644
index 0000000..1f03593
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultBuilder.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultTest.class
new file mode 100644
index 0000000..8c10b3e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultWriter.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultWriter.class
new file mode 100644
index 0000000..babb057
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestCaseResultWriter.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResult.class
new file mode 100644
index 0000000..49f5e31
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResultTest.class
new file mode 100644
index 0000000..df81438
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestPageResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResult.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResult.class
new file mode 100644
index 0000000..d83b245
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResult.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilder.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilder.class
new file mode 100644
index 0000000..80a1fde
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilder.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilderTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilderTest.class
new file mode 100644
index 0000000..9f58d23
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TestRunResultBuilderTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TimedOutBrowerResultTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TimedOutBrowerResultTest.class
new file mode 100644
index 0000000..1f79902
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/model/TimedOutBrowerResultTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/CollectionUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/CollectionUtility.class
new file mode 100644
index 0000000..c7ec156
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/CollectionUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/FileUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/FileUtility.class
new file mode 100644
index 0000000..50861c5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/FileUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StreamUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StreamUtility.class
new file mode 100644
index 0000000..c529f3a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StreamUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StringUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StringUtility.class
new file mode 100644
index 0000000..d084e62
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/StringUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/SystemUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/SystemUtility.class
new file mode 100644
index 0000000..36703f5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/SystemUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/XmlUtility.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/XmlUtility.class
new file mode 100644
index 0000000..2ea521a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/utility/XmlUtility.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/BlowingUpVersionGrabber.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/BlowingUpVersionGrabber.class
new file mode 100644
index 0000000..47c5336
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/BlowingUpVersionGrabber.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/JsUnitWebsiteVersionGrabber.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/JsUnitWebsiteVersionGrabber.class
new file mode 100644
index 0000000..5e59f77
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/JsUnitWebsiteVersionGrabber.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/MockVersionGrabber.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/MockVersionGrabber.class
new file mode 100644
index 0000000..f43c38c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/MockVersionGrabber.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionChecker.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionChecker.class
new file mode 100644
index 0000000..de29b60
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionChecker.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionCheckerTest.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionCheckerTest.class
new file mode 100644
index 0000000..deee434
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionCheckerTest.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionGrabber.class b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionGrabber.class
new file mode 100644
index 0000000..f5b380a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/bin/net/jsunit/version/VersionGrabber.class differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/farm_xwork.xml b/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/farm_xwork.xml
new file mode 100644
index 0000000..cb9f1c5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/farm_xwork.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/xwork.xml b/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/xwork.xml
new file mode 100644
index 0000000..a4bf334
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/config/xwork.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 500
+
+
+
+
+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ant.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ant.jar
new file mode 100644
index 0000000..395544d
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ant.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-el.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-el.jar
new file mode 100644
index 0000000..608ed79
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-el.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-logging.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-logging.jar
new file mode 100644
index 0000000..b73a80f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/commons-logging.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-compiler.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-compiler.jar
new file mode 100644
index 0000000..96ec538
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-compiler.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-runtime.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-runtime.jar
new file mode 100644
index 0000000..5c3b4bf
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jasper-runtime.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/javax.servlet.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/javax.servlet.jar
new file mode 100644
index 0000000..2aa9f27
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/javax.servlet.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jdom.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jdom.jar
new file mode 100644
index 0000000..288e64c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/jdom.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/junit.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/junit.jar
new file mode 100644
index 0000000..674d71e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/junit.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ognl.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ognl.jar
new file mode 100644
index 0000000..0d41752
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/ognl.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/org.mortbay.jetty.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/org.mortbay.jetty.jar
new file mode 100644
index 0000000..dd089c0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/org.mortbay.jetty.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/oscore.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/oscore.jar
new file mode 100644
index 0000000..48129bc
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/oscore.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/rife-continuations.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/rife-continuations.jar
new file mode 100644
index 0000000..9053f3e
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/rife-continuations.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/start.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/start.jar
new file mode 100644
index 0000000..cb790f1
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/start.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/stop.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/stop.jar
new file mode 100644
index 0000000..10bd5da
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/stop.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/webwork-2.2-beta-4.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/webwork-2.2-beta-4.jar
new file mode 100644
index 0000000..12711c0
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/webwork-2.2-beta-4.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xercesImpl-2.6.2.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xercesImpl-2.6.2.jar
new file mode 100644
index 0000000..14c3162
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xercesImpl-2.6.2.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xwork-1.1.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xwork-1.1.jar
new file mode 100644
index 0000000..7f416f5
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/lib/xwork-1.1.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserLaunchSpecification.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserLaunchSpecification.java
new file mode 100644
index 0000000..f61e8c7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserLaunchSpecification.java
@@ -0,0 +1,35 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.utility.StringUtility;
+
+public class BrowserLaunchSpecification {
+
+ private final Browser browser;
+ private final String overrideUrl;
+
+ public BrowserLaunchSpecification(Browser browser) {
+ this(browser, null);
+ }
+
+ public BrowserLaunchSpecification(Browser browser, String overrideUrl) {
+ this.browser = browser;
+ this.overrideUrl = overrideUrl;
+ }
+
+ public String getOverrideUrl() {
+ return overrideUrl;
+ }
+
+ public boolean hasOverrideUrl() {
+ return !StringUtility.isEmpty(overrideUrl);
+ }
+
+ public boolean isForDefaultBrowser() {
+ return browser.isDefault();
+ }
+
+ public Browser getBrowser() {
+ return browser;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserTestRunner.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserTestRunner.java
new file mode 100644
index 0000000..c7bd76d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/BrowserTestRunner.java
@@ -0,0 +1,34 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+import java.util.List;
+
+public interface BrowserTestRunner extends XmlRenderable {
+
+ void startTestRun();
+
+ void finishTestRun();
+
+ long launchBrowserTestRun(BrowserLaunchSpecification launchSpec);
+
+ void accept(BrowserResult result);
+
+ boolean hasReceivedResultSince(long launchTime);
+
+ BrowserResult lastResult();
+
+ void dispose();
+
+ BrowserResult findResultWithId(String id, int browserId) throws InvalidBrowserIdException;
+
+ void logStatus(String message);
+
+ List getBrowsers();
+
+ int timeoutSeconds();
+
+ boolean isAlive();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ClientSideConnection.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ClientSideConnection.java
new file mode 100644
index 0000000..345b851
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ClientSideConnection.java
@@ -0,0 +1,59 @@
+/**
+ *
+ */
+package net.jsunit;
+
+import java.io.*;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+public class ClientSideConnection extends Thread {
+
+ private MessageReceiver receiver;
+ private final int port;
+ private ServerSocket serverSocket;
+ private Socket socket;
+ private BufferedReader reader;
+ private PrintWriter writer;
+ private boolean running;
+
+ public ClientSideConnection(MessageReceiver receiver, int port) {
+ this.port = port;
+ this.receiver = receiver;
+ }
+
+ public void run() {
+ try {
+ serverSocket = new ServerSocket(port);
+ socket = serverSocket.accept();
+ reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), "UTF-8"));
+ writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), "UTF-8"));
+ String message;
+ running = true;
+ while (running && reader != null && (message = reader.readLine()) != null)
+ receiver.messageReceived(message);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ shutdown();
+ }
+
+ public boolean isRunning() {
+ return running;
+ }
+
+ public void shutdown() {
+ try {
+ if (serverSocket != null)
+ serverSocket.close();
+ } catch (IOException e) {
+ }
+ running = false;
+ }
+
+ public void sendMessage(String message) {
+ writer.println(message);
+ writer.flush();
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/InvalidBrowserIdException.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/InvalidBrowserIdException.java
new file mode 100644
index 0000000..5f6b5fc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/InvalidBrowserIdException.java
@@ -0,0 +1,7 @@
+package net.jsunit;
+
+public class InvalidBrowserIdException extends Throwable {
+ public InvalidBrowserIdException(int invalidBrowserId) {
+ super("Invalid browser ID: " + invalidBrowserId);
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/MessageReceiver.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/MessageReceiver.java
new file mode 100644
index 0000000..7b7b785
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/MessageReceiver.java
@@ -0,0 +1,8 @@
+/**
+ *
+ */
+package net.jsunit;
+
+interface MessageReceiver {
+ public void messageReceived(String message);
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/RemoteTestRunClient.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/RemoteTestRunClient.java
new file mode 100644
index 0000000..370fc2a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/RemoteTestRunClient.java
@@ -0,0 +1,75 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultBuilder;
+import net.jsunit.model.BrowserSource;
+
+public class RemoteTestRunClient implements MessageReceiver {
+
+ private BrowserSource browserSource;
+ private final TestRunListener listener;
+ private MessageReceiver complexMessageReceiver;
+ private ClientSideConnection clientSideConnection;
+
+ public RemoteTestRunClient(BrowserSource browserSource, TestRunListener listener, int serverPort) {
+ this.browserSource = browserSource;
+ this.listener = listener;
+ clientSideConnection = new ClientSideConnection(this, serverPort);
+ }
+
+ public void startListening() {
+ clientSideConnection.start();
+ }
+
+ public void stopListening() {
+ clientSideConnection.shutdown();
+ }
+
+ public void messageReceived(String message) {
+ if (message.equals(TestRunNotifierServer.TEST_RUN_STARTED))
+ listener.testRunStarted();
+ else if (message.equals(TestRunNotifierServer.TEST_RUN_FINISHED))
+ listener.testRunFinished();
+ else if (message.equals(TestRunNotifierServer.BROWSER_TEST_RUN_STARTED))
+ complexMessageReceiver = new TestRunStartedReceiver();
+ else if (message.equals(TestRunNotifierServer.BROWSER_TEST_RUN_FINISHED))
+ complexMessageReceiver = new TestRunFinishedReceiver();
+ else
+ complexMessageReceiver.messageReceived(message);
+ }
+
+ private class TestRunStartedReceiver implements MessageReceiver {
+
+ public void messageReceived(String browserIdString) {
+ int browserId = Integer.parseInt(browserIdString);
+ Browser browser = browserSource.getBrowserById(browserId);
+ listener.browserTestRunStarted(browser);
+ }
+ }
+
+ private class TestRunFinishedReceiver implements MessageReceiver {
+
+ private Browser browser;
+ private String xmlString = "";
+
+ public void messageReceived(String message) {
+ if (browser == null) {
+ int browserId = Integer.parseInt(message);
+ browser = browserSource.getBrowserById(browserId);
+ } else if (message.equals(TestRunNotifierServer.END_XML)) {
+ BrowserResult result = new BrowserResultBuilder(browserSource).build(xmlString);
+ listener.browserTestRunFinished(browser, result);
+ } else if (message.trim().length() > 0) {
+ xmlString += message;
+ xmlString += "\n";
+ }
+ }
+
+ }
+
+ public void sendStopServer() {
+ clientSideConnection.sendMessage("stop");
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ServerSideConnection.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ServerSideConnection.java
new file mode 100644
index 0000000..86441f1
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/ServerSideConnection.java
@@ -0,0 +1,77 @@
+package net.jsunit;
+
+import java.io.*;
+import java.net.Socket;
+
+public class ServerSideConnection {
+
+ private int port;
+ private Socket clientSocket;
+ private PrintWriter writer;
+ private String host = "localhost";
+ private boolean isConnected;
+ private final MessageReceiver receiver;
+ private BufferedReader reader;
+
+ public ServerSideConnection(MessageReceiver receiver, int port) {
+ this.receiver = receiver;
+ this.port = port;
+ }
+
+ public void connect() {
+ for (int i = 1; i < 30; i++) {
+ try {
+ clientSocket = new Socket(host, port);
+ writer = new PrintWriter(new OutputStreamWriter(clientSocket.getOutputStream(), "UTF-8"), false);
+ reader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), "UTF-8"));
+ isConnected = true;
+ new ReaderThread().start();
+ return;
+ } catch (IOException e1) {
+ try {
+ Thread.sleep(250);
+ } catch (InterruptedException e2) {
+ }
+ }
+ }
+ throw new RuntimeException("server could not connect");
+ }
+
+ public void shutDown() {
+ if (writer != null) {
+ writer.close();
+ writer = null;
+ }
+
+ try {
+ if (clientSocket != null) {
+ clientSocket.close();
+ clientSocket = null;
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void sendMessage(String message) {
+ writer.println(message);
+ writer.flush();
+ }
+
+ public boolean isConnected() {
+ return isConnected;
+ }
+
+ class ReaderThread extends Thread {
+ public void run() {
+ String message;
+ try {
+ while (isConnected && reader != null && (message = reader.readLine()) != null)
+ receiver.messageReceived(message);
+ } catch (IOException e) {
+ }
+
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunListener.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunListener.java
new file mode 100644
index 0000000..212bb5e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunListener.java
@@ -0,0 +1,18 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public interface TestRunListener {
+
+ boolean isReady();
+
+ void testRunStarted();
+
+ void testRunFinished();
+
+ void browserTestRunStarted(Browser browser);
+
+ void browserTestRunFinished(Browser browser, BrowserResult result);
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunNotifierServer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunNotifierServer.java
new file mode 100644
index 0000000..e75fe4d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/TestRunNotifierServer.java
@@ -0,0 +1,63 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.utility.XmlUtility;
+
+public class TestRunNotifierServer implements TestRunListener {
+
+ public static final String TEST_RUN_FINISHED = "testRunFinished";
+ public static final String TEST_RUN_STARTED = "testRunStarted";
+ public static final String BROWSER_TEST_RUN_FINISHED = "browserTestRunFinished";
+ public static final String BROWSER_TEST_RUN_STARTED = "browserTestRunStarted";
+ public static final String END_XML = "endXml";
+ private ServerSideConnection serverSideConnection;
+
+ public TestRunNotifierServer(BrowserTestRunner runner, int port) {
+ serverSideConnection = new ServerSideConnection(new StopMessageReceiver(runner), port);
+ }
+
+ public void browserTestRunStarted(Browser browser) {
+ serverSideConnection.sendMessage(BROWSER_TEST_RUN_STARTED);
+ serverSideConnection.sendMessage(String.valueOf(browser.getId()));
+ }
+
+ public void browserTestRunFinished(Browser browser, BrowserResult result) {
+ serverSideConnection.sendMessage(BROWSER_TEST_RUN_FINISHED);
+ serverSideConnection.sendMessage(String.valueOf(browser.getId()));
+ serverSideConnection.sendMessage(XmlUtility.asString(result.asXmlDocument()));
+ serverSideConnection.sendMessage(END_XML);
+ }
+
+ public void testRunStarted() {
+ serverSideConnection.connect();
+ serverSideConnection.sendMessage(TEST_RUN_STARTED);
+ }
+
+ public void testRunFinished() {
+ serverSideConnection.sendMessage(TEST_RUN_FINISHED);
+ serverSideConnection.shutDown();
+ }
+
+ public boolean isReady() {
+ return serverSideConnection.isConnected();
+ }
+
+ static class StopMessageReceiver implements MessageReceiver {
+
+ private final BrowserTestRunner runner;
+
+ public StopMessageReceiver(BrowserTestRunner runner) {
+ this.runner = runner;
+ }
+
+ public void messageReceived(String message) {
+ if ("stop".equals(message)) {
+ runner.logStatus("Stopping Test Run");
+ runner.dispose();
+ }
+ }
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/XmlRenderable.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/XmlRenderable.java
new file mode 100644
index 0000000..c69a31f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/XmlRenderable.java
@@ -0,0 +1,9 @@
+package net.jsunit;
+
+import org.jdom.Element;
+
+public interface XmlRenderable {
+
+ Element asXml();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ArgumentsConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ArgumentsConfigurationSource.java
new file mode 100644
index 0000000..5da196b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ArgumentsConfigurationSource.java
@@ -0,0 +1,66 @@
+package net.jsunit.configuration;
+
+import java.util.List;
+
+public class ArgumentsConfigurationSource implements ConfigurationSource {
+
+ private List arguments;
+
+ public ArgumentsConfigurationSource(List arguments) {
+ this.arguments = arguments;
+ }
+
+ private String argumentValue(ConfigurationProperty property) {
+ for (int i = 0; i < arguments.size(); i++) {
+ if (arguments.get(i).equalsIgnoreCase("-" + property.getName())) {
+ String value = arguments.get(i + 1);
+ if (!value.startsWith("-"))
+ return value;
+ else
+ return "";
+ }
+ }
+ return null;
+ }
+
+ public String resourceBase() {
+ return argumentValue(ConfigurationProperty.RESOURCE_BASE);
+ }
+
+ public String port() {
+ return argumentValue(ConfigurationProperty.PORT);
+ }
+
+ public String remoteMachineURLs() {
+ return argumentValue(ConfigurationProperty.REMOTE_MACHINE_URLS);
+ }
+
+ public String logsDirectory() {
+ return argumentValue(ConfigurationProperty.LOGS_DIRECTORY);
+ }
+
+ public String browserFileNames() {
+ return argumentValue(ConfigurationProperty.BROWSER_FILE_NAMES);
+ }
+
+ public String url() {
+ return argumentValue(ConfigurationProperty.URL);
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return argumentValue(ConfigurationProperty.IGNORE_UNRESPONSIVE_REMOTE_MACHINES);
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return argumentValue(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS);
+ }
+
+ public String description() {
+ return argumentValue(ConfigurationProperty.DESCRIPTION);
+ }
+
+ public String timeoutSeconds() {
+ return argumentValue(ConfigurationProperty.TIMEOUT_SECONDS);
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/CompositeConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/CompositeConfigurationSource.java
new file mode 100644
index 0000000..8b2e99b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/CompositeConfigurationSource.java
@@ -0,0 +1,135 @@
+package net.jsunit.configuration;
+
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class CompositeConfigurationSource implements ConfigurationSource {
+ private List sources;
+
+ public CompositeConfigurationSource() {
+ this.sources = new ArrayList();
+ }
+
+ public CompositeConfigurationSource(ConfigurationSource... sources) {
+ this();
+ add(sources);
+ }
+
+ public static ConfigurationSource productionConfiguration(String[] arguments) {
+ CompositeConfigurationSource result = new CompositeConfigurationSource(
+ new ArgumentsConfigurationSource(Arrays.asList(arguments)),
+ new EnvironmentVariablesConfigurationSource());
+ try {
+ result.add(new PropertiesFileConfigurationSource());
+ } catch (FileNotFoundException e) {
+ // Skip the properties file configuration source if there is no appropriately names properties file.
+ }
+ return result;
+ }
+
+ public void add(ConfigurationSource... sources) {
+ this.sources.addAll(Arrays.asList(sources));
+ }
+
+ public String browserFileNames() {
+ for (ConfigurationSource source : sources) {
+ String result = source.browserFileNames();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ for (ConfigurationSource source : sources) {
+ String result = source.closeBrowsersAfterTestRuns();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String description() {
+ for (ConfigurationSource source : sources) {
+ String result = source.description();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String logsDirectory() {
+ for (ConfigurationSource source : sources) {
+ String result = source.logsDirectory();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String port() {
+ for (ConfigurationSource source : sources) {
+ String result = source.port();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String remoteMachineURLs() {
+ for (ConfigurationSource source : sources) {
+ String result = source.remoteMachineURLs();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String resourceBase() {
+ for (ConfigurationSource source : sources) {
+ String result = source.resourceBase();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String timeoutSeconds() {
+ for (ConfigurationSource source : sources) {
+ String result = source.timeoutSeconds();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String url() {
+ for (ConfigurationSource source : sources) {
+ String result = source.url();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ for (ConfigurationSource source : sources) {
+ String result = source.ignoreUnresponsiveRemoteMachines();
+ if (result != null) {
+ return result;
+ }
+ }
+ return null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/Configuration.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/Configuration.java
new file mode 100644
index 0000000..0856f80
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/Configuration.java
@@ -0,0 +1,282 @@
+package net.jsunit.configuration;
+
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserSource;
+import net.jsunit.utility.SystemUtility;
+
+import org.jdom.Element;
+
+
+
+public final class Configuration implements BrowserSource
+{
+
+ private List browsers;
+ private boolean closeBrowsersAfterTestRuns;
+ private String description;
+ private boolean ignoreUnresponsiveRemoteMachines;
+ private File logsDirectory;
+ private int port;
+ private List remoteMachineURLs;
+ private File resourceBase;
+ private int timeoutSeconds;
+ private URL testURL;
+
+
+
+ public static Configuration resolve( String[] arguments )
+ {
+ return new Configuration( resolveSource( arguments ) );
+ }
+
+
+
+ public static ConfigurationSource resolveSource( String[] arguments )
+ {
+ return CompositeConfigurationSource.productionConfiguration( arguments );
+ }
+
+
+
+ public static ConfigurationSource resolveSource()
+ {
+ return resolveSource( new String[] {} );
+ }
+
+
+
+ public Configuration( ConfigurationSource source )
+ {
+ for ( ConfigurationProperty property : ConfigurationProperty.values() )
+ property.configure( this, source );
+ }
+
+
+
+ public Element asXml( ServerType serverType )
+ {
+ Element configurationElement = new Element( "configuration" );
+ configurationElement.setAttribute( "type", serverType.name() );
+ addSystemElementsTo( configurationElement );
+ for ( ConfigurationProperty property : getRequiredAndOptionalConfigurationProperties( serverType ) )
+ property.addXmlTo( configurationElement, this );
+ return configurationElement;
+ }
+
+
+
+ private void addSystemElementsTo( Element element )
+ {
+ Element osElement = new Element( "os" );
+ osElement.setText( SystemUtility.osString() );
+ element.addContent( osElement );
+ Element ipAddressElement = new Element( "ipAddress" );
+ ipAddressElement.setText( SystemUtility.ipAddress() );
+ element.addContent( ipAddressElement );
+ Element hostnameElement = new Element( "hostname" );
+ hostnameElement.setText( SystemUtility.hostname() );
+ element.addContent( hostnameElement );
+ }
+
+
+
+ public List getRequiredAndOptionalConfigurationProperties(
+ ServerType serverType )
+ {
+ return serverType.getRequiredAndOptionalConfigurationProperties();
+ }
+
+
+
+ public String[] asArgumentsArray()
+ {
+ List properties = ConfigurationProperty.all();
+ String[] arguments = new String[properties.size() * 2];
+ int i = 0;
+ for ( ConfigurationProperty property : properties )
+ {
+ arguments[i++] = "-" + property.getName();
+ arguments[i++] = property.getValueString( this );
+ }
+ return arguments;
+ }
+
+
+
+ public boolean isValidFor( ServerType type )
+ {
+ return type.getPropertiesInvalidFor( this ).isEmpty();
+ }
+
+
+
+ public String toString()
+ {
+ return getDescription() == null ? super.toString() : getDescription();
+ }
+
+
+
+ public List getBrowsers()
+ {
+ return browsers;
+ }
+
+
+
+ public void setBrowsers( List browsers )
+ {
+ this.browsers = browsers;
+ }
+
+
+
+ public boolean shouldCloseBrowsersAfterTestRuns()
+ {
+ return closeBrowsersAfterTestRuns;
+ }
+
+
+
+ public void setCloseBrowsersAfterTestRuns(
+ boolean closeBrowsersAfterTestRuns )
+ {
+ this.closeBrowsersAfterTestRuns = closeBrowsersAfterTestRuns;
+ }
+
+
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+
+ public void setDescription( String description )
+ {
+ this.description = description;
+ }
+
+
+
+ public boolean shouldIgnoreUnresponsiveRemoteMachines()
+ {
+ return ignoreUnresponsiveRemoteMachines;
+ }
+
+
+
+ public void setIgnoreUnresponsiveRemoteMachines(
+ boolean ignoreUnresponsiveRemoteMachines )
+ {
+ this.ignoreUnresponsiveRemoteMachines = ignoreUnresponsiveRemoteMachines;
+ }
+
+
+
+ public File getLogsDirectory()
+ {
+ return logsDirectory;
+ }
+
+
+
+ public void setLogsDirectory( File logsDirectory )
+ {
+ this.logsDirectory = logsDirectory;
+ }
+
+
+
+ public int getPort()
+ {
+ return port;
+ }
+
+
+
+ public void setPort( int port )
+ {
+ this.port = port;
+ }
+
+
+
+ public List getRemoteMachineURLs()
+ {
+ return remoteMachineURLs;
+ }
+
+
+
+ public void setRemoteMachineURLs( List remoteMachineURLs )
+ {
+ this.remoteMachineURLs = remoteMachineURLs;
+ }
+
+
+
+ public File getResourceBase()
+ {
+ return resourceBase;
+ }
+
+
+
+ public void setResourceBase( File resourceBase )
+ {
+ this.resourceBase = resourceBase;
+ }
+
+
+
+ public int getTimeoutSeconds()
+ {
+ return timeoutSeconds;
+ }
+
+
+
+ public void setTimeoutSeconds( int timeoutSeconds )
+ {
+ this.timeoutSeconds = timeoutSeconds;
+ }
+
+
+
+ public URL getTestURL()
+ {
+ return testURL;
+ }
+
+
+
+ public void setTestURL( URL url )
+ {
+ this.testURL = url;
+ }
+
+
+
+ public Browser getBrowserById( int id )
+ {
+ for ( Browser browser : browsers )
+ if ( browser.hasId( id ) )
+ return browser;
+ return null;
+ }
+
+
+
+ public URL getRemoteMachineURLById( int id )
+ {
+ return getRemoteMachineURLs().get( id );
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationException.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationException.java
new file mode 100644
index 0000000..412d603
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationException.java
@@ -0,0 +1,36 @@
+package net.jsunit.configuration;
+
+public class ConfigurationException extends RuntimeException {
+ private ConfigurationProperty propertyInError;
+ private String invalidValue;
+
+ public ConfigurationException(ConfigurationProperty property, String invalidValue) {
+ this.propertyInError = property;
+ this.invalidValue = invalidValue;
+ }
+
+ public ConfigurationException(ConfigurationProperty property, String invalidValue, Exception exception) {
+ super(exception);
+ this.propertyInError = property;
+ this.invalidValue = invalidValue;
+ }
+
+ public ConfigurationProperty getPropertyInError() {
+ return propertyInError;
+ }
+
+ public String getInvalidValue() {
+ return invalidValue;
+ }
+
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+ result.append("Invalid property ");
+ result.append(propertyInError.getName());
+ result.append(" - \"");
+ result.append(invalidValue);
+ result.append("\"");
+ return result.toString();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationProperty.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationProperty.java
new file mode 100644
index 0000000..e20acf7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationProperty.java
@@ -0,0 +1,286 @@
+package net.jsunit.configuration;
+
+import net.jsunit.model.Browser;
+import net.jsunit.utility.StringUtility;
+import org.jdom.Element;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+
+public enum ConfigurationProperty {
+
+ BROWSER_FILE_NAMES("browserFileNames", "Browser file names", false, true) {
+
+ public String getValueString(Configuration configuration) {
+ StringBuffer buffer = new StringBuffer();
+ for (Iterator it = configuration.getBrowsers().iterator(); it.hasNext();) {
+ Browser browser = (Browser) it.next();
+ buffer.append(browser.getFileName());
+ if (it.hasNext())
+ buffer.append(",");
+ }
+ return buffer.toString();
+ }
+
+ protected void addContentTo(Configuration configuration, Element element) {
+ for (Browser browser : configuration.getBrowsers()) {
+ Element fileNameElement = new Element("browserFileName");
+ fileNameElement.setAttribute("id", String.valueOf(browser.getId()));
+ fileNameElement.setText(browser.getFileName());
+ element.addContent(fileNameElement);
+ }
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String browserFileNamesString = source.browserFileNames();
+ try {
+ List browserFileNames = StringUtility.listFromCommaDelimitedString(browserFileNamesString);
+ Set alreadyAddedBrowserFileNames = new HashSet();
+ int id = 0;
+ List browsers = new ArrayList();
+ for (String browserFileName : browserFileNames) {
+ if (!alreadyAddedBrowserFileNames.contains(browserFileName) || Browser.DEFAULT_SYSTEM_BROWSER.equals(browserFileName))
+ {
+ browsers.add(new Browser(browserFileName, id++));
+ alreadyAddedBrowserFileNames.add(browserFileName);
+ }
+ }
+ configuration.setBrowsers(browsers);
+ } catch (Exception e) {
+ throw new ConfigurationException(this, browserFileNamesString, e);
+ }
+ }
+ },
+
+ CLOSE_BROWSERS_AFTER_TEST_RUNS("closeBrowsersAfterTestRuns", "Close browsers?", false, false) {
+ public String getValueString(Configuration configuration) {
+ return String.valueOf(configuration.shouldCloseBrowsersAfterTestRuns());
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String string = source.closeBrowsersAfterTestRuns();
+ if (StringUtility.isEmpty(string))
+ string = String.valueOf(true);
+ configuration.setCloseBrowsersAfterTestRuns(Boolean.valueOf(string));
+ }
+ },
+
+ DESCRIPTION("description", "Description", false, false) {
+ public String getValueString(Configuration configuration) {
+ String description = configuration.getDescription();
+ if (StringUtility.isEmpty(description))
+ return "";
+ return description;
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ configuration.setDescription(source.description());
+ }
+ },
+
+ IGNORE_UNRESPONSIVE_REMOTE_MACHINES("ignoreUnresponsiveRemoteMachines", "Ignore unresponsive remove machines?", false, false) {
+ public String getValueString(Configuration configuration) {
+ return String.valueOf(configuration.shouldIgnoreUnresponsiveRemoteMachines());
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String string = source.ignoreUnresponsiveRemoteMachines();
+ if (StringUtility.isEmpty(string))
+ string = String.valueOf(false);
+ configuration.setIgnoreUnresponsiveRemoteMachines(Boolean.valueOf(string));
+ }
+ },
+
+ LOGS_DIRECTORY("logsDirectory", "Logs directory", false, false) {
+ public String getValueString(Configuration configuration) {
+ return configuration.getLogsDirectory().getAbsolutePath();
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String logsDirectoryString = source.logsDirectory();
+ try {
+ if (StringUtility.isEmpty(logsDirectoryString))
+ logsDirectoryString = "logs";
+ configuration.setLogsDirectory(new File(logsDirectoryString));
+ } catch (Exception e) {
+ throw new ConfigurationException(this, logsDirectoryString, e);
+ }
+
+ }
+ },
+
+ PORT("port", "Port", false, false) {
+ public String getValueString(Configuration configuration) {
+ return String.valueOf(configuration.getPort());
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String portString = source.port();
+ if (StringUtility.isEmpty(portString))
+ portString = "8080";
+ try {
+ configuration.setPort(Integer.parseInt(portString));
+ } catch (NumberFormatException e) {
+ throw new ConfigurationException(this, portString, e);
+ }
+ }
+ },
+
+ REMOTE_MACHINE_URLS("remoteMachineURLs", "Remote machine URLs", true, true) {
+ public String getValueString(Configuration configuration) {
+ return StringUtility.commaSeparatedString(configuration.getRemoteMachineURLs());
+ }
+
+ protected void addContentTo(Configuration configuration, Element element) {
+ for (int i = 0; i < configuration.getRemoteMachineURLs().size(); i++) {
+ URL remoteMachineURL = configuration.getRemoteMachineURLs().get(i);
+ Element urlElement = new Element("remoteMachineURL");
+ urlElement.setAttribute("id", String.valueOf(i));
+ urlElement.setText(remoteMachineURL.toString());
+ element.addContent(urlElement);
+ }
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String remoteMachineURLs = source.remoteMachineURLs();
+ List strings = StringUtility.listFromCommaDelimitedString(remoteMachineURLs);
+ List result = new ArrayList(strings.size());
+ Set alreadyAddedURLStrings = new HashSet();
+ for (String string : strings)
+ try {
+ URL attemptedURL = new URL(string);
+ URL normalizedURL = new URL(attemptedURL.getProtocol(), attemptedURL.getHost(), attemptedURL.getPort(), "/jsunit");
+ if (!alreadyAddedURLStrings.contains(normalizedURL.toString())) {
+ result.add(normalizedURL);
+ alreadyAddedURLStrings.add(normalizedURL.toString());
+ }
+ } catch (MalformedURLException e) {
+ throw new ConfigurationException(this, remoteMachineURLs, e);
+ }
+ configuration.setRemoteMachineURLs(result);
+ }
+ },
+
+ RESOURCE_BASE("resourceBase", "Resource base", false, false) {
+ public String getValueString(Configuration configuration) {
+ return configuration.getResourceBase().getAbsolutePath();
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String resourceBaseString = source.resourceBase();
+ if (StringUtility.isEmpty(resourceBaseString))
+ resourceBaseString = ".";
+ try {
+ configuration.setResourceBase(new File(resourceBaseString));
+ } catch (Exception e) {
+ throw new ConfigurationException(this, resourceBaseString, e);
+ }
+ }
+ },
+
+ TIMEOUT_SECONDS("timeoutSeconds", "Test timeout (seconds)", false, false) {
+ public String getValueString(Configuration configuration) {
+ return String.valueOf(configuration.getTimeoutSeconds());
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String timeoutSecondsString = source.timeoutSeconds();
+ if (StringUtility.isEmpty(timeoutSecondsString))
+ timeoutSecondsString = "60";
+ try {
+ configuration.setTimeoutSeconds(Integer.parseInt(timeoutSecondsString));
+ } catch (NumberFormatException e) {
+ throw new ConfigurationException(ConfigurationProperty.TIMEOUT_SECONDS, timeoutSecondsString, e);
+ }
+
+ }
+ },
+
+ URL("url", "Test Page URL", true, false) {
+ public String getValueString(Configuration configuration) {
+ URL testURL = configuration.getTestURL();
+ return testURL == null ? "" : testURL.toString();
+ }
+
+ public void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException {
+ String urlString = source.url();
+ if (StringUtility.isEmpty(urlString))
+ return;
+ try {
+ configuration.setTestURL(new URL(urlString));
+ } catch (MalformedURLException e) {
+ throw new ConfigurationException(this, urlString, e);
+ }
+
+ }
+ };
+
+ private String name;
+ private String displayName;
+ private boolean isURL;
+ private boolean isMultiValued;
+
+ private ConfigurationProperty(String name, String displayName, boolean isURL, boolean isMultiValued) {
+ this.displayName = displayName;
+ this.name = name;
+ this.isURL = isURL;
+ this.isMultiValued = isMultiValued;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public abstract String getValueString(Configuration configuration);
+
+ public void addXmlTo(Element parentElement, Configuration configuration) {
+ Element element = new Element(name);
+ addContentTo(configuration, element);
+ parentElement.addContent(element);
+ }
+
+ protected void addContentTo(Configuration configuration, Element element) {
+ element.setText(getValueString(configuration));
+ }
+
+ public static List all() {
+ List result = Arrays.asList(ConfigurationProperty.values());
+ Collections.sort(result, comparator());
+ return result;
+ }
+
+ public static Comparator comparator() {
+ return new Comparator() {
+ public int compare(ConfigurationProperty property1, ConfigurationProperty property2) {
+ return property1.name().compareTo(property2.name());
+ }
+ };
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public boolean isURL() {
+ return isURL;
+ }
+
+ public List getValueStrings(Configuration configuration) {
+ List result = new ArrayList();
+ if (isMultiValued())
+ for (String value : StringUtility.listFromCommaDelimitedString(getValueString(configuration)))
+ result.add(value);
+ else
+ result.add(getValueString(configuration));
+ return result;
+ }
+
+ private boolean isMultiValued() {
+ return isMultiValued;
+ }
+
+ public abstract void configure(Configuration configuration, ConfigurationSource source) throws ConfigurationException;
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationSource.java
new file mode 100644
index 0000000..ff57717
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ConfigurationSource.java
@@ -0,0 +1,24 @@
+package net.jsunit.configuration;
+
+public interface ConfigurationSource {
+
+ String browserFileNames();
+
+ String closeBrowsersAfterTestRuns();
+
+ String description();
+
+ String logsDirectory();
+
+ String port();
+
+ String remoteMachineURLs();
+
+ String resourceBase();
+
+ String timeoutSeconds();
+
+ String url();
+
+ String ignoreUnresponsiveRemoteMachines();
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/DelegatingConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/DelegatingConfigurationSource.java
new file mode 100644
index 0000000..d0b8261
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/DelegatingConfigurationSource.java
@@ -0,0 +1,49 @@
+package net.jsunit.configuration;
+
+public class DelegatingConfigurationSource implements ConfigurationSource {
+ private ConfigurationSource source;
+
+ public DelegatingConfigurationSource(ConfigurationSource source) {
+ this.source = source;
+ }
+
+ public String browserFileNames() {
+ return source.browserFileNames();
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return source.closeBrowsersAfterTestRuns();
+ }
+
+ public String description() {
+ return source.description();
+ }
+
+ public String logsDirectory() {
+ return source.logsDirectory();
+ }
+
+ public String port() {
+ return source.port();
+ }
+
+ public String remoteMachineURLs() {
+ return source.remoteMachineURLs();
+ }
+
+ public String resourceBase() {
+ return source.resourceBase();
+ }
+
+ public String timeoutSeconds() {
+ return source.timeoutSeconds();
+ }
+
+ public String url() {
+ return source.url();
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return source.ignoreUnresponsiveRemoteMachines();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.java
new file mode 100644
index 0000000..bb93e7a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSource.java
@@ -0,0 +1,49 @@
+package net.jsunit.configuration;
+
+public class EnvironmentVariablesConfigurationSource implements ConfigurationSource {
+
+ private String environmentVariableValue(ConfigurationProperty property) {
+ return System.getProperty(property.getName());
+ }
+
+ public String resourceBase() {
+ return environmentVariableValue(ConfigurationProperty.RESOURCE_BASE);
+ }
+
+ public String port() {
+ return environmentVariableValue(ConfigurationProperty.PORT);
+ }
+
+ public String remoteMachineURLs() {
+ return environmentVariableValue(ConfigurationProperty.REMOTE_MACHINE_URLS);
+ }
+
+ public String logsDirectory() {
+ return environmentVariableValue(ConfigurationProperty.LOGS_DIRECTORY);
+ }
+
+ public String browserFileNames() {
+ return environmentVariableValue(ConfigurationProperty.BROWSER_FILE_NAMES);
+ }
+
+ public String url() {
+ return environmentVariableValue(ConfigurationProperty.URL);
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return environmentVariableValue(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS);
+ }
+
+ public String description() {
+ return environmentVariableValue(ConfigurationProperty.DESCRIPTION);
+ }
+
+ public String timeoutSeconds() {
+ return environmentVariableValue(ConfigurationProperty.TIMEOUT_SECONDS);
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return environmentVariableValue(ConfigurationProperty.IGNORE_UNRESPONSIVE_REMOTE_MACHINES);
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfiguration.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfiguration.java
new file mode 100644
index 0000000..94793eb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfiguration.java
@@ -0,0 +1,31 @@
+package net.jsunit.configuration;
+
+import net.jsunit.utility.StringUtility;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class FarmConfiguration {
+
+ private final FarmConfigurationSource source;
+
+ public FarmConfiguration(FarmConfigurationSource source) {
+ this.source = source;
+ }
+
+ public List getRemoteMachineURLs() {
+ String remoteMachineURLs = source.remoteMachineURLs();
+ List strings = StringUtility.listFromCommaDelimitedString(remoteMachineURLs);
+ List result = new ArrayList(strings.size());
+ for (String string : strings)
+ try {
+ result.add(new URL(string));
+ } catch (MalformedURLException e) {
+ throw new ConfigurationException(ConfigurationProperty.REMOTE_MACHINE_URLS, remoteMachineURLs, e);
+ }
+ return result;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfigurationSource.java
new file mode 100644
index 0000000..bade33f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/FarmConfigurationSource.java
@@ -0,0 +1,15 @@
+package net.jsunit.configuration;
+
+public interface FarmConfigurationSource {
+
+ String port();
+
+ String logsDirectory();
+
+ String logStatus();
+
+ String timeoutSeconds();
+
+ String remoteMachineURLs();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/PropertiesFileConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/PropertiesFileConfigurationSource.java
new file mode 100644
index 0000000..0e6f2be
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/PropertiesFileConfigurationSource.java
@@ -0,0 +1,80 @@
+package net.jsunit.configuration;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Properties;
+
+public class PropertiesFileConfigurationSource implements ConfigurationSource {
+
+ public static final String PROPERTIES_FILE_NAME = "jsunit.properties";
+
+ private Properties properties;
+ private String propertiesFileName;
+
+ public PropertiesFileConfigurationSource(String propertiesFileName) throws FileNotFoundException {
+ this.propertiesFileName = propertiesFileName;
+ loadProperties();
+ }
+
+ public PropertiesFileConfigurationSource() throws FileNotFoundException {
+ this(PROPERTIES_FILE_NAME);
+ }
+
+ private void loadProperties() throws FileNotFoundException {
+ properties = new Properties();
+ try {
+ FileInputStream fileInputStream = new FileInputStream(propertiesFileName);
+ properties.load(fileInputStream);
+ fileInputStream.close();
+ } catch (FileNotFoundException e) {
+ throw e;
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ }
+
+ private String propertyValue(ConfigurationProperty property) {
+ return properties.getProperty(property.getName());
+ }
+
+ public String resourceBase() {
+ return propertyValue(ConfigurationProperty.RESOURCE_BASE);
+ }
+
+ public String logsDirectory() {
+ return propertyValue(ConfigurationProperty.LOGS_DIRECTORY);
+ }
+
+ public String port() {
+ return propertyValue(ConfigurationProperty.PORT);
+ }
+
+ public String remoteMachineURLs() {
+ return propertyValue(ConfigurationProperty.REMOTE_MACHINE_URLS);
+ }
+
+ public String url() {
+ return propertyValue(ConfigurationProperty.URL);
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return propertyValue(ConfigurationProperty.IGNORE_UNRESPONSIVE_REMOTE_MACHINES);
+ }
+
+ public String browserFileNames() {
+ return propertyValue(ConfigurationProperty.BROWSER_FILE_NAMES);
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return propertyValue(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS);
+ }
+
+ public String description() {
+ return propertyValue(ConfigurationProperty.DESCRIPTION);
+ }
+
+ public String timeoutSeconds() {
+ return propertyValue(ConfigurationProperty.TIMEOUT_SECONDS);
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ServerType.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ServerType.java
new file mode 100644
index 0000000..e7ba868
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/configuration/ServerType.java
@@ -0,0 +1,129 @@
+package net.jsunit.configuration;
+
+import net.jsunit.utility.StringUtility;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+public enum ServerType {
+ STANDARD(
+ "Standard",
+ false,
+ true,
+ false,
+ Arrays.asList(new ConfigurationProperty[]{
+ ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS,
+ ConfigurationProperty.LOGS_DIRECTORY,
+ ConfigurationProperty.PORT,
+ ConfigurationProperty.RESOURCE_BASE,
+ ConfigurationProperty.TIMEOUT_SECONDS,
+ }),
+ Arrays.asList(new ConfigurationProperty[]{
+ ConfigurationProperty.BROWSER_FILE_NAMES,
+ ConfigurationProperty.DESCRIPTION,
+ ConfigurationProperty.URL,
+ })
+ ),
+ STANDARD_TEMPORARY(
+ "Standard Temporary",
+ STANDARD.isFarm(),
+ false,
+ true,
+ STANDARD.getRequiredConfigurationProperties(),
+ STANDARD.getOptionalConfigurationProperties()
+ ),
+ FARM(
+ "Farm",
+ true,
+ true,
+ false,
+ Arrays.asList(new ConfigurationProperty[]{
+ ConfigurationProperty.LOGS_DIRECTORY,
+ ConfigurationProperty.PORT,
+ ConfigurationProperty.REMOTE_MACHINE_URLS,
+ ConfigurationProperty.IGNORE_UNRESPONSIVE_REMOTE_MACHINES,
+ }),
+ Arrays.asList(new ConfigurationProperty []{
+ ConfigurationProperty.DESCRIPTION,
+ ConfigurationProperty.RESOURCE_BASE,
+ ConfigurationProperty.URL,
+ })
+ );
+
+ private List requiredProperties;
+ private List optionalProperties;
+ private String displayName;
+ private boolean isFarm;
+ private boolean performUpToDateCheck;
+ private boolean isTemporary;
+
+ private ServerType(
+ String displayName,
+ boolean isFarm,
+ boolean performVersionUpToDateCheck,
+ boolean isTemporary,
+ List required,
+ List optional) {
+ this.performUpToDateCheck = performVersionUpToDateCheck;
+ this.displayName = displayName;
+ this.isFarm = isFarm;
+ this.isTemporary = isTemporary;
+ this.requiredProperties = required;
+ this.optionalProperties = optional;
+ }
+
+ public List getRequiredConfigurationProperties() {
+ return requiredProperties;
+ }
+
+ public List getOptionalConfigurationProperties() {
+ return optionalProperties;
+ }
+
+ public List getPropertiesInvalidFor(Configuration configuration) {
+ List result = new ArrayList();
+
+ for (ConfigurationProperty property : getRequiredAndOptionalConfigurationProperties()) {
+ try {
+ String valueString = property.getValueString(configuration);
+ if (isPropertyRequired(property) && StringUtility.isEmpty(valueString))
+ result.add(property);
+ } catch (ConfigurationException e) {
+ result.add(property);
+ }
+ }
+
+ return result;
+
+ }
+
+ private boolean isPropertyRequired(ConfigurationProperty property) {
+ return getRequiredConfigurationProperties().contains(property);
+ }
+
+ public List getRequiredAndOptionalConfigurationProperties() {
+ List result = new ArrayList();
+ result.addAll(getRequiredConfigurationProperties());
+ result.addAll(getOptionalConfigurationProperties());
+ Collections.sort(result, ConfigurationProperty.comparator());
+ return result;
+ }
+
+ public boolean isFarm() {
+ return isFarm;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public boolean shouldPerformUpToDateCheck() {
+ return performUpToDateCheck;
+ }
+
+ public boolean isTemporary() {
+ return isTemporary;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/BrowserResultRepository.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/BrowserResultRepository.java
new file mode 100644
index 0000000..3606f3b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/BrowserResultRepository.java
@@ -0,0 +1,12 @@
+package net.jsunit.logging;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public interface BrowserResultRepository {
+
+ void store(BrowserResult result);
+
+ BrowserResult retrieve(String id, Browser browser);
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/FileBrowserResultRepository.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/FileBrowserResultRepository.java
new file mode 100644
index 0000000..af62fd5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/FileBrowserResultRepository.java
@@ -0,0 +1,49 @@
+package net.jsunit.logging;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultBuilder;
+import net.jsunit.model.BrowserSource;
+import net.jsunit.utility.FileUtility;
+import net.jsunit.utility.XmlUtility;
+
+import java.io.File;
+
+public class FileBrowserResultRepository implements BrowserResultRepository {
+
+ private static final String LOG_PREFIX = "JSTEST-";
+
+ private File logsDirectory;
+
+ public FileBrowserResultRepository(File logsDirectory) {
+ this.logsDirectory = logsDirectory;
+ if (!logsDirectory.exists())
+ logsDirectory.mkdir();
+ }
+
+ private File logFileForId(String id, Browser browser) {
+ return new File(logsDirectory + File.separator + LOG_PREFIX + id + "." + browser.getId() + ".xml");
+ }
+
+ public void deleteDirectory(String directoryName) {
+ File file = new File(directoryName);
+ file.delete();
+ }
+
+ public void store(BrowserResult result) {
+ String xml = XmlUtility.asString(result.asXml());
+ FileUtility.write(logFileForId(result.getId(), result.getBrowser()), xml);
+ }
+
+ public BrowserResult retrieve(String id, final Browser browser) {
+ File logFile = logFileForId(id, browser);
+ if (logFile.exists())
+ return new BrowserResultBuilder(new BrowserSource() {
+ public Browser getBrowserById(int id) {
+ return browser;
+ }
+ }).build(logFile);
+ return null;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/StubBrowserResultRepository.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/StubBrowserResultRepository.java
new file mode 100644
index 0000000..e06df9d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/logging/StubBrowserResultRepository.java
@@ -0,0 +1,13 @@
+package net.jsunit.logging;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class StubBrowserResultRepository implements BrowserResultRepository {
+ public void store(BrowserResult result) {
+ }
+
+ public BrowserResult retrieve(String id, Browser browser) {
+ return null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/AbstractResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/AbstractResult.java
new file mode 100644
index 0000000..e8c0b33
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/AbstractResult.java
@@ -0,0 +1,54 @@
+package net.jsunit.model;
+
+import java.util.List;
+
+public abstract class AbstractResult implements Result {
+
+ public ResultType getResultType() {
+ ResultType worstResultType = ResultType.SUCCESS;
+ for (Result childResult : getChildren()) {
+ ResultType childResultType = childResult.getResultType();
+ if (childResultType.isWorseThan(worstResultType))
+ worstResultType = childResultType;
+ }
+ return worstResultType;
+ }
+
+ public int getFailureCount() {
+ int failureCount = 0;
+ for (Result childResult : getChildren())
+ failureCount += childResult.getFailureCount();
+ return failureCount;
+ }
+
+ public int getErrorCount() {
+ int errorCount = 0;
+ for (Result childResult : getChildren())
+ errorCount += childResult.getErrorCount();
+ return errorCount;
+ }
+
+ public int getTestCount() {
+ int result = 0;
+ for (Result childResult : getChildren())
+ result += childResult.getTestCount();
+ return result;
+ }
+
+ public boolean wasSuccessful() {
+ return getResultType() == ResultType.SUCCESS;
+ }
+
+ protected abstract List extends Result> getChildren();
+
+ public String displayString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("The test run had ");
+ buffer.append(getErrorCount());
+ buffer.append(" error(s) and ");
+ buffer.append(getFailureCount());
+ buffer.append(" failure(s).");
+ return buffer.toString();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Browser.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Browser.java
new file mode 100644
index 0000000..21806dd
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Browser.java
@@ -0,0 +1,60 @@
+package net.jsunit.model;
+
+import net.jsunit.utility.StringUtility;
+
+import java.util.List;
+
+public class Browser {
+
+ public static final String DEFAULT_SYSTEM_BROWSER = "default";
+
+ private String fileName;
+ private String killCommand;
+ private int id;
+
+ public Browser(String fullFileName, int id) {
+ this.id = id;
+ List launchAndKill = StringUtility.listFromSemiColonDelimitedString(fullFileName);
+ this.fileName = launchAndKill.size() >= 1 ? launchAndKill.get(0) : null;
+ this.killCommand = launchAndKill.size() >= 2 ? launchAndKill.get(1) : null;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public String getKillCommand() {
+ return killCommand;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public boolean hasId(int anId) {
+ return id == anId;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ final Browser browser = (Browser) o;
+
+ if (id != browser.id) return false;
+ return !(fileName != null ? !fileName.equals(browser.fileName) : browser.fileName != null);
+
+ }
+
+ public int hashCode() {
+ int result;
+ result = (fileName != null ? fileName.hashCode() : 0);
+ result = 29 * result + id;
+ return result;
+ }
+
+ public boolean isDefault() {
+ return fileName.equals(DEFAULT_SYSTEM_BROWSER);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResult.java
new file mode 100644
index 0000000..4ddd33e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResult.java
@@ -0,0 +1,201 @@
+package net.jsunit.model;
+
+import net.jsunit.XmlRenderable;
+import net.jsunit.utility.StringUtility;
+import org.jdom.Document;
+import org.jdom.Element;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BrowserResult extends AbstractResult implements XmlRenderable {
+
+ private Browser browser;
+ private String remoteAddress;
+ private String id;
+ private String jsUnitVersion;
+ private String userAgent;
+ private String baseURL;
+ private double time;
+ private List testPageResults = new ArrayList();
+ private String serverSideExceptionStackTrace;
+ private ResultType resultType;
+
+ public BrowserResult() {
+ this.id = String.valueOf(System.currentTimeMillis());
+ }
+
+ public Browser getBrowser() {
+ return browser;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ if (id != null)
+ this.id = id;
+ }
+
+ public boolean hasId(String id) {
+ return this.id.equals(id);
+ }
+
+ public String getJsUnitVersion() {
+ return jsUnitVersion;
+ }
+
+ public void setJsUnitVersion(String jsUnitVersion) {
+ this.jsUnitVersion = jsUnitVersion;
+ }
+
+ public String getBaseURL() {
+ return baseURL;
+ }
+
+ public void setBaseURL(String baseURL) {
+ this.baseURL = baseURL;
+ }
+
+ public String getUserAgent() {
+ return userAgent;
+ }
+
+ public void setUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ }
+
+ public double getTime() {
+ return time;
+ }
+
+ public void setTime(double time) {
+ this.time = time;
+ }
+
+ public List getTestCaseResults() {
+ List result = new ArrayList();
+ for (TestPageResult pageResult : getTestPageResults())
+ result.addAll(pageResult.getTestCaseResults());
+ return result;
+ }
+
+ public void setTestCaseStrings(String[] testCaseResultStrings) {
+ buildTestCaseResults(testCaseResultStrings);
+ }
+
+ public String getRemoteAddress() {
+ return remoteAddress;
+ }
+
+ public void setRemoteAddress(String remoteAddress) {
+ this.remoteAddress = remoteAddress;
+ }
+
+ private void buildTestCaseResults(String[] testCaseResultStrings) {
+ if (testCaseResultStrings == null)
+ return;
+ for (String testCaseResultString : testCaseResultStrings)
+ addTestCaseResult(TestCaseResult.fromString(testCaseResultString));
+ }
+
+ public Element asXml() {
+ return new BrowserResultWriter(this).asXml();
+ }
+
+ public String asXmlFragment() {
+ return new BrowserResultWriter(this).writeXmlFragment();
+ }
+
+ public void addTestCaseResult(TestCaseResult testCaseResult) {
+ String testPageName = testCaseResult.getTestPageName();
+ TestPageResult testPageResult = findTestPageResultForTestPageWithName(testPageName);
+ if (testPageResult == null) {
+ testPageResult = new TestPageResult(testPageName);
+ testPageResults.add(testPageResult);
+ }
+ testPageResult.addTestCaseResult(testCaseResult);
+ }
+
+ private TestPageResult findTestPageResultForTestPageWithName(String testPageName) {
+ for (TestPageResult testPageResult : testPageResults)
+ if (testPageResult.getTestPageName().equals(testPageName))
+ return testPageResult;
+ return null;
+ }
+
+ public ResultType getResultType() {
+ if (resultType == null)
+ return super.getResultType();
+ return resultType;
+ }
+
+ public Document asXmlDocument() {
+ return new Document(asXml());
+ }
+
+ public List getTestPageResults() {
+ return testPageResults;
+ }
+
+ public String getDisplayString() {
+ return getResultType().getDisplayString();
+ }
+
+ public boolean completedTestRun() {
+ return getResultType().completedTestRun();
+ }
+
+ public boolean timedOut() {
+ return getResultType().timedOut();
+ }
+
+ public boolean failedToLaunch() {
+ return getResultType().failedToLaunch();
+ }
+
+ public boolean externallyShutDown() {
+ return getResultType().externallyShutDown();
+ }
+
+ public void setServerSideException(Throwable throwable) {
+ serverSideExceptionStackTrace = StringUtility.stackTraceAsString(throwable);
+ }
+
+ public void setFailedToLaunch() {
+ this.resultType = ResultType.FAILED_TO_LAUNCH;
+ }
+
+ public void setTimedOut() {
+ this.resultType = ResultType.TIMED_OUT;
+ }
+
+ public void setExternallyShutDown() {
+ this.resultType = ResultType.EXTERNALLY_SHUT_DOWN;
+ }
+
+ public String getServerSideExceptionStackTrace() {
+ return serverSideExceptionStackTrace;
+ }
+
+ public void setServerSideExceptionStackTrace(String serverSideExceptionStackTrace) {
+ this.serverSideExceptionStackTrace = serverSideExceptionStackTrace;
+ }
+
+ public boolean hasServerSideExceptionStackTrace() {
+ return getServerSideExceptionStackTrace() != null;
+ }
+
+ protected List extends Result> getChildren() {
+ return testPageResults;
+ }
+
+ public void setBrowser(Browser browser) {
+ this.browser = browser;
+ }
+
+ public boolean isForBrowser(Browser browser) {
+ return this.browser.equals(browser);
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultBuilder.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultBuilder.java
new file mode 100644
index 0000000..df79779
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultBuilder.java
@@ -0,0 +1,118 @@
+package net.jsunit.model;
+
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Attribute;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.input.SAXBuilder;
+
+import java.io.File;
+import java.util.List;
+import java.util.logging.Logger;
+
+public class BrowserResultBuilder {
+
+ private Logger logger = Logger.getLogger("net.jsunit");
+ private BrowserSource browserSource;
+
+ public BrowserResultBuilder(BrowserSource browserSource) {
+ this.browserSource = browserSource;
+ }
+
+ public BrowserResult build(File file) {
+ try {
+ Document document = new SAXBuilder().build(file);
+ return build(document);
+ } catch (Exception e) {
+ logger.severe("Failed to read file " + file + ": " + e.getMessage());
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public BrowserResult build(String string) {
+ Document document = XmlUtility.asXmlDocument(string);
+ return build(document);
+ }
+
+ @SuppressWarnings("unchecked")
+ public BrowserResult build(Document document) {
+ Element root = document.getRootElement();
+ return build(root);
+ }
+
+ @SuppressWarnings("unchecked")
+ public BrowserResult build(Element root) {
+ BrowserResult result = new BrowserResult();
+ if (failedToLaunch(root))
+ result.setFailedToLaunch();
+ else if (timedOut(root))
+ result.setTimedOut();
+ else if (externallyShutDown(root))
+ result.setExternallyShutDown();
+ updateWithHeaders(result, root);
+ updateWithProperties(root.getChild(BrowserResultWriter.PROPERTIES), result);
+ Element testCasesElement = root.getChild(BrowserResultWriter.TEST_CASES);
+ if (testCasesElement != null) {
+ List children = testCasesElement.getChildren(TestCaseResultWriter.TEST_CASE);
+ updateWithTestCaseResults(children, result);
+ }
+ return result;
+ }
+
+ private boolean failedToLaunch(Element root) {
+ Attribute failedToLaunchAttribute = root.getAttribute(BrowserResultWriter.FAILED_TO_LAUNCH);
+ return failedToLaunchAttribute != null && failedToLaunchAttribute.getValue().equals(String.valueOf(true));
+ }
+
+ private boolean timedOut(Element root) {
+ Attribute timedOutAttribute = root.getAttribute(BrowserResultWriter.TIMED_OUT);
+ return timedOutAttribute != null && timedOutAttribute.getValue().equals(String.valueOf(true));
+ }
+
+ private boolean externallyShutDown(Element root) {
+ Attribute externallyShutDownAttribute = root.getAttribute(BrowserResultWriter.EXTERNALLY_SHUT_DOWN);
+ return externallyShutDownAttribute != null && externallyShutDownAttribute.getValue().equals(String.valueOf(true));
+ }
+
+ private void updateWithHeaders(BrowserResult result, Element element) {
+ String id = element.getAttributeValue(BrowserResultWriter.ID);
+ if (id != null)
+ result.setId(id);
+ String time = element.getAttributeValue(BrowserResultWriter.TIME);
+ if (time != null)
+ result.setTime(Double.parseDouble(time));
+ }
+
+ private void updateWithProperties(Element element, BrowserResult result) {
+ for (Object child : element.getChildren()) {
+ Element next = (Element) child;
+ String key = next.getAttributeValue(BrowserResultWriter.PROPERTY_KEY);
+ String value = next.getAttributeValue(BrowserResultWriter.PROPERTY_VALUE);
+
+ if (BrowserResultWriter.JSUNIT_VERSION.equals(key))
+ result.setJsUnitVersion(value);
+ else if (BrowserResultWriter.BROWSER_ID.equals(key)) {
+ int browserId = Integer.valueOf(value);
+ Browser browser = browserSource.getBrowserById(browserId);
+ result.setBrowser(browser);
+ } else if (BrowserResultWriter.USER_AGENT.equals(key))
+ result.setUserAgent(value);
+ else if (BrowserResultWriter.REMOTE_ADDRESS.equals(key))
+ result.setRemoteAddress(value);
+ else if (BrowserResultWriter.URL.equals(key))
+ result.setBaseURL(value);
+ else if (BrowserResultWriter.SERVER_SIDE_EXCEPTION_STACK_TRACE.equals(key)) {
+ String stackTrace = next.getText();
+ result.setServerSideExceptionStackTrace(stackTrace);
+ }
+ }
+ }
+
+ private void updateWithTestCaseResults(List testCaseElements, BrowserResult result) {
+ TestCaseResultBuilder testCaseBuilder = new TestCaseResultBuilder();
+ for (Element element : testCaseElements) {
+ result.addTestCaseResult(testCaseBuilder.build(element));
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultWriter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultWriter.java
new file mode 100644
index 0000000..dc0195b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserResultWriter.java
@@ -0,0 +1,122 @@
+package net.jsunit.model;
+
+import org.jdom.CDATA;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.output.XMLOutputter;
+
+public class BrowserResultWriter {
+
+ public static final String
+ ID = "id",
+ BROWSER_RESULT = "browserResult",
+ BROWSER_FILE_NAME = "browserFileName",
+ BROWSER_ID = "browserId",
+ USER_AGENT = "userAgent",
+ TIME = "time",
+ TEST_CASES = "testCases",
+ TEST_CASE = "testCase",
+ TIMED_OUT = "timedOut",
+ FAILED_TO_LAUNCH = "failedToLaunch",
+ EXTERNALLY_SHUT_DOWN = "externallyShutDown",
+ JSUNIT_VERSION = "jsUnitVersion",
+ REMOTE_ADDRESS = "remoteAddress",
+ SERVER_SIDE_EXCEPTION_STACK_TRACE = "serverSideExceptionStackTrace",
+ PROPERTIES = "properties",
+ PROPERTY = "property",
+ PROPERTY_KEY = "name",
+ PROPERTY_VALUE = "value",
+ URL = "url";
+
+ BrowserResult browserResult;
+
+ public BrowserResultWriter(BrowserResult result) {
+ this.browserResult = result;
+ }
+
+ public String writeXml() {
+ Element root = createRootElement();
+ Document document = new Document(root);
+ return new XMLOutputter().outputString(document);
+ }
+
+ public String writeXmlFragment() {
+ return new XMLOutputter().outputString(createRootElement());
+ }
+
+ private Element createRootElement() {
+ Element root = new Element(BROWSER_RESULT);
+ if (browserResult.timedOut())
+ root.setAttribute(TIMED_OUT, String.valueOf(true));
+ if (browserResult.failedToLaunch())
+ root.setAttribute(FAILED_TO_LAUNCH, String.valueOf(true));
+ if (browserResult.externallyShutDown())
+ root.setAttribute(EXTERNALLY_SHUT_DOWN, String.valueOf(true));
+ addPropertiesElementTo(root);
+ if (browserResult.completedTestRun()) {
+ root.setAttribute(ID, browserResult.getId());
+ root.setAttribute(TIME, String.valueOf(browserResult.getTime()));
+ addTestCasesElementTo(root);
+ }
+ return root;
+ }
+
+ private void addPropertiesElementTo(Element element) {
+ Element properties = new Element(PROPERTIES);
+ element.addContent(properties);
+
+ Browser browser = browserResult.getBrowser();
+ if (browser != null) {
+ addProperty(properties, BROWSER_FILE_NAME, browser.getFileName());
+ addProperty(properties, BROWSER_ID, String.valueOf(browserResult.getBrowser().getId()));
+ }
+ if (browserResult.completedTestRun()) {
+ addProperty(properties, JSUNIT_VERSION, browserResult.getJsUnitVersion());
+ addProperty(properties, USER_AGENT, browserResult.getUserAgent());
+ addProperty(properties, REMOTE_ADDRESS, browserResult.getRemoteAddress());
+ addProperty(properties, URL, browserResult.getBaseURL());
+ }
+ if (browserResult.hasServerSideExceptionStackTrace()) {
+ Element stackTrace = createPropertyElement(SERVER_SIDE_EXCEPTION_STACK_TRACE);
+ stackTrace.addContent(new CDATA(browserResult.getServerSideExceptionStackTrace()));
+ properties.addContent(stackTrace);
+ }
+ }
+
+ private void addProperty(Element parent, String name, String value) {
+ Element property = createPropertyElement(name);
+ property.setAttribute(PROPERTY_VALUE, value == null ? "" : value);
+ parent.addContent(property);
+ }
+
+ private Element createPropertyElement(String name) {
+ Element property = new Element(PROPERTY);
+ property.setAttribute(PROPERTY_KEY, name);
+ return property;
+ }
+
+ private void addTestCasesElementTo(Element element) {
+ Element testCasesElement = new Element(TEST_CASES);
+ for (TestCaseResult result : browserResult.getTestCaseResults()) {
+ new TestCaseResultWriter(result).addXmlTo(testCasesElement);
+ }
+ element.addContent(testCasesElement);
+ }
+
+ public String writeProblems() {
+ StringBuffer buffer = new StringBuffer();
+ for (TestCaseResult result : browserResult.getTestCaseResults()) {
+ if (!result.wasSuccessful()) {
+ if (buffer.length() > 0)
+ buffer.append("\n");
+ String problemMessage = result.getProblemSummary();
+ buffer.append(problemMessage);
+ }
+ }
+ return buffer.toString();
+ }
+
+ public Element asXml() {
+ return createRootElement();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserSource.java
new file mode 100644
index 0000000..e655bad
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/BrowserSource.java
@@ -0,0 +1,6 @@
+package net.jsunit.model;
+
+public interface BrowserSource {
+
+ Browser getBrowserById(int id);
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResult.java
new file mode 100644
index 0000000..4c85a67
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResult.java
@@ -0,0 +1,37 @@
+package net.jsunit.model;
+
+import net.jsunit.XmlRenderable;
+import org.jdom.Element;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class DistributedTestRunResult extends AbstractResult implements XmlRenderable {
+
+ public static final String NAME = "distributedTestRunResult";
+
+ private List testRunResults = new ArrayList();
+
+ protected List extends Result> getChildren() {
+ return testRunResults;
+ }
+
+ public void addTestRunResult(TestRunResult result) {
+ testRunResults.add(result);
+ Collections.sort(testRunResults);
+ }
+
+ public Element asXml() {
+ Element root = new Element(NAME);
+ root.setAttribute("type", getResultType().name());
+ for (TestRunResult testRunResult : testRunResults)
+ root.addContent(testRunResult.asXml());
+ return root;
+ }
+
+ public List getTestRunResults() {
+ return testRunResults;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResultBuilder.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResultBuilder.java
new file mode 100644
index 0000000..56e0503
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/DistributedTestRunResultBuilder.java
@@ -0,0 +1,29 @@
+package net.jsunit.model;
+
+import org.jdom.Document;
+import org.jdom.Element;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DistributedTestRunResultBuilder {
+
+ private BrowserSource browserSource;
+
+ public DistributedTestRunResultBuilder(BrowserSource browserSource) {
+ this.browserSource = browserSource;
+ }
+
+ public DistributedTestRunResult build(Document document) {
+ DistributedTestRunResult result = new DistributedTestRunResult();
+ Element root = document.getRootElement();
+ TestRunResultBuilder individualTestRunResultBuilder = new TestRunResultBuilder(browserSource);
+ for (Element testRunResultElement : new ArrayList((List) root.getChildren(TestRunResultBuilder.NAME)))
+ {
+ testRunResultElement.detach();
+ TestRunResult testRunResult = individualTestRunResultBuilder.build(new Document(testRunResultElement));
+ result.addTestRunResult(testRunResult);
+ }
+ return result;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Result.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Result.java
new file mode 100644
index 0000000..cf3915e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/Result.java
@@ -0,0 +1,17 @@
+package net.jsunit.model;
+
+public interface Result {
+
+ public int getErrorCount();
+
+ public int getFailureCount();
+
+ public int getTestCount();
+
+ public ResultType getResultType();
+
+ public boolean wasSuccessful();
+
+ public String displayString();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/ResultType.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/ResultType.java
new file mode 100644
index 0000000..ac165b4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/ResultType.java
@@ -0,0 +1,76 @@
+package net.jsunit.model;
+
+public enum ResultType {
+ UNRESPONSIVE {
+ public String getDisplayString() {
+ return "unresponsive";
+ }
+
+ },
+ FAILED_TO_LAUNCH {
+ public String getDisplayString() {
+ return "failed to launch";
+ }
+
+ public boolean failedToLaunch() {
+ return true;
+ }
+ },
+ TIMED_OUT {
+ public String getDisplayString() {
+ return "timed out";
+ }
+
+ public boolean timedOut() {
+ return true;
+ }
+ },
+ EXTERNALLY_SHUT_DOWN {
+ public String getDisplayString() {
+ return "externally shut down";
+ }
+
+ public boolean externallyShutDown() {
+ return true;
+ }
+
+ },
+ ERROR {
+ public String getDisplayString() {
+ return "error";
+ }
+ },
+ FAILURE {
+ public String getDisplayString() {
+ return "failure";
+ }
+ },
+ SUCCESS {
+ public String getDisplayString() {
+ return "success";
+ }
+ };
+
+ public abstract String getDisplayString();
+
+ public final boolean completedTestRun() {
+ return !timedOut() && !failedToLaunch() && !externallyShutDown();
+ }
+
+ public boolean timedOut() {
+ return false;
+ }
+
+ public boolean failedToLaunch() {
+ return false;
+ }
+
+ public boolean externallyShutDown() {
+ return false;
+ }
+
+ public boolean isWorseThan(ResultType other) {
+ return ordinal() < other.ordinal();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResult.java
new file mode 100644
index 0000000..5179307
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResult.java
@@ -0,0 +1,147 @@
+package net.jsunit.model;
+
+import org.jdom.Element;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+public class TestCaseResult extends AbstractResult {
+
+ public static final String TEST_PAGE_TEST_NAME_DELIMITER = ":";
+ public static final String DELIMITER = "|";
+ public static final String ERROR_INDICATOR = "E";
+ public static final String FAILURE_INDICATOR = "F";
+ private String testPageName;
+ private String name;
+ private double time;
+ private String failure, error;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getError() {
+ return error;
+ }
+
+ public void setError(String error) {
+ this.error = error;
+ }
+
+ public String getFailure() {
+ return failure;
+ }
+
+ public void setFailure(String failure) {
+ this.failure = failure;
+ }
+
+ public double getTime() {
+ return time;
+ }
+
+ public void setTimeTaken(double time) {
+ this.time = time;
+ }
+
+ public boolean hadError() {
+ return error != null;
+ }
+
+ public boolean hadFailure() {
+ return failure != null;
+ }
+
+ public static TestCaseResult fromString(String string) {
+ TestCaseResult result = new TestCaseResult();
+ StringTokenizer toker = new StringTokenizer(string, DELIMITER);
+ try {
+ String fullyQualifiedName;
+ try {
+ fullyQualifiedName = URLDecoder.decode(toker.nextToken(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ result.setFullyQualifiedName(fullyQualifiedName);
+ result.setTimeTaken(Double.parseDouble(toker.nextToken()));
+ String successString = toker.nextToken();
+ if (successString.equals(ERROR_INDICATOR))
+ result.setError(toker.nextToken());
+ else if (successString.equals(FAILURE_INDICATOR))
+ result.setFailure(toker.nextToken());
+ } catch (NoSuchElementException ex) {
+ result.setError("Malformed test result: '" + string + "'.");
+ }
+ return result;
+ }
+
+ public void setFullyQualifiedName(String fullyQualifiedName) {
+ int colonIndex = fullyQualifiedName.lastIndexOf(TEST_PAGE_TEST_NAME_DELIMITER);
+ setTestPageName(fullyQualifiedName.substring(0, colonIndex));
+ setName(fullyQualifiedName.substring(colonIndex + 1));
+ }
+
+ public static TestCaseResult fromXmlElement(Element testCaseElement) {
+ return new TestCaseResultBuilder().build(testCaseElement);
+ }
+
+ public String getXmlFragment() {
+ return new TestCaseResultWriter(this).getXmlFragment();
+ }
+
+ public String getProblemSummary() {
+ return new TestCaseResultWriter(this).getProblemSummary();
+ }
+
+ public void setTestPageName(String testPageName) {
+ this.testPageName = testPageName;
+ }
+
+ public String getFullyQualifiedName() {
+ return testPageName + TEST_PAGE_TEST_NAME_DELIMITER + name;
+ }
+
+ public String getTestPageName() {
+ return testPageName;
+ }
+
+ public String toString() {
+ return getFullyQualifiedName() + ": " + getResultType().getDisplayString();
+ }
+
+ public int getErrorCount() {
+ return hadError() ? 1 : 0;
+ }
+
+ public int getFailureCount() {
+ return hadFailure() ? 1 : 0;
+ }
+
+ public int getTestCount() {
+ return 1;
+ }
+
+ protected List extends Result> getChildren() {
+ return null;
+ }
+
+ public boolean wasSuccessful() {
+ return !hadError() && !hadFailure();
+ }
+
+ public ResultType getResultType() {
+ if (hadError())
+ return ResultType.ERROR;
+ if (hadFailure())
+ return ResultType.FAILURE;
+ return ResultType.SUCCESS;
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultBuilder.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultBuilder.java
new file mode 100644
index 0000000..7d6fc48
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultBuilder.java
@@ -0,0 +1,32 @@
+package net.jsunit.model;
+
+import org.jdom.Element;
+
+public class TestCaseResultBuilder {
+
+ public TestCaseResult build(Element element) {
+ TestCaseResult result = new TestCaseResult();
+ updateWithHeaders(result, element);
+ updateWithMessage(result, element);
+ return result;
+ }
+
+ private void updateWithHeaders(TestCaseResult result, Element element) {
+ String fullyQualifiedName = element.getAttributeValue(TestCaseResultWriter.NAME);
+ result.setFullyQualifiedName(fullyQualifiedName);
+ result.setTimeTaken(Double.parseDouble(element.getAttributeValue(TestCaseResultWriter.TIME)));
+ }
+
+ private void updateWithMessage(TestCaseResult result, Element element) {
+ for (Object object : element.getChildren()) {
+ Element next = (Element) object;
+ String type = next.getName();
+ String message = next.getText();
+ if (TestCaseResultWriter.FAILURE.equals(type))
+ result.setFailure(message);
+ else if (TestCaseResultWriter.ERROR.equals(type))
+ result.setError(message);
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultWriter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultWriter.java
new file mode 100644
index 0000000..81506e0
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestCaseResultWriter.java
@@ -0,0 +1,64 @@
+package net.jsunit.model;
+
+import org.jdom.Element;
+import org.jdom.output.XMLOutputter;
+
+public class TestCaseResultWriter {
+ public static final String
+ TEST_CASE = "testCase",
+ NAME = "name",
+ TIME = "time",
+ FAILURE = "failure",
+ ERROR = "error",
+ MESSAGE = "message";
+
+ private TestCaseResult result;
+
+ public TestCaseResultWriter(TestCaseResult result) {
+ this.result = result;
+ }
+
+ public void addXmlTo(Element element) {
+ element.addContent(createTestCaseElement());
+ }
+
+ public Element createTestCaseElement() {
+ Element testCaseElement = new Element(TEST_CASE);
+ try {
+ testCaseElement.setAttribute(NAME, result.getFullyQualifiedName().replace('\u0000', ' '));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ testCaseElement.setAttribute(TIME, String.valueOf(result.getTime()));
+ if (result.hadFailure()) {
+ Element failureElement = new Element(FAILURE);
+ try {
+ failureElement.setText(result.getFailure().replace('\u0000', ' '));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ testCaseElement.addContent(failureElement);
+ } else if (result.hadError()) {
+ Element errorElement = new Element(ERROR);
+ try {
+ errorElement.setText(result.getError().replace('\u0000', ' '));
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ testCaseElement.addContent(errorElement);
+ }
+ return testCaseElement;
+ }
+
+ public String getProblemSummary() {
+ if (result.hadFailure())
+ return result.getFullyQualifiedName() + " failed:\n" + result.getFailure();
+ else if (result.hadError())
+ return result.getFullyQualifiedName() + " had an error:\n" + result.getError();
+ return null;
+ }
+
+ public String getXmlFragment() {
+ return new XMLOutputter().outputString(createTestCaseElement());
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestPageResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestPageResult.java
new file mode 100644
index 0000000..2da0c6c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestPageResult.java
@@ -0,0 +1,31 @@
+package net.jsunit.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestPageResult extends AbstractResult {
+
+ private final String testPageName;
+ private List testCaseResults = new ArrayList();
+
+ public TestPageResult(String testPageName) {
+ this.testPageName = testPageName;
+ }
+
+ public void addTestCaseResult(TestCaseResult testCaseResult) {
+ testCaseResults.add(testCaseResult);
+ }
+
+ public String getTestPageName() {
+ return testPageName;
+ }
+
+ public List getTestCaseResults() {
+ return testCaseResults;
+ }
+
+ protected List extends Result> getChildren() {
+ return testCaseResults;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResult.java
new file mode 100644
index 0000000..89d4efa
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResult.java
@@ -0,0 +1,129 @@
+package net.jsunit.model;
+
+import net.jsunit.XmlRenderable;
+import net.jsunit.utility.SystemUtility;
+import org.jdom.Element;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestRunResult extends AbstractResult implements XmlRenderable, Comparable {
+
+ private List browserResults = new ArrayList();
+ private URL url;
+ private String osString;
+ private String ipAddress;
+ private String hostname;
+ private boolean unresponsive = false;
+
+ public TestRunResult() {
+ this(null);
+ }
+
+ public TestRunResult(URL url) {
+ this.url = url;
+ }
+
+ public void addBrowserResult(BrowserResult browserResult) {
+ browserResults.add(browserResult);
+ }
+
+ public Element asXml() {
+ Element root = new Element("testRunResult");
+ root.setAttribute("type", getResultType().name());
+ if (url != null)
+ root.setAttribute("url", url.toString());
+ if (hasProperties()) {
+ Element properties = new Element("properties");
+ addProperties(properties);
+ root.addContent(properties);
+ }
+ for (BrowserResult browserResult : browserResults)
+ root.addContent(browserResult.asXml());
+ return root;
+ }
+
+ private boolean hasProperties() {
+ return osString != null || ipAddress != null || hostname != null;
+ }
+
+ private void addProperties(Element element) {
+ if (osString != null)
+ addProperty(element, "os", osString);
+ if (ipAddress != null)
+ addProperty(element, "ipAddress", ipAddress);
+ if (hostname != null)
+ addProperty(element, "hostname", hostname);
+ }
+
+ private void addProperty(Element element, String name, String value) {
+ Element property = new Element("property");
+ property.setAttribute("name", name);
+ property.setAttribute("value", value);
+ element.addContent(property);
+ }
+
+ protected List extends Result> getChildren() {
+ return browserResults;
+ }
+
+ public void setUnresponsive() {
+ unresponsive = true;
+ }
+
+ public boolean wasUnresponsive() {
+ return unresponsive;
+ }
+
+ public URL getUrl() {
+ return url;
+ }
+
+ public ResultType getResultType() {
+ if (unresponsive)
+ return ResultType.UNRESPONSIVE;
+ else
+ return super.getResultType();
+ }
+
+ public void setOsString(String osString) {
+ this.osString = osString;
+ }
+
+ public void setIpAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ public void setURL(URL url) {
+ this.url = url;
+ }
+
+ public String getOsString() {
+ return osString;
+ }
+
+ public String getIpAddress() {
+ return ipAddress;
+ }
+
+ public String getHostname() {
+ return hostname;
+ }
+
+ public int compareTo(TestRunResult other) {
+ if (url == null | other.getUrl() == null)
+ return 0;
+ return url.toString().compareTo(other.getUrl().toString());
+ }
+
+ public void initializeProperties() {
+ setOsString(SystemUtility.osString());
+ setHostname(SystemUtility.hostname());
+ setIpAddress(SystemUtility.ipAddress());
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResultBuilder.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResultBuilder.java
new file mode 100644
index 0000000..4be93d5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/model/TestRunResultBuilder.java
@@ -0,0 +1,50 @@
+package net.jsunit.model;
+
+import org.jdom.Document;
+import org.jdom.Element;
+
+import java.util.List;
+
+@SuppressWarnings({"unchecked"})
+public class TestRunResultBuilder {
+
+ public static final String NAME = "testRunResult";
+
+ private BrowserSource browserSource;
+
+ public TestRunResultBuilder(BrowserSource browserSource) {
+ this.browserSource = browserSource;
+ }
+
+ public TestRunResult build(Document document) {
+ TestRunResult result = new TestRunResult();
+ Element propertiesElement = document.getRootElement().getChild("properties");
+ if (propertiesElement != null)
+ updateWithProperties(result, propertiesElement.getChildren());
+ updateWithBrowserResults(document, result);
+ return result;
+ }
+
+ private void updateWithBrowserResults(Document document, TestRunResult result) {
+ BrowserResultBuilder browserBuilder = new BrowserResultBuilder(browserSource);
+ List children = document.getRootElement().getChildren("browserResult");
+ for (Element element : children) {
+ BrowserResult browserResult = browserBuilder.build(element);
+ result.addBrowserResult(browserResult);
+ }
+ }
+
+ private void updateWithProperties(TestRunResult result, List properties) {
+ for (Element propertyElement : properties) {
+ String name = propertyElement.getAttribute("name").getValue();
+ String value = propertyElement.getAttribute("value").getValue();
+ if (name.equals("os"))
+ result.setOsString(value);
+ else if (name.equals("ipAddress"))
+ result.setIpAddress(value);
+ else if (name.equals("hostname"))
+ result.setHostname(value);
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/CollectionUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/CollectionUtility.java
new file mode 100644
index 0000000..5c6db6c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/CollectionUtility.java
@@ -0,0 +1,12 @@
+package net.jsunit.utility;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class CollectionUtility {
+
+ public static List listWith(Object object1, Object object2) {
+ return Arrays.asList(new Object[]{object1, object2});
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/FileUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/FileUtility.java
new file mode 100644
index 0000000..b6c65c3
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/FileUtility.java
@@ -0,0 +1,25 @@
+package net.jsunit.utility;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+
+public class FileUtility {
+
+ public static void delete(File file) {
+ if (file.exists())
+ file.delete();
+ }
+
+ public static void write(File file, String contents) {
+ try {
+ if (file.exists())
+ file.delete();
+ BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
+ out.write(contents.getBytes());
+ out.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StreamUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StreamUtility.java
new file mode 100644
index 0000000..7c60ceb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StreamUtility.java
@@ -0,0 +1,18 @@
+package net.jsunit.utility;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class StreamUtility {
+
+ public static String readAllFromStream(InputStream inputStream) throws IOException {
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+ int aByte;
+ while ((aByte = inputStream.read()) != -1)
+ outStream.write(aByte);
+ inputStream.close();
+ return outStream.toString();
+
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StringUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StringUtility.java
new file mode 100644
index 0000000..303871d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/StringUtility.java
@@ -0,0 +1,59 @@
+package net.jsunit.utility;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+public class StringUtility {
+
+ public static boolean isEmpty(String s) {
+ return s == null || s.trim().equals("");
+ }
+
+ public static List listFromCommaDelimitedString(String string) {
+ return listFromDelimitedString(string, ",");
+ }
+
+ public static List listFromSemiColonDelimitedString(String string) {
+ return listFromDelimitedString(string, ";");
+ }
+
+ private static List listFromDelimitedString(String string, String delimiter) {
+ if (isEmpty(string))
+ return new ArrayList();
+ String[] array = string.split(delimiter);
+ for (int i = 0; i < array.length; i++)
+ array[i] = array[i].trim();
+ return Arrays.asList(array);
+ }
+
+ public static String stackTraceAsString(Throwable throwable) {
+ StringWriter writer = new StringWriter();
+ throwable.printStackTrace(new PrintWriter(writer));
+ return writer.toString();
+ }
+
+ public static String commaSeparatedString(List extends Object> strings) {
+ StringBuffer result = new StringBuffer();
+ for (Iterator it = strings.iterator(); it.hasNext();) {
+ result.append(it.next());
+ if (it.hasNext())
+ result.append(",");
+ }
+ return result.toString();
+ }
+
+ public static String unqualify(String string) {
+ int indexOfForwardSlash = string.lastIndexOf("/");
+ if (indexOfForwardSlash >= 0 && indexOfForwardSlash < string.length())
+ string = string.substring(indexOfForwardSlash + 1);
+ int indexOfBackSlash = string.lastIndexOf("\\");
+ if (indexOfBackSlash >= 0 && indexOfBackSlash < string.length())
+ string = string.substring(indexOfBackSlash + 1);
+ return string;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/SystemUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/SystemUtility.java
new file mode 100644
index 0000000..fa67ea4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/SystemUtility.java
@@ -0,0 +1,53 @@
+package net.jsunit.utility;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class SystemUtility {
+ private static String hostname;
+
+ public static String osArchitecture() {
+ return System.getProperty("os.arch");
+ }
+
+ public static String osName() {
+ return System.getProperty("os.name");
+ }
+
+ public static String osString() {
+ StringBuffer result = new StringBuffer();
+ result.append(osArchitecture());
+ result.append(" - ");
+ result.append(osName());
+ return result.toString();
+ }
+
+ public static double jsUnitVersion() {
+ //TODO: get this from jsUnitCore.js
+ return 2.2;
+ }
+
+ public static String hostname() {
+ if (hostname == null) {
+ try {
+ InetAddress addr = InetAddress.getLocalHost();
+ hostname = addr.getCanonicalHostName();
+ } catch (UnknownHostException e) {
+ }
+ }
+ return hostname;
+ }
+
+ public static String ipAddress() {
+ try {
+ InetAddress addr = InetAddress.getLocalHost();
+ return addr.getHostAddress();
+ } catch (UnknownHostException e) {
+ return null;
+ }
+ }
+
+ public static String displayString() {
+ return hostname() + " (" + ipAddress() + "), " + osString();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/XmlUtility.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/XmlUtility.java
new file mode 100644
index 0000000..dfbad62
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/utility/XmlUtility.java
@@ -0,0 +1,33 @@
+package net.jsunit.utility;
+
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.input.SAXBuilder;
+import org.jdom.output.Format;
+import org.jdom.output.XMLOutputter;
+
+import java.io.StringReader;
+
+public class XmlUtility {
+
+ public static String asString(Element element) {
+ return new XMLOutputter().outputString(element);
+ }
+
+ public static String asPrettyString(Element element) {
+ return new XMLOutputter(Format.getPrettyFormat()).outputString(element);
+ }
+
+ public static String asString(Document document) {
+ return new XMLOutputter().outputString(document);
+ }
+
+ public static Document asXmlDocument(String xmlDocumentString) {
+ try {
+ return new SAXBuilder().build(new StringReader(xmlDocumentString));
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/JsUnitWebsiteVersionGrabber.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/JsUnitWebsiteVersionGrabber.java
new file mode 100644
index 0000000..9dcdf27
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/JsUnitWebsiteVersionGrabber.java
@@ -0,0 +1,14 @@
+package net.jsunit.version;
+
+import net.jsunit.utility.StreamUtility;
+
+import java.net.URL;
+
+public class JsUnitWebsiteVersionGrabber implements VersionGrabber {
+
+ public double grabVersion() throws Exception {
+ URL url = new URL("http://www.jsunit.net/version.txt");
+ String string = StreamUtility.readAllFromStream(url.openStream());
+ return Double.parseDouble(string);
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionChecker.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionChecker.java
new file mode 100644
index 0000000..f8b26bb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionChecker.java
@@ -0,0 +1,49 @@
+package net.jsunit.version;
+
+import net.jsunit.utility.SystemUtility;
+
+public class VersionChecker {
+
+ private double installedVersion;
+ private Double latestVersion;
+ private VersionGrabber grabber;
+
+ public static VersionChecker forDefault() {
+ return new VersionChecker(SystemUtility.jsUnitVersion(), new JsUnitWebsiteVersionGrabber());
+ }
+
+ public VersionChecker(double currentVersion, VersionGrabber grabber) {
+ this.installedVersion = currentVersion;
+ this.grabber = grabber;
+ }
+
+ public boolean isUpToDate() {
+ return installedVersion >= getLatestVersion();
+ }
+
+ public double getLatestVersion() {
+ if (latestVersion == null) {
+ try {
+ latestVersion = grabber.grabVersion();
+ } catch (Exception e) {
+ latestVersion = 0d;
+ }
+ }
+ return latestVersion;
+ }
+
+ public void setLatestVersion(double version) {
+ latestVersion = version;
+ }
+
+ public String outOfDateString() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("*** Your JsUnit version (");
+ buffer.append(installedVersion);
+ buffer.append(") is out of date. There is a newer version available (");
+ buffer.append(getLatestVersion());
+ buffer.append(") at http://www.jsunit.net ***");
+ return buffer.toString();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionGrabber.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionGrabber.java
new file mode 100644
index 0000000..19f18dd
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_core/net/jsunit/version/VersionGrabber.java
@@ -0,0 +1,5 @@
+package net.jsunit.version;
+
+public interface VersionGrabber {
+ double grabVersion() throws Exception;
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/AbstractJsUnitServer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/AbstractJsUnitServer.java
new file mode 100644
index 0000000..7423129
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/AbstractJsUnitServer.java
@@ -0,0 +1,163 @@
+package net.jsunit;
+
+import com.opensymphony.webwork.dispatcher.ServletDispatcher;
+import com.opensymphony.xwork.config.ConfigurationManager;
+import com.opensymphony.xwork.config.providers.XmlConfigurationProvider;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationException;
+import net.jsunit.configuration.ConfigurationProperty;
+import net.jsunit.configuration.ServerType;
+import net.jsunit.utility.XmlUtility;
+import net.jsunit.version.VersionChecker;
+import org.apache.jasper.servlet.JspServlet;
+import org.jdom.Element;
+import org.mortbay.http.HttpServer;
+import org.mortbay.http.SocketListener;
+import org.mortbay.http.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.ServletHttpContext;
+import org.mortbay.start.Monitor;
+
+import java.util.Date;
+import java.util.List;
+import java.util.logging.Logger;
+
+public abstract class AbstractJsUnitServer implements JsUnitServer {
+
+ private HttpServer server;
+ private Logger logger = Logger.getLogger("net.jsunit");
+ protected Configuration configuration;
+ private final ServerType serverType;
+ private Date startDate;
+ protected int testRunCount = 0;
+
+ protected AbstractJsUnitServer(Configuration configuration, ServerType type) {
+ this.configuration = configuration;
+ this.serverType = type;
+ ensureConfigurationIsValid();
+ }
+
+ protected void ensureConfigurationIsValid() {
+ if (!configuration.isValidFor(serverType)) {
+ ConfigurationProperty property = serverType.getPropertiesInvalidFor(configuration).get(0);
+ throw new ConfigurationException(property, property.getValueString(configuration));
+ }
+ }
+
+ public boolean isFarmServer() {
+ return serverType.isFarm();
+ }
+
+ public boolean isTemporary() {
+ return serverType.isTemporary();
+ }
+
+ public Configuration getConfiguration() {
+ return configuration;
+ }
+
+ public void start() throws Exception {
+ setUpHttpServer();
+ logStatus(startingServerStatusMessage());
+ server.start();
+ startDate = new Date();
+ if (serverType.shouldPerformUpToDateCheck())
+ performUpToDateCheck();
+ }
+
+ private void performUpToDateCheck() {
+ VersionChecker checker = VersionChecker.forDefault();
+ if (!checker.isUpToDate())
+ logger.warning(checker.outOfDateString());
+ }
+
+ private String startingServerStatusMessage() {
+ return "Starting " +
+ serverTypeName() +
+ " Server with configuration:\r\n" +
+ XmlUtility.asPrettyString(configuration.asXml(serverType));
+ }
+
+ protected String serverTypeName() {
+ return serverType.getDisplayName();
+ }
+
+ private void setUpHttpServer() throws Exception {
+ server = new HttpServer();
+ SocketListener listener = new SocketListener();
+ listener.setPort(configuration.getPort());
+ server.addListener(listener);
+
+ ServletHttpContext servletContext = new ServletHttpContext();
+ servletContext.setContextPath("jsunit");
+ servletContext.setResourceBase(configuration.getResourceBase().toString());
+
+ servletContext.addServlet("JSP", "*.jsp", JspServlet.class.getName());
+ servletContext.addHandler(new ResourceHandler());
+
+ ConfigurationManager.clearConfigurationProviders();
+ ConfigurationManager.addConfigurationProvider(new XmlConfigurationProvider(xworkXmlName()));
+ com.opensymphony.webwork.config.Configuration.set("webwork.action.extension", "");
+
+ for (String servletName : servletNames())
+ addWebworkServlet(servletContext, servletName);
+ server.addContext(servletContext);
+
+ if (Monitor.activeCount() == 0)
+ Monitor.monitor();
+ }
+
+ protected abstract String xworkXmlName();
+
+ protected abstract List servletNames();
+
+ private void addWebworkServlet(ServletHttpContext servletContext, String name) throws Exception {
+ servletContext.addServlet(
+ "webwork",
+ "/" + name,
+ ServletDispatcher.class.getName()
+ );
+ }
+
+ public void logStatus(String message) {
+ logger.info(message);
+ }
+
+ public Element asXml() {
+ return configuration.asXml(serverType);
+ }
+
+ public void finalize() throws Throwable {
+ super.finalize();
+ dispose();
+ }
+
+ public void dispose() {
+ logStatus("Stopping server");
+ try {
+ if (server != null)
+ server.stop();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public boolean isAlive() {
+ return server != null && server.isStarted();
+ }
+
+ public Logger getLogger() {
+ return logger;
+ }
+
+ public ServerType serverType() {
+ return serverType;
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public long getTestRunCount() {
+ return testRunCount;
+ }
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BlowingUpProcessStarter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BlowingUpProcessStarter.java
new file mode 100644
index 0000000..aa67df9
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BlowingUpProcessStarter.java
@@ -0,0 +1,12 @@
+package net.jsunit;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+public class BlowingUpProcessStarter implements ProcessStarter {
+
+ public Process execute(String[] command) throws IOException {
+ throw new FileNotFoundException();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BrowserResultLogWriter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BrowserResultLogWriter.java
new file mode 100644
index 0000000..645a50f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/BrowserResultLogWriter.java
@@ -0,0 +1,32 @@
+package net.jsunit;
+
+import net.jsunit.logging.BrowserResultRepository;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class BrowserResultLogWriter implements TestRunListener {
+
+ private BrowserResultRepository repository;
+
+ public BrowserResultLogWriter(BrowserResultRepository repository) {
+ this.repository = repository;
+ }
+
+ public void browserTestRunFinished(Browser browser, BrowserResult result) {
+ repository.store(result);
+ }
+
+ public void browserTestRunStarted(Browser browser) {
+ }
+
+ public boolean isReady() {
+ return true;
+ }
+
+ public void testRunStarted() {
+ }
+
+ public void testRunFinished() {
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DefaultProcessStarter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DefaultProcessStarter.java
new file mode 100644
index 0000000..8f9aa57
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DefaultProcessStarter.java
@@ -0,0 +1,11 @@
+package net.jsunit;
+
+import java.io.IOException;
+
+public class DefaultProcessStarter implements ProcessStarter {
+
+ public Process execute(String[] command) throws IOException {
+ return Runtime.getRuntime().exec(command);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTest.java
new file mode 100644
index 0000000..c436caa
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTest.java
@@ -0,0 +1,107 @@
+package net.jsunit;
+
+import junit.extensions.ActiveTestSuite;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.DistributedTestRunResult;
+import net.jsunit.utility.XmlUtility;
+import org.mortbay.util.MultiException;
+
+import java.net.BindException;
+import java.util.List;
+
+public class DistributedTest extends TestCase {
+
+ protected DistributedTestRunManager manager;
+ private static JsUnitStandardServer temporaryStandardServer;
+ private static Object blocker = new Object();
+ private static int serverCount = 0;
+
+ public DistributedTest(ConfigurationSource serverSource, ConfigurationSource farmSource) {
+ super(farmSource.remoteMachineURLs());
+ ensureTemporaryStandardServerIsCreated(serverSource);
+ manager = DistributedTestRunManager.forConfiguration(new Configuration(farmSource));
+ }
+
+ private void ensureTemporaryStandardServerIsCreated(ConfigurationSource serverSource) {
+ //noinspection SynchronizeOnNonFinalField
+ synchronized (blocker) {
+ if (temporaryStandardServer == null) {
+ temporaryStandardServer = new JsUnitStandardServer(new Configuration(serverSource), true);
+ }
+ }
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+ startServerIfNecessary();
+ }
+
+ private void startServerIfNecessary() throws Exception {
+ serverCount ++;
+ //noinspection SynchronizeOnNonFinalField
+ synchronized (blocker) {
+ if (!temporaryStandardServer.isAlive()) {
+ try {
+ temporaryStandardServer.start();
+ } catch (MultiException e) {
+ if (!isMultiExceptionASingleBindException(e))
+ throw e;
+ //if a temporaryStandardServer is already running, fine -
+ //we only need it to serve content to remove machines
+ }
+ }
+ }
+ }
+
+ private boolean isMultiExceptionASingleBindException(MultiException e) {
+ List exceptions = e.getExceptions();
+ return exceptions.size() == 1 && exceptions.get(0) instanceof BindException;
+ }
+
+ public void tearDown() throws Exception {
+ serverCount --;
+ if (serverCount == 0) {
+ if (temporaryStandardServer != null && temporaryStandardServer.isAlive()) {
+ temporaryStandardServer.dispose();
+ temporaryStandardServer = null;
+ }
+ }
+ super.tearDown();
+ }
+
+ public static Test suite(ConfigurationSource source) {
+ TestSuite suite = new ActiveTestSuite();
+ new DistributedTestSuiteBuilder(source).addTestsTo(suite);
+ return suite;
+ }
+
+ public static Test suite() {
+ return suite(Configuration.resolveSource());
+ }
+
+ protected void runTest() throws Throwable {
+ manager.runTests();
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+ temporaryStandardServer.logStatus(XmlUtility.asPrettyString(result.asXml()));
+ if (!result.wasSuccessful())
+ fail(result.displayString());
+ }
+
+ public DistributedTestRunManager getDistributedTestRunManager() {
+ return manager;
+ }
+
+ public JsUnitStandardServer getTemporaryStandardServer() {
+ return temporaryStandardServer;
+ }
+
+ public void limitToBrowser(Browser remoteBrowser) {
+ manager.limitToBrowser(remoteBrowser);
+ setName(remoteBrowser.getFileName());
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestRunManager.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestRunManager.java
new file mode 100644
index 0000000..883a3fe
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestRunManager.java
@@ -0,0 +1,128 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.*;
+import org.jdom.Document;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+public class DistributedTestRunManager {
+
+ private Logger logger = Logger.getLogger("net.jsunit");
+ private RemoteServerHitter hitter;
+ private Configuration configuration;
+ private String overrideURL;
+ private DistributedTestRunResult distributedTestRunResult = new DistributedTestRunResult();
+ private Browser remoteBrowser;
+
+ public static DistributedTestRunManager forConfiguration(Configuration configuration) {
+ return new DistributedTestRunManager(new RemoteMachineServerHitter(), configuration, null);
+ }
+
+ public static DistributedTestRunManager forConfigurationAndURL(RemoteServerHitter hitter, Configuration configuration, String overrideURL) {
+ return new DistributedTestRunManager(hitter, configuration, overrideURL);
+ }
+
+ protected DistributedTestRunManager(RemoteServerHitter hitter, Configuration configuration, String overrideURL) {
+ this.hitter = hitter;
+ this.configuration = configuration;
+ this.overrideURL = overrideURL;
+ }
+
+ public void runTests() {
+ List threads = new ArrayList();
+ for (final URL baseURL : configuration.getRemoteMachineURLs())
+ threads.add(new Thread("Run JsUnit tests on " + baseURL) {
+ public void run() {
+ runTestsOnRemoteMachine(baseURL);
+ }
+ });
+ for (Thread thread : threads)
+ thread.start();
+ for (Thread thread : threads) {
+ try {
+ thread.join();
+ } catch (InterruptedException e) {
+ throw new RuntimeException("One of the test threads was interrupted.");
+ }
+ }
+ }
+
+ private void runTestsOnRemoteMachine(URL baseURL) {
+ List results = new ArrayList();
+ try {
+ URL fullURL = buildURL(baseURL);
+ logger.info("Requesting run on remove machine URL " + baseURL);
+ Document documentFromRemoteMachine = hitter.hitURL(fullURL);
+ logger.info("Received response from remove machine URL " + baseURL);
+ if (isMultipleTestRunResultsResult(documentFromRemoteMachine)) {
+ DistributedTestRunResult multiple = new DistributedTestRunResultBuilder(configuration).build(documentFromRemoteMachine);
+ results.addAll(multiple.getTestRunResults());
+ } else {
+ TestRunResult single = new TestRunResultBuilder(configuration).build(documentFromRemoteMachine);
+ results.add(single);
+ }
+ } catch (IOException e) {
+ if (configuration.shouldIgnoreUnresponsiveRemoteMachines())
+ logger.info("Ignoring unresponsive machine " + baseURL.toString());
+ else {
+ logger.info("Remote machine URL is unresponsive: " + baseURL.toString());
+ TestRunResult unresponsiveResult = new TestRunResult(baseURL);
+ unresponsiveResult.setUnresponsive();
+ results.add(unresponsiveResult);
+ }
+ }
+ for (TestRunResult result : results) {
+ result.setURL(baseURL);
+ //noinspection SynchronizeOnNonFinalField
+ synchronized (distributedTestRunResult) {
+ distributedTestRunResult.addTestRunResult(result);
+ }
+ }
+ }
+
+ private boolean isMultipleTestRunResultsResult(Document document) {
+ return document.getRootElement().getName().equals(DistributedTestRunResult.NAME);
+ }
+
+ private URL buildURL(URL url) throws UnsupportedEncodingException, MalformedURLException {
+ String fullURLString = url.toString();
+ fullURLString += "/runner";
+ boolean hasFirstParameter = false;
+ if (overrideURL != null) {
+ fullURLString += "?url=" + URLEncoder.encode(overrideURL, "UTF-8");
+ hasFirstParameter = true;
+ } else if (configuration.getTestURL() != null) {
+ fullURLString += "?url=" + URLEncoder.encode(configuration.getTestURL().toString(), "UTF-8");
+ hasFirstParameter = true;
+ }
+ if (remoteBrowser != null) {
+ fullURLString += (hasFirstParameter ? "&" : "?");
+ fullURLString += "browserId=" + remoteBrowser.getId();
+ }
+ return new URL(fullURLString);
+ }
+
+ public DistributedTestRunResult getDistributedTestRunResult() {
+ return distributedTestRunResult;
+ }
+
+ public String getOverrideURL() {
+ return overrideURL;
+ }
+
+ public void setOverrideURL(String overrideURL) {
+ this.overrideURL = overrideURL;
+ }
+
+ public void limitToBrowser(Browser remoteBrowser) {
+ this.remoteBrowser = remoteBrowser;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestSuiteBuilder.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestSuiteBuilder.java
new file mode 100644
index 0000000..89a9438
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/DistributedTestSuiteBuilder.java
@@ -0,0 +1,72 @@
+package net.jsunit;
+
+import junit.framework.TestSuite;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.configuration.DelegatingConfigurationSource;
+import net.jsunit.model.Browser;
+
+import java.net.URL;
+import java.util.List;
+
+public class DistributedTestSuiteBuilder {
+ private ConfigurationSource localeSource;
+ private RemoteServerHitter hitter;
+ private Configuration localConfiguration;
+ private int browserCount;
+
+ public DistributedTestSuiteBuilder(ConfigurationSource localSource) {
+ this(localSource, new RemoteMachineServerHitter());
+ }
+
+ public DistributedTestSuiteBuilder(ConfigurationSource localSource, RemoteServerHitter hitter) {
+ this.localeSource = localSource;
+ this.hitter = hitter;
+ this.localConfiguration = new Configuration(localeSource);
+ }
+
+ public void addTestsTo(TestSuite suite) {
+ for (final URL remoteMachineURL : localConfiguration.getRemoteMachineURLs()) {
+ ConfigurationSource remoteSource = new RemoteConfigurationSource(hitter, remoteMachineURL.toString());
+ Configuration remoteConfiguration = new Configuration(remoteSource);
+ addTestsForRemoteConfigurationTo(remoteConfiguration, remoteMachineURL, suite);
+ }
+ suite.setName("JsUnit Tests (" + getRemoteMachineURLCount() + " machines, " + getBrowserCount() + " direct browsers)");
+ }
+
+ private void addTestsForRemoteConfigurationTo(Configuration remoteConfiguration, URL remoteMachineURL, TestSuite suite) {
+ List browsers = remoteConfiguration.getBrowsers();
+ if (browsers.isEmpty()) {
+ DistributedTest distributedTest = createDistributedTest(localeSource, remoteMachineURL);
+ suite.addTest(distributedTest);
+ } else {
+ TestSuite suiteForRemoteMachine = new TestSuite(remoteMachineURL.toString());
+ for (Browser browser : browsers) {
+ browserCount++;
+ DistributedTest distributedTest = createDistributedTest(localeSource, remoteMachineURL);
+ distributedTest.limitToBrowser(browser);
+ suiteForRemoteMachine.addTest(distributedTest);
+ }
+ suite.addTest(suiteForRemoteMachine);
+ }
+ }
+
+ private DistributedTest createDistributedTest(ConfigurationSource originalSource, final URL remoteMachineURL) {
+ return new DistributedTest(
+ originalSource,
+ new DelegatingConfigurationSource(originalSource) {
+ public String remoteMachineURLs() {
+ return remoteMachineURL.toString();
+ }
+ }
+ );
+ }
+
+ public int getRemoteMachineURLCount() {
+ return localConfiguration.getRemoteMachineURLs().size();
+ }
+
+ public int getBrowserCount() {
+ return browserCount;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitFarmServer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitFarmServer.java
new file mode 100644
index 0000000..1811503
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitFarmServer.java
@@ -0,0 +1,46 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class JsUnitFarmServer extends AbstractJsUnitServer {
+
+ public JsUnitFarmServer(Configuration configuration) {
+ super(configuration, ServerType.FARM);
+ ServerRegistry.registerFarmServer(this);
+ }
+
+ protected List servletNames() {
+ return Arrays.asList(new String[]{
+ "index",
+ "config",
+ "latestversion",
+ "runner"
+ });
+ }
+
+ public static void main(String args[]) {
+ try {
+ JsUnitFarmServer server = new JsUnitFarmServer(Configuration.resolve(args));
+ server.start();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ public String toString() {
+ return "JsUnit Farm Server";
+ }
+
+ protected String xworkXmlName() {
+ return "farm_xwork.xml";
+ }
+
+ public ServerType serverType() {
+ return ServerType.FARM;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitServer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitServer.java
new file mode 100644
index 0000000..af6099a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitServer.java
@@ -0,0 +1,18 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+
+import java.util.Date;
+
+public interface JsUnitServer extends XmlRenderable {
+ Configuration getConfiguration();
+
+ ServerType serverType();
+
+ boolean isFarmServer();
+
+ Date getStartDate();
+
+ long getTestRunCount();
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitStandardServer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitStandardServer.java
new file mode 100644
index 0000000..e7a23ab
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/JsUnitStandardServer.java
@@ -0,0 +1,263 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+import net.jsunit.logging.BrowserResultRepository;
+import net.jsunit.logging.FileBrowserResultRepository;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.utility.StringUtility;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class JsUnitStandardServer extends AbstractJsUnitServer implements BrowserTestRunner {
+
+ private List results = new ArrayList();
+ private List browserTestRunListeners = new ArrayList();
+
+ private ProcessStarter processStarter = new DefaultProcessStarter();
+ private LaunchTestRunCommand launchTestRunCommand;
+ private TimeoutChecker timeoutChecker;
+ private Process browserProcess;
+ private long timeLastResultReceived;
+
+ private BrowserResultRepository browserResultRepository;
+
+ public JsUnitStandardServer(Configuration configuration, boolean temporary) {
+ this(configuration, new FileBrowserResultRepository(configuration.getLogsDirectory()), temporary);
+ }
+
+ public JsUnitStandardServer(Configuration configuration, BrowserResultRepository browserResultRepository, boolean temporary) {
+ super(configuration, temporary ? ServerType.STANDARD_TEMPORARY : ServerType.STANDARD);
+ this.browserResultRepository = browserResultRepository;
+ addBrowserTestRunListener(new BrowserResultLogWriter(browserResultRepository));
+ ServerRegistry.registerServer(this);
+ }
+
+ public static void main(String args[]) {
+ try {
+ JsUnitStandardServer server = new JsUnitStandardServer(Configuration.resolve(args), false);
+ server.start();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ protected List servletNames() {
+ return Arrays.asList(new String[]{
+ "acceptor",
+ "config",
+ "displayer",
+ "index",
+ "latestversion",
+ "runner"
+ });
+ }
+
+ public void accept(BrowserResult result) {
+ long timeReceived = System.currentTimeMillis();
+ if (launchTestRunCommand == null)
+ return;
+ Browser submittingBrowser = launchTestRunCommand.getBrowser();
+ endBrowser();
+
+ result.setBrowser(submittingBrowser);
+
+ killTimeoutChecker();
+ BrowserResult existingResultWithSameId = findResultWithId(result.getId(), submittingBrowser);
+ for (TestRunListener listener : browserTestRunListeners)
+ listener.browserTestRunFinished(submittingBrowser, result);
+ if (existingResultWithSameId != null)
+ results.remove(existingResultWithSameId);
+ results.add(result);
+ timeLastResultReceived = timeReceived;
+ }
+
+ private void killTimeoutChecker() {
+ if (timeoutChecker != null) {
+ timeoutChecker.die();
+ timeoutChecker = null;
+ }
+ }
+
+ public List getResults() {
+ return results;
+ }
+
+ public void clearResults() {
+ results.clear();
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) throws InvalidBrowserIdException {
+ Browser browser = configuration.getBrowserById(browserId);
+ if (browser == null)
+ throw new InvalidBrowserIdException(browserId);
+ return findResultWithId(id, browser);
+ }
+
+ private BrowserResult findResultWithId(String id, Browser browser) {
+ BrowserResult result = findResultWithIdInResultList(id, browser);
+ if (result == null)
+ result = browserResultRepository.retrieve(id, browser);
+ return result;
+ }
+
+ private BrowserResult findResultWithIdInResultList(String id, Browser browser) {
+ for (BrowserResult result : getResults()) {
+ if (result.hasId(id) && result.isForBrowser(browser))
+ return result;
+ }
+ return null;
+ }
+
+ public BrowserResult lastResult() {
+ List results = getResults();
+ return results.isEmpty()
+ ? null
+ : (BrowserResult) results.get(results.size() - 1);
+ }
+
+ public int resultsCount() {
+ return getResults().size();
+ }
+
+ public String toString() {
+ return "JsUnit Server";
+ }
+
+ public List getBrowsers() {
+ return configuration.getBrowsers();
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return timeLastResultReceived >= launchTime;
+ }
+
+ public void addBrowserTestRunListener(TestRunListener listener) {
+ browserTestRunListeners.add(listener);
+ }
+
+ public List getBrowserTestRunListeners() {
+ return browserTestRunListeners;
+ }
+
+ private void endBrowser() {
+ if (browserProcess != null && configuration.shouldCloseBrowsersAfterTestRuns()) {
+ if (launchTestRunCommand.getBrowserKillCommand() != null) {
+ try {
+ processStarter.execute(new String[]{launchTestRunCommand.getBrowserKillCommand()});
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else {
+ browserProcess.destroy();
+ try {
+ browserProcess.waitFor();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ waitUntilProcessHasExitValue(browserProcess);
+ }
+ }
+ browserProcess = null;
+ launchTestRunCommand = null;
+ killTimeoutChecker();
+ }
+
+ private void waitUntilProcessHasExitValue(Process browserProcess) {
+ while (true) {
+ try {
+ if (browserProcess != null)
+ browserProcess.exitValue();
+ return;
+ } catch (IllegalThreadStateException e) {
+ }
+ }
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ waitUntilLastReceivedTimeHasPassed();
+ long launchTime = System.currentTimeMillis();
+ launchTestRunCommand = new LaunchTestRunCommand(launchSpec, configuration);
+ Browser browser = launchTestRunCommand.getBrowser();
+ String browserFileName = browser.getFileName();
+ try {
+ logStatus("Launching " + browserFileName + " on " + launchTestRunCommand.getTestURL());
+ for (TestRunListener listener : browserTestRunListeners)
+ listener.browserTestRunStarted(browser);
+ this.browserProcess = processStarter.execute(launchTestRunCommand.generateArray());
+ startTimeoutChecker(launchTime);
+ } catch (Throwable throwable) {
+ handleCrashWhileLaunching(throwable);
+ }
+ return launchTime;
+ }
+
+ private void handleCrashWhileLaunching(Throwable throwable) {
+ Browser browser = launchTestRunCommand.getBrowser();
+ logStatus("Browser " + browser.getFileName() + " failed to launch: " + StringUtility.stackTraceAsString(throwable));
+ BrowserResult failedToLaunchBrowserResult = new BrowserResult();
+ failedToLaunchBrowserResult.setFailedToLaunch();
+ failedToLaunchBrowserResult.setBrowser(browser);
+ failedToLaunchBrowserResult.setServerSideException(throwable);
+ accept(failedToLaunchBrowserResult);
+ }
+
+ private void waitUntilLastReceivedTimeHasPassed() {
+ while (System.currentTimeMillis() == timeLastResultReceived)
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {
+ }
+ }
+
+ private void startTimeoutChecker(long launchTime) {
+ timeoutChecker = new TimeoutChecker(browserProcess, launchTestRunCommand.getBrowser(), launchTime, this);
+ timeoutChecker.start();
+ }
+
+ void setProcessStarter(ProcessStarter starter) {
+ this.processStarter = starter;
+ }
+
+ public void startTestRun() {
+ for (TestRunListener listener : browserTestRunListeners) {
+ listener.testRunStarted();
+ while (!listener.isReady())
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ public void finishTestRun() {
+ for (TestRunListener listener : browserTestRunListeners)
+ listener.testRunFinished();
+ testRunCount ++;
+ }
+
+ public Process getBrowserProcess() {
+ return browserProcess;
+ }
+
+ public void dispose() {
+ super.dispose();
+ endBrowser();
+ }
+
+ protected String xworkXmlName() {
+ return "xwork.xml";
+ }
+
+ public int timeoutSeconds() {
+ return configuration.getTimeoutSeconds();
+ }
+
+ public boolean isAwaitingBrowserSubmission() {
+ return launchTestRunCommand != null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/LaunchTestRunCommand.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/LaunchTestRunCommand.java
new file mode 100644
index 0000000..f1d0ea6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/LaunchTestRunCommand.java
@@ -0,0 +1,78 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.Browser;
+
+public class LaunchTestRunCommand {
+
+ private Configuration configuration;
+ private BrowserLaunchSpecification launchSpec;
+
+ public LaunchTestRunCommand(BrowserLaunchSpecification launchSpec, Configuration configuration) {
+ this.configuration = configuration;
+ this.launchSpec = launchSpec;
+ }
+
+ public Browser getBrowser() {
+ return launchSpec.getBrowser();
+ }
+
+ public String getBrowserKillCommand() {
+ String killCommand = launchSpec.getBrowser().getKillCommand();
+ if (killCommand == null && launchSpec.isForDefaultBrowser()) {
+ killCommand = PlatformType.resolve().getDefaultBrowserKillCommand();
+ }
+ return killCommand;
+ }
+
+ public String[] generateArray() throws NoUrlSpecifiedException {
+ String[] browserCommandArray = openBrowserCommandArray();
+ String[] commandWithUrl = new String[browserCommandArray.length + 1];
+ System.arraycopy(browserCommandArray, 0, commandWithUrl, 0, browserCommandArray.length);
+ commandWithUrl[browserCommandArray.length] = generateTestUrlString();
+ return commandWithUrl;
+ }
+
+ private String[] openBrowserCommandArray() {
+ if (launchSpec.isForDefaultBrowser()) {
+ PlatformType platformType = PlatformType.resolve();
+ return platformType.getDefaultCommandLineBrowserArray();
+ }
+ return new String[]{launchSpec.getBrowser().getFileName()};
+ }
+
+ private String generateTestUrlString() throws NoUrlSpecifiedException {
+ if (!launchSpec.hasOverrideUrl() && configuration.getTestURL() == null)
+ throw new NoUrlSpecifiedException();
+ String urlString = launchSpec.hasOverrideUrl() ? launchSpec.getOverrideUrl() : configuration.getTestURL().toString();
+ urlString = addAutoRunParameterIfNeeded(urlString);
+ urlString = addSubmitResultsParameterIfNeeded(urlString);
+ return urlString;
+ }
+
+ private String addSubmitResultsParameterIfNeeded(String urlString) {
+ if (urlString.toLowerCase().indexOf("submitresults") == -1)
+ urlString = addParameter(urlString, "submitResults=localhost:" + configuration.getPort() + "/jsunit/acceptor");
+ return urlString;
+ }
+
+ private String addAutoRunParameterIfNeeded(String urlString) {
+ if (urlString.toLowerCase().indexOf("autorun") == -1) {
+ urlString = addParameter(urlString, "autoRun=true");
+ }
+ return urlString;
+ }
+
+ private String addParameter(String urlString, String paramAndValue) {
+ if (urlString.indexOf("?") == -1)
+ urlString += "?";
+ else
+ urlString += "&";
+ urlString += paramAndValue;
+ return urlString;
+ }
+
+ public String getTestURL() throws NoUrlSpecifiedException {
+ return generateTestUrlString();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/NoUrlSpecifiedException.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/NoUrlSpecifiedException.java
new file mode 100644
index 0000000..0281e5a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/NoUrlSpecifiedException.java
@@ -0,0 +1,4 @@
+package net.jsunit;
+
+public class NoUrlSpecifiedException extends Exception {
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/PlatformType.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/PlatformType.java
new file mode 100644
index 0000000..9b6b20d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/PlatformType.java
@@ -0,0 +1,53 @@
+package net.jsunit;
+
+import net.jsunit.utility.SystemUtility;
+
+public enum PlatformType {
+
+ WINDOWS(new String[]{"rundll32", "url.dll,FileProtocolHandler"}, null) {
+ public boolean matchesSystem() {
+ String os = SystemUtility.osName();
+ return os != null && os.startsWith("Windows");
+ }
+ },
+ MACINTOSH(new String[]{"bin/mac/start-firefox.sh"}, "bin/mac/stop-firefox.sh") {
+ public boolean matchesSystem() {
+ String os = SystemUtility.osName();
+ return os != null && os.startsWith("Mac");
+ }
+ },
+ UNIX(new String[]{"bin/unix/start-firefox.sh"}, "bin/unix/stop-firefox.sh") {
+ public boolean matchesSystem() {
+ //TODO: uhhh...
+ return false;
+ }
+ };
+
+ public static PlatformType DEFAULT = UNIX;
+
+ private String[] defaultBrowserCommandLineArray;
+ private String defaultBrowserKillCommand;
+
+ private PlatformType(String[] defaultBrowserCommandLineArray, String defaultBrowserKillCommand) {
+ this.defaultBrowserKillCommand = defaultBrowserKillCommand;
+ this.defaultBrowserCommandLineArray = defaultBrowserCommandLineArray;
+ }
+
+ public static PlatformType resolve() {
+ for (PlatformType type : values()) {
+ if (type.matchesSystem())
+ return type;
+ }
+ return DEFAULT;
+ }
+
+ protected abstract boolean matchesSystem();
+
+ public String[] getDefaultCommandLineBrowserArray() {
+ return defaultBrowserCommandLineArray;
+ }
+
+ public String getDefaultBrowserKillCommand() {
+ return defaultBrowserKillCommand;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ProcessStarter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ProcessStarter.java
new file mode 100644
index 0000000..d80cf3c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ProcessStarter.java
@@ -0,0 +1,9 @@
+package net.jsunit;
+
+import java.io.IOException;
+
+public interface ProcessStarter {
+
+ Process execute(String[] command) throws IOException;
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteConfigurationSource.java
new file mode 100644
index 0000000..3796f60
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteConfigurationSource.java
@@ -0,0 +1,94 @@
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationProperty;
+import net.jsunit.configuration.ConfigurationSource;
+import org.jdom.Document;
+import org.jdom.Element;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+import java.util.logging.Logger;
+
+public class RemoteConfigurationSource implements ConfigurationSource {
+
+ private Logger logger = Logger.getLogger("net.jsunit");
+
+ private Document document;
+
+ public RemoteConfigurationSource(RemoteServerHitter hitter, String remoteMachineURL) {
+ try {
+ document = hitter.hitURL(new URL(remoteMachineURL + "/config"));
+ } catch (IOException e) {
+ logger.severe("Could not retrieve configuration from remoteMachine URL " + remoteMachineURL);
+ }
+ }
+
+ public boolean isInitialized() {
+ return document != null;
+ }
+
+ public String browserFileNames() {
+ return commaSeparatedTextOfChildrenOfElement(ConfigurationProperty.BROWSER_FILE_NAMES);
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return textOfElement(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS);
+ }
+
+ public String description() {
+ return textOfElement(ConfigurationProperty.DESCRIPTION);
+ }
+
+ public String logsDirectory() {
+ return textOfElement(ConfigurationProperty.LOGS_DIRECTORY);
+ }
+
+ public String port() {
+ return textOfElement(ConfigurationProperty.PORT);
+ }
+
+ public String remoteMachineURLs() {
+ return commaSeparatedTextOfChildrenOfElement(ConfigurationProperty.REMOTE_MACHINE_URLS);
+ }
+
+ public String resourceBase() {
+ return textOfElement(ConfigurationProperty.RESOURCE_BASE);
+ }
+
+ public String timeoutSeconds() {
+ return textOfElement(ConfigurationProperty.TIMEOUT_SECONDS);
+ }
+
+ public String url() {
+ return textOfElement(ConfigurationProperty.URL);
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return textOfElement(ConfigurationProperty.IGNORE_UNRESPONSIVE_REMOTE_MACHINES);
+ }
+
+ private String textOfElement(ConfigurationProperty property) {
+ Element element = document.getRootElement().getChild(property.getName());
+ if (element == null)
+ return "";
+ return element.getTextTrim();
+ }
+
+ private String commaSeparatedTextOfChildrenOfElement(ConfigurationProperty property) {
+ Element parent = document.getRootElement().getChild(property.getName());
+ if (parent == null)
+ return "";
+ List children = parent.getChildren();
+ StringBuffer buffer = new StringBuffer();
+ for (Iterator it = children.iterator(); it.hasNext();) {
+ Element child = it.next();
+ buffer.append(child.getTextTrim());
+ if (it.hasNext())
+ buffer.append(",");
+ }
+ return buffer.toString();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteMachineServerHitter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteMachineServerHitter.java
new file mode 100644
index 0000000..e7af793
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteMachineServerHitter.java
@@ -0,0 +1,23 @@
+package net.jsunit;
+
+import net.jsunit.utility.StreamUtility;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+
+public class RemoteMachineServerHitter implements RemoteServerHitter {
+
+ public Document hitURL(URL url) throws IOException {
+ String xmlResultString = submitRequestTo(url);
+ return XmlUtility.asXmlDocument(xmlResultString);
+ }
+
+ private String submitRequestTo(URL url) throws IOException {
+ URLConnection connection = url.openConnection();
+ return StreamUtility.readAllFromStream(connection.getInputStream());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteServerHitter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteServerHitter.java
new file mode 100644
index 0000000..cc92d7c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/RemoteServerHitter.java
@@ -0,0 +1,12 @@
+package net.jsunit;
+
+import org.jdom.Document;
+
+import java.io.IOException;
+import java.net.URL;
+
+public interface RemoteServerHitter {
+
+ public Document hitURL(URL url) throws IOException;
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ServerRegistry.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ServerRegistry.java
new file mode 100644
index 0000000..b66bcdb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/ServerRegistry.java
@@ -0,0 +1,26 @@
+package net.jsunit;
+
+public class ServerRegistry {
+ private static JsUnitStandardServer standardServer;
+ private static JsUnitFarmServer farmServer;
+
+ public static void registerServer(JsUnitStandardServer server) {
+ standardServer = server;
+ }
+
+ public static void registerFarmServer(JsUnitFarmServer server) {
+ farmServer = server;
+ }
+
+ public static JsUnitStandardServer getStandardServer() {
+ return standardServer;
+ }
+
+ public static JsUnitFarmServer getFarmServer() {
+ return farmServer;
+ }
+
+ public static JsUnitServer getServer() {
+ return standardServer != null ? standardServer : farmServer;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/StandaloneTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/StandaloneTest.java
new file mode 100644
index 0000000..ed1e374
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/StandaloneTest.java
@@ -0,0 +1,127 @@
+package net.jsunit;
+
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.configuration.DelegatingConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.TestRunResult;
+import net.jsunit.utility.XmlUtility;
+
+
+
+public class StandaloneTest extends TestCase
+{
+
+ protected JsUnitStandardServer server;
+ private TestRunManager testRunManager;
+ private ConfigurationSource configurationSource;
+ private String overrideURL;
+
+
+
+ public StandaloneTest( String name )
+ {
+ super( name );
+ this.configurationSource = configurationSource();
+ }
+
+
+
+ public StandaloneTest( ConfigurationSource source )
+ {
+ super( source.browserFileNames() );
+ this.configurationSource = source;
+ }
+
+
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ ConfigurationSource originalSource = Configuration.resolveSource();
+ Configuration configuration = new Configuration( originalSource );
+ for ( final Browser browser : configuration.getBrowsers() )
+ suite.addTest( new StandaloneTest( new DelegatingConfigurationSource( originalSource ) {
+ public String browserFileNames()
+ {
+ return browser.getFileName();
+ }
+ } ) );
+ return suite;
+ }
+
+
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ server = new JsUnitStandardServer( new Configuration( configurationSource ), false );
+ server.start();
+ testRunManager = createTestRunManager();
+ }
+
+
+
+ protected ConfigurationSource configurationSource()
+ {
+ return Configuration.resolveSource();
+ }
+
+
+
+ protected TestRunManager createTestRunManager()
+ {
+ return new TestRunManager( server, overrideURL );
+ }
+
+
+
+ public void tearDown() throws Exception
+ {
+ if ( server != null )
+ server.dispose();
+ super.tearDown();
+ }
+
+
+
+ public void runTest() throws Exception
+ {
+ testStandaloneRun();
+ }
+
+
+
+ public void testStandaloneRun() throws Exception
+ {
+ testRunManager.runTests();
+ TestRunResult testRunResult = testRunManager.getTestRunResult();
+ if ( !testRunResult.wasSuccessful() )
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append( testRunResult.displayString() );
+ buffer.append( "\n" );
+ String xml = XmlUtility.asPrettyString( testRunManager.getTestRunResult().asXml() );
+ buffer.append( xml );
+ fail( buffer.toString() );
+ }
+ }
+
+
+
+ public JsUnitStandardServer getServer()
+ {
+ return server;
+ }
+
+
+
+ public void setOverrideURL( String url )
+ {
+ this.overrideURL = url;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TestRunManager.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TestRunManager.java
new file mode 100644
index 0000000..690aa79
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TestRunManager.java
@@ -0,0 +1,108 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.Browser;
+import net.jsunit.model.TestRunResult;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class TestRunManager {
+
+ private BrowserTestRunner testRunner;
+ private TestRunResult testRunResult;
+ private final String overrideUrl;
+ private List browsers;
+
+ public static void main(String[] args) throws Exception {
+ JsUnitStandardServer server = new JsUnitStandardServer(Configuration.resolve(args), true);
+ int port = Integer.parseInt(args[args.length - 1]);
+ if (noLogging(args))
+ shutOffAllLogging();
+ server.addBrowserTestRunListener(new TestRunNotifierServer(server, port));
+ server.start();
+ TestRunManager manager = new TestRunManager(server);
+ manager.runTests();
+ if (server.isAlive())
+ server.dispose();
+ }
+
+ private static void shutOffAllLogging() {
+ Logger.getLogger("net.jsunit").setLevel(Level.OFF);
+ Logger.getLogger("org.mortbay").setLevel(Level.OFF);
+ Logger.getLogger("com.opensymphony").setLevel(Level.OFF);
+ }
+
+ private static boolean noLogging(String[] arguments) {
+ for (String string : arguments)
+ if (string.equals("-noLogging"))
+ return true;
+ return false;
+ }
+
+ public TestRunManager(BrowserTestRunner testRunner) {
+ this(testRunner, null);
+ }
+
+ public TestRunManager(BrowserTestRunner testRunner, String overrideUrl) {
+ this.testRunner = testRunner;
+ this.overrideUrl = overrideUrl;
+ browsers = testRunner.getBrowsers();
+ }
+
+ public void runTests() {
+ initializeTestRunResult();
+ testRunner.logStatus("Starting Test Run");
+ testRunner.startTestRun();
+ try {
+ for (Browser browser : browsers) {
+ BrowserLaunchSpecification launchSpec = new BrowserLaunchSpecification(browser, overrideUrl);
+ long launchTime = testRunner.launchBrowserTestRun(launchSpec);
+ waitForResultToBeSubmitted(browser, launchTime);
+ if (testRunner.isAlive())
+ testRunResult.addBrowserResult(testRunner.lastResult());
+ else
+ return;
+ }
+ } finally {
+ testRunner.finishTestRun();
+ }
+ testRunner.logStatus("Test Run Completed");
+ }
+
+ private void initializeTestRunResult() {
+ testRunResult = new TestRunResult();
+ testRunResult.initializeProperties();
+ }
+
+ private void waitForResultToBeSubmitted(Browser browser, long launchTime) {
+ testRunner.logStatus("Waiting for " + browser.getFileName() + " to submit result");
+ long secondsWaited = 0;
+ while (testRunner.isAlive() && !testRunner.hasReceivedResultSince(launchTime)) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ }
+ secondsWaited++;
+ if (secondsWaited > (testRunner.timeoutSeconds()) + 3)
+ throw new RuntimeException("Server not responding");
+ }
+ }
+
+ public TestRunResult getTestRunResult() {
+ return testRunResult;
+ }
+
+ public void limitToBrowserWithId(int chosenBrowserId) throws InvalidBrowserIdException {
+ Browser chosenBrowser = null;
+ for (Browser browser : browsers) {
+ if (browser.hasId(chosenBrowserId))
+ chosenBrowser = browser;
+ }
+ if (chosenBrowser == null)
+ throw new InvalidBrowserIdException(chosenBrowserId);
+ browsers = Arrays.asList(chosenBrowser);
+ }
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TimeoutChecker.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TimeoutChecker.java
new file mode 100644
index 0000000..cc4cef2
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/TimeoutChecker.java
@@ -0,0 +1,93 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class TimeoutChecker extends Thread {
+
+ private final BrowserTestRunner runner;
+ private long launchTime;
+ private final Browser browser;
+ private boolean alive;
+ private long checkInterval;
+ private Process browserProcess;
+
+ public TimeoutChecker(Process browserProcess, Browser browser, long launchTime, BrowserTestRunner runner) {
+ this(browserProcess, browser, launchTime, runner, 100);
+ }
+
+ public TimeoutChecker(Process browserProcess, Browser browser, long launchTime, BrowserTestRunner runner, long checkInterval) {
+ this.browser = browser;
+ this.runner = runner;
+ this.launchTime = launchTime;
+ this.checkInterval = checkInterval;
+ this.browserProcess = browserProcess;
+ alive = true;
+ }
+
+ public void run() {
+
+ while (alive && !runner.hasReceivedResultSince(launchTime)) {
+ if (waitedTooLong()) {
+ runner.logStatus("Browser " + browser.getFileName() + " timed out after " + runner.timeoutSeconds() + " seconds");
+ runner.accept(createTimedOutBrowserResult());
+ return;
+ }
+// else if (!isBrowserProcessAlive()) {
+// if (!runner.hasReceivedResultSince(launchTime)) {
+// runner.logStatus("Browser " + browserFileName + " was shutdown externally");
+// runner.accept(createExternallyShutdownBrowserResult());
+// return;
+// }
+// }
+ else
+ try {
+ Thread.sleep(checkInterval);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ //TODO: finish implementing external shutdown
+ @SuppressWarnings("unused")
+ private BrowserResult createExternallyShutdownBrowserResult() {
+ BrowserResult result = createRawBrowserResult();
+ result.setExternallyShutDown();
+ return result;
+ }
+
+ private BrowserResult createTimedOutBrowserResult() {
+ BrowserResult result = createRawBrowserResult();
+ result.setTimedOut();
+ return result;
+ }
+
+ private BrowserResult createRawBrowserResult() {
+ BrowserResult result = new BrowserResult();
+ result.setBrowser(browser);
+ return result;
+ }
+
+ //TODO: finish implementing external shutdown
+ @SuppressWarnings("unused")
+ private boolean isBrowserProcessAlive() {
+ try {
+ if (browserProcess == null)
+ return false;
+ browserProcess.exitValue();
+ return false;
+ } catch (IllegalThreadStateException e) {
+ return true;
+ }
+ }
+
+ public void die() {
+ alive = false;
+ }
+
+ private boolean waitedTooLong() {
+ long secondsWaited = (System.currentTimeMillis() - launchTime) / 1000;
+ return secondsWaited > runner.timeoutSeconds();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserResultAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserResultAware.java
new file mode 100644
index 0000000..02e9201
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserResultAware.java
@@ -0,0 +1,9 @@
+package net.jsunit.action;
+
+import net.jsunit.model.BrowserResult;
+
+public interface BrowserResultAware {
+
+ public void setBrowserResult(BrowserResult result);
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserTestRunnerConfigurationAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserTestRunnerConfigurationAction.java
new file mode 100644
index 0000000..1b1e86c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/BrowserTestRunnerConfigurationAction.java
@@ -0,0 +1,13 @@
+package net.jsunit.action;
+
+import net.jsunit.XmlRenderable;
+
+public class BrowserTestRunnerConfigurationAction extends JsUnitBrowserTestRunnerAction {
+ public String execute() throws Exception {
+ return SUCCESS;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ return runner;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/DistributedTestRunnerAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/DistributedTestRunnerAction.java
new file mode 100644
index 0000000..d2a739b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/DistributedTestRunnerAction.java
@@ -0,0 +1,36 @@
+package net.jsunit.action;
+
+import net.jsunit.DistributedTestRunManager;
+import net.jsunit.XmlRenderable;
+
+public class DistributedTestRunnerAction extends JsUnitFarmServerAction {
+
+ private DistributedTestRunManager manager;
+ private String overrideURL;
+
+ public String execute() throws Exception {
+ String message = "Received request to run farm tests";
+ if (overrideURL != null)
+ message += " with URL " + overrideURL;
+ server.logStatus(message);
+ //noinspection SynchronizeOnNonFinalField
+ synchronized (server) {
+ manager = DistributedTestRunManager.forConfigurationAndURL(hitter, server.getConfiguration(), overrideURL);
+ manager.runTests();
+ }
+ server.logStatus("Done running farm tests");
+ return SUCCESS;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ return manager.getDistributedTestRunResult();
+ }
+
+ public DistributedTestRunManager getTestRunManager() {
+ return manager;
+ }
+
+ public void setUrl(String overrideURL) {
+ this.overrideURL = overrideURL;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ErrorXmlRenderable.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ErrorXmlRenderable.java
new file mode 100644
index 0000000..2373eac
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ErrorXmlRenderable.java
@@ -0,0 +1,16 @@
+package net.jsunit.action;
+
+import net.jsunit.XmlRenderable;
+import org.jdom.Element;
+
+public class ErrorXmlRenderable implements XmlRenderable {
+ private String message;
+
+ public ErrorXmlRenderable(String message) {
+ this.message = message;
+ }
+
+ public Element asXml() {
+ return new Element("error").setText(message);
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/FarmServerConfigurationAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/FarmServerConfigurationAction.java
new file mode 100644
index 0000000..9a601db
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/FarmServerConfigurationAction.java
@@ -0,0 +1,52 @@
+package net.jsunit.action;
+
+import net.jsunit.XmlRenderable;
+import org.jdom.CDATA;
+import org.jdom.Document;
+import org.jdom.Element;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class FarmServerConfigurationAction extends JsUnitFarmServerAction {
+
+ private Element result;
+
+ public String execute() throws Exception {
+ result = new Element("remoteConfigurations");
+ for (URL url : server.getConfiguration().getRemoteMachineURLs()) {
+ URL configurationURL = new URL(url.toString() + "/config");
+ Element configurationElement;
+ try {
+ Document document = hitter.hitURL(configurationURL);
+ configurationElement = document.getRootElement();
+ configurationElement.detach();
+ } catch (IOException e) {
+ configurationElement = new Element("configuration");
+ configurationElement.setAttribute("failedToConnect", String.valueOf(true));
+ configurationElement.addContent(new CDATA(e.toString()));
+ }
+
+ addRemoteConfigurationElementToResult(url, configurationElement);
+ }
+ return SUCCESS;
+ }
+
+ private void addRemoteConfigurationElementToResult(URL remoteMachineURL, Element configurationElement) {
+ Element remoteConfigurationElement = new Element("remoteConfiguration");
+ remoteConfigurationElement.setAttribute("remoteMachineURL", remoteMachineURL.toString());
+ remoteConfigurationElement.addContent(configurationElement);
+ result.addContent(remoteConfigurationElement);
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ return new XmlRenderable() {
+
+ public Element asXml() {
+ return result;
+ }
+
+ };
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/IndexAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/IndexAction.java
new file mode 100644
index 0000000..c24e08d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/IndexAction.java
@@ -0,0 +1,9 @@
+package net.jsunit.action;
+
+import com.opensymphony.xwork.Action;
+
+public class IndexAction implements Action {
+ public String execute() throws Exception {
+ return SUCCESS;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitBrowserTestRunnerAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitBrowserTestRunnerAction.java
new file mode 100644
index 0000000..4577eca
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitBrowserTestRunnerAction.java
@@ -0,0 +1,18 @@
+package net.jsunit.action;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.BrowserTestRunner;
+
+public abstract class JsUnitBrowserTestRunnerAction implements Action, XmlProducer {
+
+ protected BrowserTestRunner runner;
+
+ public void setBrowserTestRunner(BrowserTestRunner runner) {
+ this.runner = runner;
+ }
+
+ public BrowserTestRunner getBrowserTestRunner() {
+ return runner;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitFarmServerAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitFarmServerAction.java
new file mode 100644
index 0000000..e9ae69e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitFarmServerAction.java
@@ -0,0 +1,24 @@
+package net.jsunit.action;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.JsUnitFarmServer;
+import net.jsunit.RemoteServerHitter;
+
+public abstract class JsUnitFarmServerAction
+ implements Action,
+ XmlProducer,
+ RemoteRunnerHitterAware,
+ JsUnitServerAware {
+
+ protected JsUnitFarmServer server;
+ protected RemoteServerHitter hitter;
+
+ public void setFarmServer(JsUnitFarmServer server) {
+ this.server = server;
+ }
+
+ public void setRemoteRunnerHitter(RemoteServerHitter hitter) {
+ this.hitter = hitter;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitServerAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitServerAware.java
new file mode 100644
index 0000000..a278a0a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/JsUnitServerAware.java
@@ -0,0 +1,7 @@
+package net.jsunit.action;
+
+import net.jsunit.JsUnitFarmServer;
+
+public interface JsUnitServerAware {
+ void setFarmServer(JsUnitFarmServer farmServer);
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionAction.java
new file mode 100644
index 0000000..3b487bc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionAction.java
@@ -0,0 +1,26 @@
+package net.jsunit.action;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.version.VersionGrabber;
+
+public class LatestVersionAction implements Action, LatestVersionSource, VersionGrabberAware {
+ private VersionGrabber versionGrabber;
+ private double latestVersion;
+
+ public String execute() throws Exception {
+ try {
+ latestVersion = versionGrabber.grabVersion();
+ return SUCCESS;
+ } catch (Exception e) {
+ return ERROR;
+ }
+ }
+
+ public double getLatestVersion() {
+ return latestVersion;
+ }
+
+ public void setVersionGrabber(VersionGrabber versionGrabber) {
+ this.versionGrabber = versionGrabber;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionResult.java
new file mode 100644
index 0000000..77bfe65
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionResult.java
@@ -0,0 +1,22 @@
+package net.jsunit.action;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.Result;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.OutputStream;
+
+public class LatestVersionResult implements Result {
+
+ public void execute(ActionInvocation invocation) throws Exception {
+ LatestVersionSource source = (LatestVersionSource) invocation.getAction();
+ double latestVersion = source.getLatestVersion();
+ HttpServletResponse response = ServletActionContext.getResponse();
+ response.setContentType("text/xml");
+ OutputStream out = response.getOutputStream();
+ out.write(String.valueOf(latestVersion).getBytes());
+ out.close();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionSource.java
new file mode 100644
index 0000000..3a3410b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/LatestVersionSource.java
@@ -0,0 +1,5 @@
+package net.jsunit.action;
+
+public interface LatestVersionSource {
+ double getLatestVersion();
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RemoteRunnerHitterAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RemoteRunnerHitterAware.java
new file mode 100644
index 0000000..ee4fbf9
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RemoteRunnerHitterAware.java
@@ -0,0 +1,9 @@
+package net.jsunit.action;
+
+import net.jsunit.RemoteServerHitter;
+
+public interface RemoteRunnerHitterAware {
+
+ public void setRemoteRunnerHitter(RemoteServerHitter hitter);
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RequestSourceAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RequestSourceAware.java
new file mode 100644
index 0000000..f8b6403
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/RequestSourceAware.java
@@ -0,0 +1,8 @@
+package net.jsunit.action;
+
+public interface RequestSourceAware {
+
+ void setRequestIPAddress(String ipAddress);
+
+ void setRequestHost(String host);
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultAcceptorAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultAcceptorAction.java
new file mode 100644
index 0000000..7d3c2ae
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultAcceptorAction.java
@@ -0,0 +1,28 @@
+package net.jsunit.action;
+
+import net.jsunit.XmlRenderable;
+import net.jsunit.model.BrowserResult;
+
+public class ResultAcceptorAction extends JsUnitBrowserTestRunnerAction implements BrowserResultAware {
+
+ protected BrowserResult result;
+
+ public String execute() throws Exception {
+ runner.logStatus("Received submission");
+ runner.accept(result);
+ return SUCCESS;
+ }
+
+ public void setBrowserResult(BrowserResult result) {
+ this.result = result;
+ }
+
+ public BrowserResult getResult() {
+ return result;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ return getResult();
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultDisplayerAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultDisplayerAction.java
new file mode 100644
index 0000000..18135a7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/ResultDisplayerAction.java
@@ -0,0 +1,47 @@
+package net.jsunit.action;
+
+import net.jsunit.InvalidBrowserIdException;
+import net.jsunit.XmlRenderable;
+import net.jsunit.model.BrowserResult;
+
+public class ResultDisplayerAction extends JsUnitBrowserTestRunnerAction {
+
+ private String id;
+ private BrowserResult result;
+ private Integer browserId;
+ private boolean browserIdInvalid;
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public void setBrowserId(Integer browserId) {
+ this.browserId = browserId;
+ }
+
+ public String execute() throws Exception {
+ if (id == null || browserId == null)
+ return ERROR;
+ try {
+ result = runner.findResultWithId(id, browserId);
+ } catch (InvalidBrowserIdException e) {
+ browserIdInvalid = true;
+ return ERROR;
+ }
+ return SUCCESS;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ if (result != null)
+ return result;
+ String message;
+ if (browserIdInvalid)
+ message = "Invalid Browser ID '" + browserId + "'";
+ else if (id != null && browserId != null)
+ message = "No Test Result has been submitted with ID '" + id + "' for browser ID '" + browserId + "'";
+ else
+ message = "A Test Result ID and a browser ID must both be given";
+ return new ErrorXmlRenderable(message);
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/StandaloneTestAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/StandaloneTestAware.java
new file mode 100644
index 0000000..929fb30
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/StandaloneTestAware.java
@@ -0,0 +1,9 @@
+package net.jsunit.action;
+
+import net.jsunit.StandaloneTest;
+
+public interface StandaloneTestAware {
+
+ public void setStandaloneTest(StandaloneTest test);
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/TestRunnerAction.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/TestRunnerAction.java
new file mode 100644
index 0000000..8e328f3
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/TestRunnerAction.java
@@ -0,0 +1,76 @@
+package net.jsunit.action;
+
+import net.jsunit.InvalidBrowserIdException;
+import net.jsunit.TestRunManager;
+import net.jsunit.XmlRenderable;
+import net.jsunit.utility.StringUtility;
+
+public class TestRunnerAction extends JsUnitBrowserTestRunnerAction implements RequestSourceAware {
+
+ private TestRunManager manager;
+ private String url;
+ private String remoteAddress;
+ private String remoteHost;
+ private String browserId;
+ private boolean badBrowserId = false;
+
+ public String execute() throws Exception {
+ runner.logStatus(requestReceivedMessage());
+ //noinspection SynchronizeOnNonFinalField
+ synchronized (runner) {
+ manager = new TestRunManager(runner, url);
+ if (!StringUtility.isEmpty(browserId)) {
+ try {
+ manager.limitToBrowserWithId(Integer.parseInt(browserId));
+ } catch (InvalidBrowserIdException e) {
+ badBrowserId = true;
+ return ERROR;
+ } catch (NumberFormatException e) {
+ badBrowserId = true;
+ return ERROR;
+ }
+ }
+ manager.runTests();
+ }
+ runner.logStatus("Done running tests");
+ return SUCCESS;
+ }
+
+ private String requestReceivedMessage() {
+ String message = "Received request to run tests";
+ if (!StringUtility.isEmpty(remoteAddress) || !StringUtility.isEmpty(remoteHost)) {
+ message += " from ";
+ if (!StringUtility.isEmpty(remoteHost)) {
+ message += remoteHost;
+ if (!StringUtility.isEmpty(remoteAddress) && !remoteAddress.equals(remoteHost))
+ message += " (" + remoteAddress + ")";
+ } else {
+ message += remoteAddress;
+ }
+ }
+ return message;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ if (badBrowserId) {
+ return new ErrorXmlRenderable("Invalid browser ID: " + browserId);
+ }
+ return manager.getTestRunResult();
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public void setRequestIPAddress(String ipAddress) {
+ remoteAddress = ipAddress;
+ }
+
+ public void setRequestHost(String host) {
+ remoteHost = host;
+ }
+
+ public void setBrowserId(String browserId) {
+ this.browserId = browserId;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/VersionGrabberAware.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/VersionGrabberAware.java
new file mode 100644
index 0000000..d720b8e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/VersionGrabberAware.java
@@ -0,0 +1,7 @@
+package net.jsunit.action;
+
+import net.jsunit.version.VersionGrabber;
+
+public interface VersionGrabberAware {
+ void setVersionGrabber(VersionGrabber versionGrabber);
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlProducer.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlProducer.java
new file mode 100644
index 0000000..7485417
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlProducer.java
@@ -0,0 +1,9 @@
+package net.jsunit.action;
+
+import net.jsunit.XmlRenderable;
+
+public interface XmlProducer {
+
+ public XmlRenderable getXmlRenderable();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlResult.java
new file mode 100644
index 0000000..9300f1d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/action/XmlResult.java
@@ -0,0 +1,39 @@
+package net.jsunit.action;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.Result;
+import net.jsunit.XmlRenderable;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+import org.jdom.Element;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.logging.Logger;
+
+public class XmlResult implements Result {
+
+ private Logger logger = Logger.getLogger(XmlResult.class.getName());
+
+ public void execute(ActionInvocation invocation) throws Exception {
+ XmlProducer producer = (XmlProducer) invocation.getAction();
+ XmlRenderable xmlRenderable = producer.getXmlRenderable();
+ Element element = xmlRenderable.asXml();
+ Document document = new Document(element);
+ String xmlString = XmlUtility.asString(document);
+ HttpServletResponse response = ServletActionContext.getResponse();
+ response.setContentType("text/xml");
+ try {
+ OutputStream out = response.getOutputStream();
+ BufferedOutputStream bufferedOut = new BufferedOutputStream(out);
+ bufferedOut.write(xmlString.getBytes());
+ bufferedOut.close();
+ } catch (IOException e) {
+ logger.warning("Failed to write result XML response to browser: " + e.toString());
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserResultInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserResultInterceptor.java
new file mode 100644
index 0000000..0e35bd9
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserResultInterceptor.java
@@ -0,0 +1,37 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.Action;
+import net.jsunit.action.BrowserResultAware;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultWriter;
+import net.jsunit.utility.StringUtility;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class BrowserResultInterceptor extends JsUnitInterceptor {
+
+ protected void execute(Action targetAction) {
+ HttpServletRequest request = ServletActionContext.getRequest();
+ BrowserResult result = build(request);
+ BrowserResultAware aware = (BrowserResultAware) targetAction;
+ aware.setBrowserResult(result);
+ }
+
+ public BrowserResult build(HttpServletRequest request) {
+ BrowserResult result = new BrowserResult();
+ String testId = request.getParameter(BrowserResultWriter.ID);
+ if (!StringUtility.isEmpty(testId))
+ result.setId(testId);
+ result.setRemoteAddress(request.getRemoteAddr());
+ result.setUserAgent(request.getParameter(BrowserResultWriter.USER_AGENT));
+ result.setBaseURL(request.getParameter(BrowserResultWriter.URL));
+ String time = request.getParameter(BrowserResultWriter.TIME);
+ if (!StringUtility.isEmpty(time))
+ result.setTime(Double.parseDouble(time));
+ result.setJsUnitVersion(request.getParameter(BrowserResultWriter.JSUNIT_VERSION));
+ result.setTestCaseStrings(request.getParameterValues(BrowserResultWriter.TEST_CASES));
+ return result;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerInterceptor.java
new file mode 100644
index 0000000..57b6149
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerInterceptor.java
@@ -0,0 +1,21 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.BrowserTestRunner;
+import net.jsunit.action.JsUnitBrowserTestRunnerAction;
+
+public class BrowserTestRunnerInterceptor extends JsUnitInterceptor {
+
+ private static BrowserTestRunnerSource source = new DefaultBrowserTestRunnerSource();
+
+ public static void setBrowserTestRunnerSource(BrowserTestRunnerSource aSource) {
+ source = aSource;
+ }
+
+ protected void execute(Action action) {
+ JsUnitBrowserTestRunnerAction jsUnitAction = ((JsUnitBrowserTestRunnerAction) action);
+ BrowserTestRunner runner = source.getRunner();
+ jsUnitAction.setBrowserTestRunner(runner);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerSource.java
new file mode 100644
index 0000000..9837bf6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/BrowserTestRunnerSource.java
@@ -0,0 +1,9 @@
+package net.jsunit.interceptor;
+
+import net.jsunit.BrowserTestRunner;
+
+public interface BrowserTestRunnerSource {
+
+ BrowserTestRunner getRunner();
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.java
new file mode 100644
index 0000000..5ab7e23
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/DefaultBrowserTestRunnerSource.java
@@ -0,0 +1,12 @@
+package net.jsunit.interceptor;
+
+import net.jsunit.BrowserTestRunner;
+import net.jsunit.ServerRegistry;
+
+public class DefaultBrowserTestRunnerSource implements BrowserTestRunnerSource {
+
+ public BrowserTestRunner getRunner() {
+ return ServerRegistry.getStandardServer();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/FarmServerInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/FarmServerInterceptor.java
new file mode 100644
index 0000000..63a0daf
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/FarmServerInterceptor.java
@@ -0,0 +1,14 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.ServerRegistry;
+import net.jsunit.action.JsUnitServerAware;
+
+public class FarmServerInterceptor extends JsUnitInterceptor {
+
+ protected void execute(Action targetAction) {
+ JsUnitServerAware action = (JsUnitServerAware) targetAction;
+ action.setFarmServer(ServerRegistry.getFarmServer());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/JsUnitInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/JsUnitInterceptor.java
new file mode 100644
index 0000000..592cffc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/JsUnitInterceptor.java
@@ -0,0 +1,22 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import com.opensymphony.xwork.ActionInvocation;
+import com.opensymphony.xwork.interceptor.Interceptor;
+
+public abstract class JsUnitInterceptor implements Interceptor {
+
+ public void destroy() {
+ }
+
+ public void init() {
+ }
+
+ public String intercept(ActionInvocation invocation) throws Exception {
+ execute((Action) invocation.getAction());
+ return invocation.invoke();
+ }
+
+ protected abstract void execute(Action targetAction);
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.java
new file mode 100644
index 0000000..4fd0da4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptor.java
@@ -0,0 +1,14 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.RemoteMachineServerHitter;
+import net.jsunit.action.RemoteRunnerHitterAware;
+
+public class RemoteRunnerHitterInterceptor extends JsUnitInterceptor {
+
+ protected void execute(Action targetAction) {
+ RemoteRunnerHitterAware aware = ((RemoteRunnerHitterAware) targetAction);
+ aware.setRemoteRunnerHitter(new RemoteMachineServerHitter());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RequestSourceInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RequestSourceInterceptor.java
new file mode 100644
index 0000000..03ad8ad
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/RequestSourceInterceptor.java
@@ -0,0 +1,15 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.Action;
+import net.jsunit.action.RequestSourceAware;
+
+public class RequestSourceInterceptor extends JsUnitInterceptor {
+
+ protected void execute(Action targetAction) {
+ RequestSourceAware aware = ((RequestSourceAware) targetAction);
+ aware.setRequestIPAddress(ServletActionContext.getRequest().getRemoteAddr());
+ aware.setRequestHost(ServletActionContext.getRequest().getRemoteHost());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/VersionGrabberInterceptor.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/VersionGrabberInterceptor.java
new file mode 100644
index 0000000..dcfbb03
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/source_server/net/jsunit/interceptor/VersionGrabberInterceptor.java
@@ -0,0 +1,12 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import net.jsunit.version.JsUnitWebsiteVersionGrabber;
+import net.jsunit.action.VersionGrabberAware;
+
+public class VersionGrabberInterceptor extends JsUnitInterceptor {
+ protected void execute(Action targetAction) {
+ VersionGrabberAware aware = ((VersionGrabberAware) targetAction);
+ aware.setVersionGrabber(new JsUnitWebsiteVersionGrabber());
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/ashcroft.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/ashcroft.jar
new file mode 100644
index 0000000..a0def1c
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/ashcroft.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/httpunit-1.5.4.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/httpunit-1.5.4.jar
new file mode 100644
index 0000000..dd2404f
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/httpunit-1.5.4.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/js-1.5R4.1.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/js-1.5R4.1.jar
new file mode 100644
index 0000000..f92e9f9
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/js-1.5R4.1.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/jwebunit-1.2.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/jwebunit-1.2.jar
new file mode 100644
index 0000000..3ed7569
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/jwebunit-1.2.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/nekohtml-0.8.1.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/nekohtml-0.8.1.jar
new file mode 100644
index 0000000..f4389af
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/nekohtml-0.8.1.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/xml-apis-1.0.b2.jar b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/xml-apis-1.0.b2.jar
new file mode 100644
index 0000000..ad33a5a
Binary files /dev/null and b/ant-jsunit-hieatt/trunk/lib/jsunit/java/testlib/xml-apis-1.0.b2.jar differ
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/BrowserLaunchSpecificationTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/BrowserLaunchSpecificationTest.java
new file mode 100644
index 0000000..112e0a4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/BrowserLaunchSpecificationTest.java
@@ -0,0 +1,26 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+
+public class BrowserLaunchSpecificationTest extends TestCase {
+
+ public void testNoOverride() {
+ BrowserLaunchSpecification spec = new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0));
+ assertFalse(spec.hasOverrideUrl());
+ assertNull(spec.getOverrideUrl());
+
+ spec = new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0), " ");
+ assertFalse(spec.hasOverrideUrl());
+ }
+
+ public void testOverride() {
+ BrowserLaunchSpecification spec = new BrowserLaunchSpecification(
+ new Browser("mybrowser.exe", 0),
+ "http://www.example.com"
+ );
+ assertTrue(spec.hasOverrideUrl());
+ assertEquals("http://www.example.com", spec.getOverrideUrl());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerConnectionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerConnectionTest.java
new file mode 100644
index 0000000..e4b8be3
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerConnectionTest.java
@@ -0,0 +1,43 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+
+public class ClientServerConnectionTest extends TestCase {
+
+ private ServerSideConnection serverSideConnection;
+ private ClientSideConnection clientSideConnection;
+ private MockMessageReceiver mockReceiver1;
+ private MockMessageReceiver mockReceiver2;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ mockReceiver1 = new MockMessageReceiver();
+ mockReceiver2 = new MockMessageReceiver();
+ serverSideConnection = new ServerSideConnection(mockReceiver1, 8083);
+ clientSideConnection = new ClientSideConnection(mockReceiver2, 8083);
+ clientSideConnection.start();
+ serverSideConnection.connect();
+
+ while (!serverSideConnection.isConnected() || !clientSideConnection.isRunning())
+ Thread.sleep(3);
+ }
+
+ public void tearDown() throws Exception {
+ serverSideConnection.shutDown();
+ clientSideConnection.shutdown();
+ super.tearDown();
+ }
+
+ public void testSimple() throws InterruptedException {
+ serverSideConnection.sendMessage("hello");
+ while (mockReceiver2.message == null)
+ Thread.sleep(3);
+ assertEquals("hello", mockReceiver2.message);
+
+ clientSideConnection.sendMessage("bonjour");
+ while (mockReceiver1.message == null)
+ Thread.sleep(3);
+ assertEquals("bonjour", mockReceiver1.message);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerInteractionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerInteractionTest.java
new file mode 100644
index 0000000..5d2d9bb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/ClientServerInteractionTest.java
@@ -0,0 +1,36 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+import net.jsunit.model.DummyBrowserSource;
+
+public class ClientServerInteractionTest extends TestCase {
+
+ private RemoteTestRunClient client;
+ private TestRunNotifierServer server;
+ private MockTestRunListener mockTestRunListener;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ mockTestRunListener = new MockTestRunListener();
+ client = new RemoteTestRunClient(new DummyBrowserSource("mybrowser.exe", 4), mockTestRunListener, 8083);
+ client.startListening();
+ server = new TestRunNotifierServer(new MockBrowserTestRunner(), 8083);
+ server.testRunStarted();
+ }
+
+ public void tearDown() throws Exception {
+ server.testRunFinished();
+ client.stopListening();
+ super.tearDown();
+ }
+
+ public void testSimple() throws InterruptedException {
+
+ server.browserTestRunStarted(new Browser("mybrowser.exe", 4));
+ while (!mockTestRunListener.browserTestRunStartedCalled)
+ Thread.sleep(3);
+ assertEquals(new Browser("mybrowser.exe", 4), mockTestRunListener.browser);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DistributedTestRunResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DistributedTestRunResultTest.java
new file mode 100644
index 0000000..59815be
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DistributedTestRunResultTest.java
@@ -0,0 +1,94 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.DistributedTestRunResult;
+import net.jsunit.model.ResultType;
+import net.jsunit.model.TestRunResult;
+import net.jsunit.utility.XmlUtility;
+
+import java.net.URL;
+
+public class DistributedTestRunResultTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ DistributedTestRunResult distributedResult = new DistributedTestRunResult();
+
+ TestRunResult result1 = new TestRunResult();
+ result1.addBrowserResult(successResult());
+ result1.addBrowserResult(successResult());
+ distributedResult.addTestRunResult(result1);
+
+ assertEquals(ResultType.SUCCESS, distributedResult.getResultType());
+ assertTrue(distributedResult.wasSuccessful());
+
+ TestRunResult result2 = new TestRunResult();
+ result2.addBrowserResult(failureResult());
+ result2.addBrowserResult(errorResult());
+ distributedResult.addTestRunResult(result2);
+
+ assertEquals(ResultType.ERROR, distributedResult.getResultType());
+ assertFalse(distributedResult.wasSuccessful());
+ assertEquals(1, distributedResult.getFailureCount());
+ assertEquals(1, distributedResult.getErrorCount());
+ }
+
+ public void testUnresponsiveRemoteURL() throws Exception {
+ DistributedTestRunResult distributedResult = new DistributedTestRunResult();
+
+ TestRunResult result1 = new TestRunResult();
+ result1.addBrowserResult(successResult());
+ result1.addBrowserResult(successResult());
+ distributedResult.addTestRunResult(result1);
+
+ TestRunResult result2 = new TestRunResult(new URL("http://my.domain.com:8201"));
+ result2.setUnresponsive();
+ distributedResult.addTestRunResult(result2);
+
+ TestRunResult result3 = new TestRunResult(new URL("http://my.domain.com:8201"));
+ result3.setUnresponsive();
+ distributedResult.addTestRunResult(result3);
+
+ assertEquals(ResultType.UNRESPONSIVE, distributedResult.getResultType());
+ }
+
+ public void testAsXml() throws Exception {
+ DistributedTestRunResult distributedResult = new DistributedTestRunResult();
+
+ TestRunResult result1 = new TestRunResult();
+ result1.addBrowserResult(successResult());
+ result1.addBrowserResult(successResult());
+ distributedResult.addTestRunResult(result1);
+
+ TestRunResult result2 = new TestRunResult();
+ result2.addBrowserResult(failureResult());
+ result2.addBrowserResult(errorResult());
+ distributedResult.addTestRunResult(result2);
+
+ TestRunResult result3 = new TestRunResult(new URL("http://my.domain.com:4732"));
+ result3.setUnresponsive();
+ distributedResult.addTestRunResult(result3);
+
+ assertEquals(
+ "" +
+ XmlUtility.asString(result1.asXml()) +
+ XmlUtility.asString(result2.asXml()) +
+ "" +
+ "",
+ XmlUtility.asString(distributedResult.asXml())
+ );
+ }
+
+ private BrowserResult successResult() {
+ return new BrowserResult();
+ }
+
+ private BrowserResult failureResult() {
+ return new DummyBrowserResult(false, 1, 0);
+ }
+
+ private BrowserResult errorResult() {
+ return new DummyBrowserResult(false, 0, 1);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DummyBrowserResult.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DummyBrowserResult.java
new file mode 100644
index 0000000..c40eb48
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/DummyBrowserResult.java
@@ -0,0 +1,43 @@
+package net.jsunit;
+
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.ResultType;
+import org.jdom.Document;
+
+public class DummyBrowserResult extends BrowserResult {
+
+ private final boolean success;
+ private final int failureCount;
+ private final int errorCount;
+
+ public DummyBrowserResult(boolean success, int failureCount, int errorCount) {
+ this.success = success;
+ this.failureCount = failureCount;
+ this.errorCount = errorCount;
+ }
+
+ public boolean wasSuccessful() {
+ return success;
+ }
+
+ public int getFailureCount() {
+ return failureCount;
+ }
+
+ public int getErrorCount() {
+ return errorCount;
+ }
+
+ public ResultType getResultType() {
+ if (getErrorCount() > 0)
+ return ResultType.ERROR;
+ if (getFailureCount() > 0)
+ return ResultType.FAILURE;
+ return ResultType.SUCCESS;
+ }
+
+ public Document asXmlDocument() {
+ return new Document(asXml());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockBrowserTestRunner.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockBrowserTestRunner.java
new file mode 100644
index 0000000..d5bdfa7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockBrowserTestRunner.java
@@ -0,0 +1,77 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import org.jdom.Element;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class MockBrowserTestRunner implements BrowserTestRunner {
+
+ public boolean disposeCalled;
+ public BrowserResult acceptedResult;
+ public BrowserResult resultToReturn;
+ public boolean shouldSucceed;
+ public String idPassed;
+ public Integer browserIdPassed;
+ public int timeoutSeconds;
+ public boolean hasReceivedResult;
+ public List logMessages = new ArrayList();
+ public List launchSpecs = new ArrayList();
+
+ public void startTestRun() {
+ }
+
+ public void finishTestRun() {
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ launchSpecs.add(launchSpec);
+ return 0;
+ }
+
+ public void accept(BrowserResult result) {
+ this.acceptedResult = result;
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return hasReceivedResult;
+ }
+
+ public BrowserResult lastResult() {
+ return new DummyBrowserResult(shouldSucceed, shouldSucceed ? 0 : 1, 0);
+ }
+
+ public void dispose() {
+ disposeCalled = true;
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) throws InvalidBrowserIdException {
+ idPassed = id;
+ browserIdPassed = browserId;
+ return resultToReturn;
+ }
+
+ public void logStatus(String message) {
+ logMessages.add(message);
+ }
+
+ public List getBrowsers() {
+ return Arrays.asList(new Browser[]{new Browser("mybrowser1.exe", 0), new Browser("mybrowser2.exe", 1)});
+ }
+
+ public int timeoutSeconds() {
+ return timeoutSeconds;
+ }
+
+ public Element asXml() {
+ return null;
+ }
+
+ public boolean isAlive() {
+ return true;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockMessageReceiver.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockMessageReceiver.java
new file mode 100644
index 0000000..c3c61e4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockMessageReceiver.java
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package net.jsunit;
+
+class MockMessageReceiver implements MessageReceiver {
+
+ public String message;
+
+ public void messageReceived(String message) {
+ this.message = message;
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockTestRunListener.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockTestRunListener.java
new file mode 100644
index 0000000..3aaa257
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/MockTestRunListener.java
@@ -0,0 +1,49 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class MockTestRunListener implements TestRunListener {
+
+ public boolean testRunStartedCalled;
+ public boolean testRunFinishedCalled;
+ public boolean browserTestRunStartedCalled;
+ public boolean browserTestRunFinishedCalled;
+ public Browser browser;
+ public boolean isReady;
+ public BrowserResult result;
+
+ public void browserTestRunFinished(Browser browser, BrowserResult result) {
+ browserTestRunFinishedCalled = true;
+ this.browser = browser;
+ this.result = result;
+ }
+
+ public void browserTestRunStarted(Browser browser) {
+ browserTestRunStartedCalled = true;
+ this.browser = browser;
+ }
+
+ public boolean isReady() {
+ return isReady;
+ }
+
+ public void testRunStarted() {
+ testRunStartedCalled = true;
+ }
+
+ public void testRunFinished() {
+ testRunFinishedCalled = true;
+ }
+
+ public void reset() {
+ testRunStartedCalled = false;
+ testRunFinishedCalled = false;
+ browserTestRunStartedCalled = false;
+ browserTestRunFinishedCalled = false;
+ browser = null;
+ isReady = false;
+ result = null;
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/RemoteTestRunClientTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/RemoteTestRunClientTest.java
new file mode 100644
index 0000000..0ab32de
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/RemoteTestRunClientTest.java
@@ -0,0 +1,58 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.DummyBrowserSource;
+import net.jsunit.utility.XmlUtility;
+
+public class RemoteTestRunClientTest extends TestCase {
+
+ private MockTestRunListener listener;
+ private RemoteTestRunClient client;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ listener = new MockTestRunListener();
+ client = new RemoteTestRunClient(new DummyBrowserSource("mybrowser.exe", 3), listener, -1);
+ }
+
+ public void testTestRunStartedMessage() {
+ client.messageReceived("testRunStarted");
+ assertTrue(listener.testRunStartedCalled);
+ }
+
+ public void testTestRunFinishedMessage() {
+ client.messageReceived("testRunFinished");
+ assertTrue(listener.testRunFinishedCalled);
+ }
+
+ public void testBrowserTestRunStartedMessage() {
+ client.messageReceived("browserTestRunStarted");
+ client.messageReceived("3");
+ assertTrue(listener.browserTestRunStartedCalled);
+ assertEquals(new Browser("mybrowser.exe", 3), listener.browser);
+ }
+
+ public void testBrowserTestRunFinishedMessage() {
+ BrowserResult result = new BrowserResult();
+ result.setBaseURL("http://www.example.com");
+ result.setId("1234329439824");
+ result.setJsUnitVersion("905.43");
+ result.setRemoteAddress("http://123.45.67.89");
+ result.setTime(123.45);
+ result.setUserAgent("my browser version 5.6");
+ result.setTestCaseStrings(new String[]{"file:///dummy/path/dummyPage.html:testFoo|1.3|S||"});
+ client.messageReceived("browserTestRunFinished");
+ client.messageReceived("3");
+ String xml = XmlUtility.asString(result.asXmlDocument());
+ String[] lines = xml.split("\r\n");
+ for (String line : lines)
+ client.messageReceived(line);
+ client.messageReceived("endXml");
+ assertTrue(listener.browserTestRunFinishedCalled);
+ assertEquals(new Browser("mybrowser.exe", 3), listener.browser);
+ assertEquals(xml, XmlUtility.asString(listener.result.asXmlDocument()));
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/StubConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/StubConfigurationSource.java
new file mode 100644
index 0000000..4a85c47
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/StubConfigurationSource.java
@@ -0,0 +1,51 @@
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationSource;
+
+public class StubConfigurationSource implements ConfigurationSource {
+
+ public String browserFileNames() {
+ return null;
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return null;
+ }
+
+ public String description() {
+ return null;
+ }
+
+ public String logsDirectory() {
+ return null;
+ }
+
+ public String logStatus() {
+ return null;
+ }
+
+ public String port() {
+ return null;
+ }
+
+ public String remoteMachineURLs() {
+ return null;
+ }
+
+ public String resourceBase() {
+ return null;
+ }
+
+ public String timeoutSeconds() {
+ return null;
+ }
+
+ public String url() {
+ return null;
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return null;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunNotifierServerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunNotifierServerTest.java
new file mode 100644
index 0000000..0b09f5c
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunNotifierServerTest.java
@@ -0,0 +1,84 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+import net.jsunit.utility.XmlUtility;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestRunNotifierServerTest extends TestCase implements MessageReceiver {
+
+ private TestRunNotifierServer server;
+ private ClientSideConnection clientSideConnection;
+ private List messages = new ArrayList();
+ private MockBrowserTestRunner mockRunner;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ mockRunner = new MockBrowserTestRunner();
+ server = new TestRunNotifierServer(mockRunner, 8083);
+ clientSideConnection = new ClientSideConnection(this, 8083);
+ new Thread() {
+ public void run() {
+ server.testRunStarted();
+ }
+ }.start();
+
+ clientSideConnection.start();
+ waitForServerConnectionToStartRunning();
+ }
+
+ public void testMessagesSentAsTestRunProceeds() throws InterruptedException {
+ while (messages.size() < 1)
+ Thread.sleep(10);
+
+ assertEquals(1, messages.size());
+ assertEquals("testRunStarted", messages.get(0));
+
+ server.browserTestRunStarted(new Browser("mybrowser1.exe", 0));
+ while (messages.size() < 3)
+ Thread.sleep(10);
+
+ assertEquals("browserTestRunStarted", messages.get(1));
+ assertEquals("0", messages.get(2));
+
+ DummyBrowserResult browserResult = new DummyBrowserResult(false, 2, 3);
+ server.browserTestRunFinished(new Browser("mybrowser2.exe", 1), browserResult);
+ while (messages.size() < 8)
+ Thread.sleep(10);
+
+ assertEquals("browserTestRunFinished", messages.get(3));
+ assertEquals("1", messages.get(4));
+ String line1 = messages.get(5);
+ String line2 = messages.get(6);
+ String line3 = messages.get(7);
+ assertEquals(XmlUtility.asString(browserResult.asXmlDocument()), line1 + "\r\n" + line2 + "\r\n" + line3);
+
+ assertEquals("endXml", messages.get(8));
+ }
+
+ public void testStopRunner() throws InterruptedException {
+ assertFalse(mockRunner.disposeCalled);
+ clientSideConnection.sendMessage("foo");
+ assertFalse(mockRunner.disposeCalled);
+ clientSideConnection.sendMessage("stop");
+ while (!mockRunner.disposeCalled)
+ Thread.sleep(10);
+ }
+
+ private void waitForServerConnectionToStartRunning() throws InterruptedException {
+ while (!clientSideConnection.isRunning() || !server.isReady())
+ Thread.sleep(10);
+ }
+
+ public void messageReceived(String message) {
+ messages.add(message);
+ }
+
+ public void tearDown() throws Exception {
+ server.testRunFinished();
+ clientSideConnection.shutdown();
+ super.tearDown();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunResultTest.java
new file mode 100644
index 0000000..b9f4016
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/TestRunResultTest.java
@@ -0,0 +1,101 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.ResultType;
+import net.jsunit.model.TestRunResult;
+import net.jsunit.utility.XmlUtility;
+
+import java.net.URL;
+
+public class TestRunResultTest extends TestCase {
+ private TestRunResult testRunResult;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ testRunResult = new TestRunResult(new URL("http://www.example.com"));
+ }
+
+ public void testSuccess() throws Exception {
+ testRunResult.addBrowserResult(successResult());
+ testRunResult.addBrowserResult(successResult());
+ assertTrue(testRunResult.wasSuccessful());
+ assertEquals(0, testRunResult.getErrorCount());
+ assertEquals(0, testRunResult.getFailureCount());
+ assertFalse(testRunResult.wasUnresponsive());
+ }
+
+ public void testFailuresAndErrors() throws Exception {
+ testRunResult.addBrowserResult(failureResult());
+ assertFalse(testRunResult.wasSuccessful());
+ assertEquals(0, testRunResult.getErrorCount());
+ assertEquals(1, testRunResult.getFailureCount());
+
+ testRunResult.addBrowserResult(failureResult());
+ assertFalse(testRunResult.wasSuccessful());
+ assertEquals(0, testRunResult.getErrorCount());
+ assertEquals(2, testRunResult.getFailureCount());
+
+ testRunResult.addBrowserResult(errorResult());
+ assertFalse(testRunResult.wasSuccessful());
+ assertEquals(1, testRunResult.getErrorCount());
+ assertEquals(2, testRunResult.getFailureCount());
+ }
+
+ public void testAsXml() throws Exception {
+ testRunResult.addBrowserResult(successResult());
+ testRunResult.addBrowserResult(failureResult());
+ testRunResult.addBrowserResult(errorResult());
+ testRunResult.setOsString("my cool os");
+ testRunResult.setIpAddress("127.0.0.1");
+ testRunResult.setHostname("machine.example.com");
+ testRunResult.setURL(new URL("http://www.example.com"));
+ assertEquals(
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ successResult().asXmlFragment() +
+ failureResult().asXmlFragment() +
+ errorResult().asXmlFragment() +
+ "",
+ XmlUtility.asString(testRunResult.asXml())
+ );
+ }
+
+ public void testUnresponsive() throws Exception {
+ testRunResult.setUnresponsive();
+ assertTrue(testRunResult.wasUnresponsive());
+ assertEquals(ResultType.UNRESPONSIVE, testRunResult.getResultType());
+ assertEquals(
+ "",
+ XmlUtility.asString(testRunResult.asXml())
+ );
+ }
+
+ public void testAsXmlWithNoUrl() throws Exception {
+ TestRunResult result = new TestRunResult();
+ assertEquals("", XmlUtility.asString(result.asXml()));
+ }
+
+ private BrowserResult successResult() {
+ BrowserResult browserResult = new BrowserResult();
+ browserResult.setId("foo");
+ return browserResult;
+ }
+
+ private BrowserResult failureResult() {
+ DummyBrowserResult dummyBrowserResult = new DummyBrowserResult(false, 1, 0);
+ dummyBrowserResult.setId("foo");
+ return dummyBrowserResult;
+ }
+
+ private BrowserResult errorResult() {
+ DummyBrowserResult dummyBrowserResult = new DummyBrowserResult(false, 0, 1);
+ dummyBrowserResult.setId("foo");
+ return dummyBrowserResult;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ArgumentsConfigurationSourceTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ArgumentsConfigurationSourceTest.java
new file mode 100644
index 0000000..6554f24
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ArgumentsConfigurationSourceTest.java
@@ -0,0 +1,59 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class ArgumentsConfigurationSourceTest extends TestCase {
+ public ArgumentsConfigurationSourceTest(String name) {
+ super(name);
+ }
+
+ public void testSimple() throws Exception {
+ List args = Arrays.asList(new String[]{
+ "-browserFileNames", "aaa",
+ "-closeBrowsersAfterTestRuns", "bbb",
+ "-logsDirectory", "ccc",
+ "-logStatus", "ddd",
+ "-port", "eee",
+ "-remoteMachineURLs", "fff",
+ "-resourceBase", "ggg",
+ "-timeoutSeconds", "hhh",
+ "-url", "iii",
+ });
+ ArgumentsConfigurationSource source = new ArgumentsConfigurationSource(args);
+ assertEquals("aaa", source.browserFileNames());
+ assertEquals("bbb", source.closeBrowsersAfterTestRuns());
+ assertEquals("ccc", source.logsDirectory());
+ assertEquals("eee", source.port());
+ assertEquals("fff", source.remoteMachineURLs());
+ assertEquals("ggg", source.resourceBase());
+ assertEquals("hhh", source.timeoutSeconds());
+ assertEquals("iii", source.url());
+ }
+
+ public void testIncomplete() {
+ List args = Arrays.asList(new String[]{
+ "-browserFileNames",
+ "-closeBrowsersAfterTestRuns",
+ "-logsDirectory", "ccc",
+ "-logStatus", "ddd",
+ "-port", "eee",
+ "-remoteMachineURLs",
+ "-resourceBase", "ggg",
+ "-timeoutSeconds", "hhh",
+ "-url", "iii",
+ });
+ ArgumentsConfigurationSource source = new ArgumentsConfigurationSource(args);
+ assertEquals("", source.browserFileNames());
+ assertEquals("", source.closeBrowsersAfterTestRuns());
+ assertEquals("ccc", source.logsDirectory());
+ assertEquals("eee", source.port());
+ assertEquals("", source.remoteMachineURLs());
+ assertEquals("ggg", source.resourceBase());
+ assertEquals("hhh", source.timeoutSeconds());
+ assertEquals("iii", source.url());
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/CompositeConfigurationSourceTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/CompositeConfigurationSourceTest.java
new file mode 100644
index 0000000..118e00d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/CompositeConfigurationSourceTest.java
@@ -0,0 +1,38 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+import net.jsunit.StubConfigurationSource;
+
+import java.io.FileNotFoundException;
+
+public class CompositeConfigurationSourceTest extends TestCase {
+
+ public void testSingleSource() throws FileNotFoundException {
+ CompositeConfigurationSource compositeSource = new CompositeConfigurationSource(new Source1());
+ assertEquals("foo", compositeSource.url());
+ }
+
+ public void testPrecedence() {
+ CompositeConfigurationSource compositeSource = new CompositeConfigurationSource(
+ new Source1(),
+ new Source2());
+ assertEquals("foo", compositeSource.url());
+ assertEquals("1234", compositeSource.port());
+ }
+
+ public static class Source1 extends StubConfigurationSource {
+ public String url() {
+ return "foo";
+ }
+ }
+
+ public static class Source2 extends StubConfigurationSource {
+ public String url() {
+ return "bar";
+ }
+
+ public String port() {
+ return "1234";
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationSourceResolutionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationSourceResolutionTest.java
new file mode 100644
index 0000000..21d1f12
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationSourceResolutionTest.java
@@ -0,0 +1,38 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.FileUtility;
+
+import java.io.File;
+
+public class ConfigurationSourceResolutionTest extends TestCase {
+
+ public void testResolveArgumentsConfiguration() {
+ ConfigurationSource source = Configuration.resolveSource(new String[]{"-url", "foo"});
+ assertEquals("foo", source.url());
+ }
+
+ public void testResolveEnvironmentVariablesConfiguration() {
+ System.setProperty(ConfigurationProperty.URL.getName(), "http://localhost:8080/");
+ ConfigurationSource source = Configuration.resolveSource(new String[]{});
+ assertEquals("http://localhost:8080/", source.url());
+ }
+
+ public void testResolvePropertiesConfiguration() {
+ writePropertiesFile(PropertiesFileConfigurationSource.PROPERTIES_FILE_NAME,
+ ConfigurationProperty.BROWSER_FILE_NAMES.getName() + "=aaa");
+ ConfigurationSource source = Configuration.resolveSource(new String[]{});
+ assertEquals("aaa", source.browserFileNames());
+ }
+
+ private void writePropertiesFile(String fileName, String contents) {
+ FileUtility.write(new File(fileName), contents);
+ }
+
+ protected void tearDown() throws Exception {
+ System.getProperties().remove(ConfigurationProperty.URL.getName());
+ FileUtility.delete(new File(PropertiesFileConfigurationSource.PROPERTIES_FILE_NAME));
+ super.tearDown();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationTest.java
new file mode 100644
index 0000000..b2ef4e9
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/ConfigurationTest.java
@@ -0,0 +1,315 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+import net.jsunit.StubConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.utility.SystemUtility;
+import net.jsunit.utility.XmlUtility;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConfigurationTest extends TestCase {
+
+ public void testFull() throws Exception {
+ Configuration configuration = new Configuration(new FullValidForBothConfigurationSource());
+ List expectedBrowsers = new ArrayList();
+ expectedBrowsers.add(new Browser("browser1.exe", 0));
+ expectedBrowsers.add(new Browser("browser2.exe", 1));
+ assertEquals(expectedBrowsers, configuration.getBrowsers());
+ assertEquals(new File("logs" + File.separator + "directory"), configuration.getLogsDirectory());
+ assertEquals(1234, configuration.getPort());
+ assertEquals(new File("resource" + File.separator + "base"), configuration.getResourceBase());
+ assertEquals("http://www.example.com:1234/", configuration.getTestURL().toString());
+ assertTrue(configuration.shouldCloseBrowsersAfterTestRuns());
+ assertEquals(76, configuration.getTimeoutSeconds());
+ List expectedRemoteMachineURLs = new ArrayList();
+ expectedRemoteMachineURLs.add(new URL("http://localhost:8081/jsunit"));
+ expectedRemoteMachineURLs.add(new URL("http://127.0.0.1:8082/jsunit"));
+ assertEquals(expectedRemoteMachineURLs, configuration.getRemoteMachineURLs());
+ assertTrue(configuration.shouldIgnoreUnresponsiveRemoteMachines());
+
+ assertTrue(configuration.isValidFor(ServerType.STANDARD));
+ assertTrue(configuration.isValidFor(ServerType.FARM));
+ }
+
+ public void testMinimal() throws Exception {
+ Configuration configuration = new Configuration(new MinimalValidForBothConfigurationSource());
+ assertEquals(new File("."), configuration.getResourceBase());
+ assertEquals(new File("logs"), configuration.getLogsDirectory());
+ assertTrue(configuration.shouldCloseBrowsersAfterTestRuns());
+ assertEquals(60, configuration.getTimeoutSeconds());
+ assertFalse(configuration.shouldIgnoreUnresponsiveRemoteMachines());
+
+ assertTrue(configuration.isValidFor(ServerType.STANDARD));
+ assertTrue(configuration.isValidFor(ServerType.FARM));
+ }
+
+ public void testBadRemoteMachineURLs() throws Exception {
+ try {
+ new Configuration(new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "invalid url";
+ }
+ });
+ fail();
+ } catch (ConfigurationException e) {
+ }
+ }
+
+ public void testBadURL() throws Exception {
+ try {
+ new Configuration(new StubConfigurationSource() {
+ public String url() {
+ return "invalid url";
+ }
+ });
+ fail();
+ } catch (ConfigurationException e) {
+ }
+ }
+
+ public void testBadPort() throws Exception {
+ try {
+ new Configuration(new StubConfigurationSource() {
+ public String port() {
+ return "invalid number";
+ }
+ });
+ fail();
+ } catch (ConfigurationException e) {
+ }
+ }
+
+ public void testBadTimeoutSeconds() throws Exception {
+ try {
+ new Configuration(new StubConfigurationSource() {
+ public String timeoutSeconds() {
+ return "invalid number";
+ }
+ });
+ fail();
+ } catch (ConfigurationException e) {
+ }
+ }
+
+ public void testValidForStandardInvalidForFarm() throws Exception {
+ Configuration configuration = new Configuration(new ValidForStandardInvalidForFarmConfigurationSource());
+ assertTrue(configuration.isValidFor(ServerType.STANDARD));
+ assertFalse(configuration.isValidFor(ServerType.FARM));
+ List invalidProperties = ServerType.FARM.getPropertiesInvalidFor(configuration);
+ assertEquals(1, invalidProperties.size());
+ assertEquals(ConfigurationProperty.REMOTE_MACHINE_URLS, invalidProperties.get(0));
+ }
+
+ public void testAsXmlForStandardConfiguration() throws Exception {
+ FullValidForBothConfigurationSource source = new FullValidForBothConfigurationSource();
+ Configuration configuration = new Configuration(source);
+ File logsDirectory = new File(source.logsDirectory());
+ File resourceBase = new File(source.resourceBase());
+ String expectedXML = "" +
+ "" + SystemUtility.osString() + "" +
+ "" + SystemUtility.ipAddress() + "" +
+ "" + SystemUtility.hostname() + "" +
+ "" +
+ "browser1.exe" +
+ "browser2.exe" +
+ "" +
+ "true" +
+ "This is the best server ever" +
+ "" + logsDirectory.getAbsolutePath() + "" +
+ "1234" +
+ "" + resourceBase.getAbsolutePath() + "" +
+ "76" +
+ "http://www.example.com:1234/" +
+ "";
+ assertEquals(expectedXML, XmlUtility.asString(configuration.asXml(ServerType.STANDARD)));
+ }
+
+ public void testAsXmlForStandardTemporaryConfiguration() throws Exception {
+ FullValidForBothConfigurationSource source = new FullValidForBothConfigurationSource();
+ Configuration configuration = new Configuration(source);
+ File logsDirectory = new File(source.logsDirectory());
+ File resourceBase = new File(source.resourceBase());
+ String expectedXML = "" +
+ "" + SystemUtility.osString() + "" +
+ "" + SystemUtility.ipAddress() + "" +
+ "" + SystemUtility.hostname() + "" +
+ "" +
+ "browser1.exe" +
+ "browser2.exe" +
+ "" +
+ "true" +
+ "This is the best server ever" +
+ "" + logsDirectory.getAbsolutePath() + "" +
+ "1234" +
+ "" + resourceBase.getAbsolutePath() + "" +
+ "76" +
+ "http://www.example.com:1234/" +
+ "";
+ assertEquals(expectedXML, XmlUtility.asString(configuration.asXml(ServerType.STANDARD_TEMPORARY)));
+ }
+
+ public void testAsXmlForFarmConfiguration() throws Exception {
+ FullValidForBothConfigurationSource source = new FullValidForBothConfigurationSource();
+ Configuration configuration = new Configuration(source);
+ File logsDirectory = new File(source.logsDirectory());
+ File resourceBase = new File(source.resourceBase());
+ assertEquals(
+ "" +
+ "" + SystemUtility.osString() + "" +
+ "" + SystemUtility.ipAddress() + "" +
+ "" + SystemUtility.hostname() + "" +
+ "This is the best server ever" +
+ "true" +
+ "" + logsDirectory.getAbsolutePath() + "" +
+ "1234" +
+ "" +
+ "http://localhost:8081/jsunit" +
+ "http://127.0.0.1:8082/jsunit" +
+ "" +
+ "" + resourceBase.getAbsolutePath() + "" +
+ "http://www.example.com:1234/" +
+ "",
+ XmlUtility.asString(configuration.asXml(ServerType.FARM))
+ );
+ }
+
+ public void testGetBrowserById() throws Exception {
+ Configuration configuration = new Configuration(new FullValidForBothConfigurationSource());
+ assertEquals(new Browser("browser1.exe", 0), configuration.getBrowserById(0));
+ assertEquals(new Browser("browser2.exe", 1), configuration.getBrowserById(1));
+ assertNull(configuration.getBrowserById(900));
+ }
+
+ public void testGetRemoteMachineURLById() throws Exception {
+ Configuration configuration = new Configuration(new FullValidForBothConfigurationSource());
+ assertEquals(
+ "http://localhost:8081/jsunit",
+ configuration.getRemoteMachineURLById(0).toString()
+ );
+ assertEquals(
+ "http://127.0.0.1:8082/jsunit",
+ configuration.getRemoteMachineURLById(1).toString()
+ );
+ }
+
+ public void testAsArgumentsArray() throws Exception {
+ Configuration configuration = new Configuration(new FullValidForBothConfigurationSource());
+ String[] arguments = configuration.asArgumentsArray();
+
+ assertEquals(20, arguments.length);
+ int index = 0;
+
+ assertEquals("-browserFileNames", arguments[index++]);
+ assertEquals("browser1.exe,browser2.exe", arguments[index++]);
+
+ assertEquals("-closeBrowsersAfterTestRuns", arguments[index++]);
+ assertEquals("true", arguments[index++]);
+
+ assertEquals("-description", arguments[index++]);
+ assertEquals("This is the best server ever", arguments[index++]);
+
+ assertEquals("-ignoreUnresponsiveRemoteMachines", arguments[index++]);
+ assertEquals("true", arguments[index++]);
+
+ assertEquals("-logsDirectory", arguments[index++]);
+ assertEquals(new File("logs" + File.separator + "directory").getAbsolutePath(), arguments[index++]);
+
+ assertEquals("-port", arguments[index++]);
+ assertEquals("1234", arguments[index++]);
+
+ assertEquals("-remoteMachineURLs", arguments[index++]);
+ assertEquals("http://localhost:8081/jsunit,http://127.0.0.1:8082/jsunit", arguments[index++]);
+
+ assertEquals("-resourceBase", arguments[index++]);
+ assertEquals(new File("resource/base").getAbsolutePath(), arguments[index++]);
+
+ assertEquals("-timeoutSeconds", arguments[index++]);
+ assertEquals("76", arguments[index++]);
+
+ assertEquals("-url", arguments[index++]);
+ assertEquals("http://www.example.com:1234/", arguments[index]);
+ }
+
+ public void testDuplicateBrowserFileNamesAndRemoteMachineURLs() throws Exception {
+ Configuration configuration = new Configuration(new DuplicatesConfigurationSource());
+ List browsers = configuration.getBrowsers();
+ assertEquals(3, browsers.size());
+ assertEquals(new Browser("browser1.exe", 0), browsers.get(0));
+ assertEquals(new Browser("browser2.exe", 1), browsers.get(1));
+ assertEquals(new Browser("browser3.exe", 2), browsers.get(2));
+
+ List remoteMachineURLs = configuration.getRemoteMachineURLs();
+ assertEquals(4, remoteMachineURLs.size());
+ assertEquals("http://machine1:8080/jsunit", remoteMachineURLs.get(0).toString());
+ assertEquals("http://machine2:9090/jsunit", remoteMachineURLs.get(1).toString());
+ assertEquals("http://machine1:8081/jsunit", remoteMachineURLs.get(2).toString());
+ assertEquals("http://machine3:9090/jsunit", remoteMachineURLs.get(3).toString());
+ }
+
+ static class FullValidForBothConfigurationSource implements ConfigurationSource {
+
+ public String resourceBase() {
+ return "resource" + File.separator + "base";
+ }
+
+ public String port() {
+ return "1234";
+ }
+
+ public String logsDirectory() {
+ return "logs" + File.separator + "directory";
+ }
+
+ public String browserFileNames() {
+ return "browser1.exe,browser2.exe";
+ }
+
+ public String url() {
+ return "http://www.example.com:1234/";
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return "true";
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return "true";
+ }
+
+ public String description() {
+ return "This is the best server ever";
+ }
+
+ public String timeoutSeconds() {
+ return "76";
+ }
+
+ public String remoteMachineURLs() {
+ return "http://localhost:8081,http://127.0.0.1:8082";
+ }
+ }
+
+ static class MinimalValidForBothConfigurationSource extends StubConfigurationSource {
+ public String remoteMachineURLs() {
+ return "http://localhost:8081,http://127.0.0.1:8082";
+ }
+
+ }
+
+ static class ValidForStandardInvalidForFarmConfigurationSource extends StubConfigurationSource {
+ }
+
+ static class DuplicatesConfigurationSource extends StubConfigurationSource {
+ public String browserFileNames() {
+ return "browser1.exe,browser2.exe,browser1.exe,browser1.exe,browser3.exe";
+ }
+
+ public String remoteMachineURLs() {
+ return "http://machine1:8080,http://machine2:9090/jsunit,http://machine1:8081,http://machine1:8080,http://machine1:8080/jsunit,http://machine3:9090";
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.java
new file mode 100644
index 0000000..5a416ea
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/EnvironmentVariablesConfigurationSourceTest.java
@@ -0,0 +1,38 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+
+public class EnvironmentVariablesConfigurationSourceTest extends TestCase {
+ private EnvironmentVariablesConfigurationSource source;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ source = new EnvironmentVariablesConfigurationSource();
+ }
+
+ public void testSimple() {
+ System.setProperty(ConfigurationProperty.BROWSER_FILE_NAMES.getName(), "aaa");
+ System.setProperty(ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS.getName(), "bbb");
+ System.setProperty(ConfigurationProperty.LOGS_DIRECTORY.getName(), "ddd");
+ System.setProperty(ConfigurationProperty.PORT.getName(), "eee");
+ System.setProperty(ConfigurationProperty.REMOTE_MACHINE_URLS.getName(), "fff");
+ System.setProperty(ConfigurationProperty.RESOURCE_BASE.getName(), "ggg");
+ System.setProperty(ConfigurationProperty.TIMEOUT_SECONDS.getName(), "hhh");
+ System.setProperty(ConfigurationProperty.URL.getName(), "iii");
+ assertEquals("aaa", source.browserFileNames());
+ assertEquals("bbb", source.closeBrowsersAfterTestRuns());
+ assertEquals("ddd", source.logsDirectory());
+ assertEquals("eee", source.port());
+ assertEquals("fff", source.remoteMachineURLs());
+ assertEquals("ggg", source.resourceBase());
+ assertEquals("hhh", source.timeoutSeconds());
+ assertEquals("iii", source.url());
+ }
+
+ public void tearDown() throws Exception {
+ for (ConfigurationProperty property : ConfigurationProperty.values())
+ System.getProperties().remove(property.getName());
+ super.tearDown();
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/PropertiesConfigurationSourceTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/PropertiesConfigurationSourceTest.java
new file mode 100644
index 0000000..ec6deaa
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/configuration/PropertiesConfigurationSourceTest.java
@@ -0,0 +1,50 @@
+package net.jsunit.configuration;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.FileUtility;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+public class PropertiesConfigurationSourceTest extends TestCase {
+
+ public void testNoFile() throws Exception {
+ try {
+ new PropertiesFileConfigurationSource("nosuch.file");
+ fail("Should have thrown a RuntimeException because no properties file exists");
+ } catch (FileNotFoundException e) {
+ }
+ }
+
+ public void testSimple() throws Exception {
+ writePropertiesFile("temp.file");
+ PropertiesFileConfigurationSource configuration = new PropertiesFileConfigurationSource("temp.file");
+ assertEquals("aaa", configuration.browserFileNames());
+ assertEquals("bbb", configuration.closeBrowsersAfterTestRuns());
+ assertEquals("ccc", configuration.logsDirectory());
+ assertEquals("eee", configuration.port());
+ assertEquals("fff", configuration.remoteMachineURLs());
+ assertEquals("ggg", configuration.resourceBase());
+ assertEquals("hhh", configuration.timeoutSeconds());
+ assertEquals("iii", configuration.url());
+ }
+
+ public void tearDown() throws Exception {
+ FileUtility.delete(new File("temp.file"));
+ super.tearDown();
+ }
+
+ private void writePropertiesFile(String fileName) {
+ String contents =
+ ConfigurationProperty.BROWSER_FILE_NAMES.getName() + "=aaa\n" +
+ ConfigurationProperty.CLOSE_BROWSERS_AFTER_TEST_RUNS.getName() + "=bbb\n" +
+ ConfigurationProperty.LOGS_DIRECTORY.getName() + "=ccc\n" +
+ ConfigurationProperty.PORT.getName() + "=eee\n" +
+ ConfigurationProperty.REMOTE_MACHINE_URLS.getName() + "=fff\n" +
+ ConfigurationProperty.RESOURCE_BASE.getName() + "=ggg\n" +
+ ConfigurationProperty.TIMEOUT_SECONDS.getName() + "=hhh\n" +
+ ConfigurationProperty.URL.getName() + "=iii\n";
+ FileUtility.write(new File(fileName), contents);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserResultTest.java
new file mode 100644
index 0000000..0011be0
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserResultTest.java
@@ -0,0 +1,158 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.FileUtility;
+
+import java.io.File;
+import java.util.List;
+
+public class BrowserResultTest extends TestCase {
+ private BrowserResult result;
+
+ private String expectedXmlFragment =
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "Test Error Message" +
+ "" +
+ "" +
+ "Test Failure Message" +
+ "" +
+ "" +
+ "";
+
+ private BrowserSource browserSource = new DummyBrowserSource("c:\\Program Files\\Internet Explorer\\iexplore.exe", 7);
+
+ public void setUp() throws Exception {
+ super.setUp();
+ result = createBrowserResult();
+ result.setTestCaseStrings(new String[]{
+ "page1.html:testFoo|1.3|S||",
+ "page1.html:testFoo|1.3|E|Test Error Message|",
+ "page2.html:testFoo|1.3|F|Test Failure Message|"}
+ );
+ }
+
+ public void testId() {
+ assertNotNull(result.getId());
+ result = new BrowserResult();
+ result.setId("foo");
+ assertEquals("foo", result.getId());
+ }
+
+ public void testFields() {
+ assertFields(result);
+ }
+
+ public void testXml() {
+ assertEquals(expectedXmlFragment, result.asXmlFragment());
+ }
+
+ public void testResultType() {
+ assertFalse(result.wasSuccessful());
+ assertEquals(ResultType.ERROR, result.getResultType());
+ }
+
+ public void testDisplayString() {
+ assertEquals(ResultType.ERROR.getDisplayString(), result.getDisplayString());
+ }
+
+ public void testBuildFromXmlFile() {
+ File file = null;
+ try {
+ FileUtility.write(new File("resultXml.xml"), expectedXmlFragment);
+ file = new File("resultXml.xml");
+ BrowserResult reconstitutedResult = new BrowserResultBuilder(browserSource).build(file);
+ assertEquals(BrowserResult.class, reconstitutedResult.getClass());
+ assertFields(reconstitutedResult);
+ } finally {
+ if (file != null)
+ file.delete();
+ }
+ }
+
+ public void testBuildFromXmlDocument() {
+ BrowserResult reconstitutedResult = new BrowserResultBuilder(browserSource).build(result.asXmlDocument());
+ assertFields(reconstitutedResult);
+ }
+
+ public void testFailure() {
+ BrowserResult result = createBrowserResult();
+ result.setTestCaseStrings(new String[]{
+ "page.html:testFoo|1.3|S||",
+ "page.html:testBar|1.3|F|Test Failure Message|"
+ });
+ assertFalse(result.wasSuccessful());
+ assertEquals(ResultType.FAILURE, result.getResultType());
+ assertEquals("The test run had 0 error(s) and 1 failure(s).", result.displayString());
+ }
+
+ public void testSuccess() {
+ BrowserResult result = createBrowserResult();
+ result.setTestCaseStrings(new String[]{
+ "page.html:testFoo|1.3|S||",
+ "page.html:testBar|1.3|S||"
+ });
+ assertTrue(result.wasSuccessful());
+ assertEquals(ResultType.SUCCESS, result.getResultType());
+ }
+
+ public void testGetTestPageResults() {
+ List testPageResults = result.getTestPageResults();
+ assertEquals(2, testPageResults.size());
+ TestPageResult result1 = testPageResults.get(0);
+ assertEquals("page1.html", result1.getTestPageName());
+ assertEquals(2, result1.getTestCaseResults().size());
+ TestPageResult result2 = testPageResults.get(1);
+ assertEquals("page2.html", result2.getTestPageName());
+ assertEquals(1, result2.getTestCaseResults().size());
+ }
+
+ public void testCompleted() {
+ assertTrue(result.completedTestRun());
+ assertFalse(result.timedOut());
+ assertFalse(result.failedToLaunch());
+ assertFalse(result.externallyShutDown());
+ }
+
+ public void testIsForBrowser() throws Exception {
+ assertFalse(result.isForBrowser(new Browser("mybrowser.exe", 9)));
+ assertFalse(result.isForBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 9)));
+ assertFalse(result.isForBrowser(new Browser("mybrowser.exe", 7)));
+ assertTrue(result.isForBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 7)));
+ }
+
+ private BrowserResult createBrowserResult() {
+ BrowserResult browserResult = new BrowserResult();
+ browserResult.setBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 7));
+ browserResult.setJsUnitVersion("2.5");
+ browserResult.setId("An ID");
+ browserResult.setUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
+ browserResult.setRemoteAddress("Dummy Remote Address");
+ browserResult.setBaseURL("http://www.example.com/");
+ browserResult.setTime(4.3);
+ return browserResult;
+ }
+
+ private void assertFields(BrowserResult aResult) {
+ assertEquals("2.5", aResult.getJsUnitVersion());
+ assertEquals("An ID", aResult.getId());
+ assertEquals("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", aResult.getUserAgent());
+ assertEquals("Dummy Remote Address", aResult.getRemoteAddress());
+ assertEquals(4.3d, aResult.getTime(), 0.001d);
+ assertEquals(3, aResult.getTestCaseResults().size());
+ for (TestCaseResult testCaseResult : aResult.getTestCaseResults()) {
+ assertNotNull(testCaseResult);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserTest.java
new file mode 100644
index 0000000..d793a08
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/BrowserTest.java
@@ -0,0 +1,29 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+
+public class BrowserTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ Browser browser = new Browser("c:\\program files\\internet explorer\\iexplore.exe", 4);
+ assertEquals("c:\\program files\\internet explorer\\iexplore.exe", browser.getFileName());
+ assertEquals(4, browser.getId());
+ assertTrue(browser.hasId(4));
+ assertFalse(browser.hasId(2));
+ }
+
+ public void testKillCommand() throws Exception {
+ Browser browser = new Browser("mybrowser.exe", 0);
+ assertEquals("mybrowser.exe", browser.getFileName());
+ assertNull(browser.getKillCommand());
+
+ browser = new Browser("mybrowser.exe;", 0);
+ assertEquals("mybrowser.exe", browser.getFileName());
+ assertNull(browser.getKillCommand());
+
+ browser = new Browser("mybrowser.exe;kill-mybrowser.bat", 0);
+ assertEquals("mybrowser.exe", browser.getFileName());
+ assertEquals("kill-mybrowser.bat", browser.getKillCommand());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DistributedTestRunResultBuilderTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DistributedTestRunResultBuilderTest.java
new file mode 100644
index 0000000..7146b35
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DistributedTestRunResultBuilderTest.java
@@ -0,0 +1,43 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+import net.jsunit.DummyBrowserResult;
+import net.jsunit.utility.XmlUtility;
+
+public class DistributedTestRunResultBuilderTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ DistributedTestRunResultBuilder builder = new DistributedTestRunResultBuilder(new DummyBrowserSource("mybrowser.exe", 0));
+ DistributedTestRunResult result = builder.build(XmlUtility.asXmlDocument(distributedTestRunResultString()));
+ assertEquals(2, result.getTestRunResults().size());
+ }
+
+ private String distributedTestRunResultString() {
+ return "" +
+ testRunResultString() +
+ testRunResultString() +
+ "";
+ }
+
+ private String testRunResultString() {
+ return
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ successResult().asXmlFragment() +
+ errorResult().asXmlFragment() +
+ "";
+ }
+
+ private BrowserResult successResult() {
+ return new DummyBrowserResult(true, 0, 0);
+ }
+
+ private BrowserResult errorResult() {
+ return new DummyBrowserResult(false, 1, 2);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DummyBrowserSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DummyBrowserSource.java
new file mode 100644
index 0000000..3258466
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/DummyBrowserSource.java
@@ -0,0 +1,16 @@
+package net.jsunit.model;
+
+public class DummyBrowserSource implements BrowserSource {
+
+ private String fileName;
+ private int id;
+
+ public DummyBrowserSource(String fileName, int id) {
+ this.fileName = fileName;
+ this.id = id;
+ }
+
+ public Browser getBrowserById(int requestedId) {
+ return requestedId == id ? new Browser(fileName, id) : null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/ExternallyShutDownBrowserResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/ExternallyShutDownBrowserResultTest.java
new file mode 100644
index 0000000..7e262bf
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/ExternallyShutDownBrowserResultTest.java
@@ -0,0 +1,52 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+
+public class ExternallyShutDownBrowserResultTest extends TestCase {
+
+ private String xml =
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "";
+
+ private BrowserResult result;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ result = new BrowserResult();
+ result.setExternallyShutDown();
+ result.setBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 17));
+ }
+
+ public void testSimple() {
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", result.getBrowser().getFileName());
+ assertEquals(0d, result.getTime());
+ assertEquals(ResultType.EXTERNALLY_SHUT_DOWN.getDisplayString(), result.getDisplayString());
+ assertEquals(0, result.getTestCount());
+ assertEquals(ResultType.EXTERNALLY_SHUT_DOWN, result.getResultType());
+ assertEquals(0, result.getTestPageResults().size());
+ }
+
+ public void testCompleted() {
+ assertFalse(result.completedTestRun());
+ assertFalse(result.timedOut());
+ assertFalse(result.failedToLaunch());
+ assertTrue(result.externallyShutDown());
+ }
+
+ public void testXml() {
+ assertEquals(xml, result.asXmlFragment());
+ }
+
+ public void testReconstituteFromXml() {
+ BrowserResultBuilder builder = new BrowserResultBuilder(new DummyBrowserSource("c:\\Program Files\\Internet Explorer\\iexplore.exe", 17));
+ BrowserResult reconstitutedResult = builder.build(xml);
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", reconstitutedResult.getBrowser().getFileName());
+ assertTrue(reconstitutedResult.externallyShutDown());
+ assertEquals(ResultType.EXTERNALLY_SHUT_DOWN, reconstitutedResult.getResultType());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/FailedToLaunchBrowserResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/FailedToLaunchBrowserResultTest.java
new file mode 100644
index 0000000..9961040
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/FailedToLaunchBrowserResultTest.java
@@ -0,0 +1,63 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.StringUtility;
+
+import java.io.FileNotFoundException;
+
+public class FailedToLaunchBrowserResultTest extends TestCase {
+
+ private Throwable exception = new FileNotFoundException();
+ private String xml =
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "";
+
+ private BrowserResult result;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ result = new BrowserResult();
+ result.setFailedToLaunch();
+ result.setBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 3));
+ result.setServerSideException(exception);
+ }
+
+ public void testSimple() {
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", result.getBrowser().getFileName());
+ assertEquals(0d, result.getTime());
+ assertEquals(ResultType.FAILED_TO_LAUNCH.getDisplayString(), result.getDisplayString());
+ assertEquals(0, result.getTestCount());
+ assertEquals(ResultType.FAILED_TO_LAUNCH, result.getResultType());
+ assertEquals(0, result.getTestPageResults().size());
+ assertEquals(StringUtility.stackTraceAsString(exception), result.getServerSideExceptionStackTrace());
+ }
+
+ public void testCompleted() {
+ assertFalse(result.completedTestRun());
+ assertFalse(result.timedOut());
+ assertFalse(result.externallyShutDown());
+ assertTrue(result.failedToLaunch());
+ }
+
+ public void testXml() {
+ assertEquals(xml, result.asXmlFragment());
+ }
+
+ public void testReconstituteFromXml() {
+ BrowserResultBuilder builder = new BrowserResultBuilder(new DummyBrowserSource("c:\\Program Files\\Internet Explorer\\iexplore.exe", 3));
+ BrowserResult reconstitutedResult = builder.build(xml);
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", reconstitutedResult.getBrowser().getFileName());
+ assertTrue(reconstitutedResult.failedToLaunch());
+ assertEquals(ResultType.FAILED_TO_LAUNCH, reconstitutedResult.getResultType());
+ //TODO: somehow they're not quite equal
+ //assertEquals(Utility.stackTraceAsString(exception), reconstitutedResult.getServerSideExceptionStackTrace());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestCaseResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestCaseResultTest.java
new file mode 100644
index 0000000..3893698
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestCaseResultTest.java
@@ -0,0 +1,56 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+
+public class TestCaseResultTest extends TestCase {
+ public TestCaseResultTest(String name) {
+ super(name);
+ }
+
+ public void testBuildSuccessfulResultFromString() {
+ TestCaseResult result = TestCaseResult.fromString("file:///dummy%20path/dummyPage.html:testFoo|1.3|S||");
+ assertEquals("file:///dummy path/dummyPage.html", result.getTestPageName());
+ assertEquals("testFoo", result.getName());
+ assertEquals("file:///dummy path/dummyPage.html:testFoo", result.getFullyQualifiedName());
+ assertEquals(1.3d, result.getTime(), 0.1d);
+ assertFalse(result.hadError());
+ assertFalse(result.hadFailure());
+ assertTrue(result.wasSuccessful());
+ assertNull(result.getError());
+ assertNull(result.getFailure());
+ assertEquals(ResultType.SUCCESS, result.getResultType());
+ assertEquals("", result.getXmlFragment());
+ }
+
+ public void testProblemSummary() {
+ TestCaseResult result = TestCaseResult.fromString("file:///dummy/path/dummyPage.html:testFoo|1.3|E|Test Error Message|");
+ assertEquals("file:///dummy/path/dummyPage.html:testFoo had an error:\nTest Error Message", result.getProblemSummary());
+ }
+
+ public void testBuildErrorResultFromString() {
+ TestCaseResult result = TestCaseResult.fromString("file:///dummy/path/dummyPage.html:testFoo|1.3|E|Test Error Message|");
+ assertEquals("file:///dummy/path/dummyPage.html:testFoo", result.getFullyQualifiedName());
+ assertEquals(1.3d, result.getTime());
+ assertTrue(result.hadError());
+ assertFalse(result.hadFailure());
+ assertFalse(result.wasSuccessful());
+ assertEquals("Test Error Message", result.getError());
+ assertNull(result.getFailure());
+ assertEquals(ResultType.ERROR, result.getResultType());
+ assertEquals("Test Error Message", result.getXmlFragment());
+ }
+
+ public void testBuildFailureResultFromString() {
+ TestCaseResult result = TestCaseResult.fromString("file:///dummy/path/dummyPage.html:testFoo|1.3|F|Test Failure Message|");
+ assertEquals("file:///dummy/path/dummyPage.html:testFoo", result.getFullyQualifiedName());
+ assertEquals(1.3d, result.getTime());
+ assertFalse(result.hadError());
+ assertTrue(result.hadFailure());
+ assertFalse(result.wasSuccessful());
+ assertNull(result.getError());
+ assertEquals("Test Failure Message", result.getFailure());
+ assertEquals(ResultType.FAILURE, result.getResultType());
+ assertEquals("Test Failure Message", result.getXmlFragment());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestPageResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestPageResultTest.java
new file mode 100644
index 0000000..0d2c14b
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestPageResultTest.java
@@ -0,0 +1,38 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TestPageResultTest extends TestCase {
+
+ public void testSimple() {
+ TestPageResult result = new TestPageResult("mypage.html");
+ assertEquals("mypage.html", result.getTestPageName());
+ TestCaseResult testCase1 = new TestCaseResult();
+ TestCaseResult testCase2 = new TestCaseResult();
+ result.addTestCaseResult(testCase1);
+ result.addTestCaseResult(testCase2);
+ List expected = new ArrayList();
+ expected.add(testCase1);
+ expected.add(testCase2);
+ assertEquals(expected, result.getTestCaseResults());
+ }
+
+ public void testResultType() {
+ TestPageResult result = new TestPageResult("mypage.html");
+ TestCaseResult success = new TestCaseResult();
+ result.addTestCaseResult(success);
+ assertEquals(ResultType.SUCCESS, result.getResultType());
+ TestCaseResult failure = new TestCaseResult();
+ failure.setFailure("not right");
+ result.addTestCaseResult(failure);
+ assertEquals(ResultType.FAILURE, result.getResultType());
+ TestCaseResult error = new TestCaseResult();
+ error.setError("disaster");
+ result.addTestCaseResult(error);
+ assertEquals(ResultType.ERROR, result.getResultType());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestRunResultBuilderTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestRunResultBuilderTest.java
new file mode 100644
index 0000000..6700006
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TestRunResultBuilderTest.java
@@ -0,0 +1,37 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+import net.jsunit.DummyBrowserResult;
+import net.jsunit.utility.XmlUtility;
+
+public class TestRunResultBuilderTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ TestRunResultBuilder builder = new TestRunResultBuilder(new DummyBrowserSource("mybrowser.exe", 1));
+ TestRunResult result = builder.build(XmlUtility.asXmlDocument(fullValidResult()));
+ assertEquals(ResultType.SUCCESS, result.getResultType());
+ assertEquals(2, result.getChildren().size());
+ assertEquals("my cool os", result.getOsString());
+ assertEquals("127.0.0.1", result.getIpAddress());
+ assertEquals("machine.example.com", result.getHostname());
+ }
+
+ private String fullValidResult() {
+ return
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ successResult().asXmlFragment() +
+ successResult().asXmlFragment() +
+ "";
+ }
+
+ private BrowserResult successResult() {
+ return new DummyBrowserResult(true, 0, 0);
+ }
+
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TimedOutBrowerResultTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TimedOutBrowerResultTest.java
new file mode 100644
index 0000000..4b88f76
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/model/TimedOutBrowerResultTest.java
@@ -0,0 +1,49 @@
+package net.jsunit.model;
+
+import junit.framework.TestCase;
+
+public class TimedOutBrowerResultTest extends TestCase {
+
+ private String xml =
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "";
+
+ private BrowserResult browserResult;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ browserResult = new BrowserResult();
+ browserResult.setTimedOut();
+ browserResult.setBrowser(new Browser("c:\\Program Files\\Internet Explorer\\iexplore.exe", 3));
+ }
+
+ public void testSimple() {
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", browserResult.getBrowser().getFileName());
+ assertEquals(ResultType.TIMED_OUT, browserResult.getResultType());
+ }
+
+ public void testCompleted() {
+ assertFalse(browserResult.completedTestRun());
+ assertTrue(browserResult.timedOut());
+ assertFalse(browserResult.failedToLaunch());
+ assertFalse(browserResult.externallyShutDown());
+ }
+
+ public void testAsXml() {
+ assertEquals(xml, browserResult.asXmlFragment());
+ }
+
+ public void testReconstituteFromXml() {
+ BrowserResultBuilder builder = new BrowserResultBuilder(new DummyBrowserSource("c:\\Program Files\\Internet Explorer\\iexplore.exe", 3));
+ BrowserResult reconstitutedResult = builder.build(xml);
+ assertEquals("c:\\Program Files\\Internet Explorer\\iexplore.exe", reconstitutedResult.getBrowser().getFileName());
+ assertTrue(reconstitutedResult.timedOut());
+ assertEquals(ResultType.TIMED_OUT, reconstitutedResult.getResultType());
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/BlowingUpVersionGrabber.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/BlowingUpVersionGrabber.java
new file mode 100644
index 0000000..1d28dc5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/BlowingUpVersionGrabber.java
@@ -0,0 +1,7 @@
+package net.jsunit.version;
+
+public class BlowingUpVersionGrabber implements VersionGrabber {
+ public double grabVersion() throws Exception {
+ throw new Exception();
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/MockVersionGrabber.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/MockVersionGrabber.java
new file mode 100644
index 0000000..c6cbbbc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/MockVersionGrabber.java
@@ -0,0 +1,14 @@
+package net.jsunit.version;
+
+public class MockVersionGrabber implements VersionGrabber {
+
+ public double version;
+
+ public MockVersionGrabber(double version) {
+ this.version = version;
+ }
+
+ public double grabVersion() {
+ return version;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/VersionCheckerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/VersionCheckerTest.java
new file mode 100644
index 0000000..aa74261
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_core/net/jsunit/version/VersionCheckerTest.java
@@ -0,0 +1,22 @@
+package net.jsunit.version;
+
+import junit.framework.TestCase;
+
+public class VersionCheckerTest extends TestCase {
+
+ public void testOutOfDate() throws Exception {
+ VersionChecker checker = new VersionChecker(1.1, new MockVersionGrabber(1.2));
+ assertFalse(checker.isUpToDate());
+ }
+
+ public void testUpToDate() throws Exception {
+ VersionChecker checker = new VersionChecker(1.1, new MockVersionGrabber(1.1));
+ assertTrue(checker.isUpToDate());
+ }
+
+ public void testBlowsUp() throws Exception {
+ VersionChecker checker = new VersionChecker(1.1, new BlowingUpVersionGrabber());
+ assertTrue(checker.isUpToDate());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/AcceptorFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/AcceptorFunctionalTest.java
new file mode 100644
index 0000000..21061bb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/AcceptorFunctionalTest.java
@@ -0,0 +1,45 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultWriter;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+public class AcceptorFunctionalTest extends FunctionalTestCase {
+
+ public void testSubmission() throws Exception {
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser(Browser.DEFAULT_SYSTEM_BROWSER, 0)));
+
+ StringBuffer buffer = new StringBuffer();
+ addParameter(buffer, BrowserResultWriter.ID, "ID_foo", true);
+ addParameter(buffer, BrowserResultWriter.USER_AGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", false);
+ addParameter(buffer, BrowserResultWriter.TIME, "4.3", false);
+ addParameter(buffer, BrowserResultWriter.JSUNIT_VERSION, "12.5", false);
+ addParameter(buffer, BrowserResultWriter.TEST_CASES, "/dummy/path/dummyPage.html:testFoo|1.3|S||", false);
+
+ webTester.beginAt("acceptor" + buffer.toString());
+
+ BrowserResult result = new BrowserResult();
+ result.setId("ID_foo");
+ result.setBrowser(new Browser(Browser.DEFAULT_SYSTEM_BROWSER, 0));
+ result.setUserAgent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
+ result.setTime(4.3);
+ result.setJsUnitVersion("12.5");
+ result.setTestCaseStrings(new String[]{"/dummy/path/dummyPage.html:testFoo|1.3|S||"});
+ result.setRemoteAddress("127.0.0.1");
+
+ assertEquals(XmlUtility.asString(new Document(result.asXml())), webTester.getDialog().getResponseText());
+ }
+
+ private void addParameter(StringBuffer buffer, String key, String value, boolean isFirst) {
+ if (isFirst)
+ buffer.append("?");
+ else
+ buffer.append("&");
+ buffer.append(key);
+ buffer.append("=");
+ buffer.append(value);
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BlowingUpRemoteServerHitter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BlowingUpRemoteServerHitter.java
new file mode 100644
index 0000000..78aaab4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BlowingUpRemoteServerHitter.java
@@ -0,0 +1,16 @@
+/**
+ *
+ */
+package net.jsunit;
+
+import org.jdom.Document;
+
+import java.io.IOException;
+import java.net.URL;
+
+public class BlowingUpRemoteServerHitter implements RemoteServerHitter {
+
+ public Document hitURL(URL url) throws IOException {
+ throw new IOException();
+ }
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BrowserResultLogWriterTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BrowserResultLogWriterTest.java
new file mode 100644
index 0000000..abba2a8
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/BrowserResultLogWriterTest.java
@@ -0,0 +1,12 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.logging.StubBrowserResultRepository;
+
+public class BrowserResultLogWriterTest extends TestCase {
+
+ public void testSimple() {
+ assertTrue(new BrowserResultLogWriter(new StubBrowserResultRepository()).isReady());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ConfigurationFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ConfigurationFunctionalTest.java
new file mode 100644
index 0000000..63ca439
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ConfigurationFunctionalTest.java
@@ -0,0 +1,10 @@
+package net.jsunit;
+
+public class ConfigurationFunctionalTest extends FunctionalTestCase {
+
+ public void testSimple() throws Exception {
+ webTester.beginAt("config");
+ assertConfigXml();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DisplayerFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DisplayerFunctionalTest.java
new file mode 100644
index 0000000..4911775
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DisplayerFunctionalTest.java
@@ -0,0 +1,47 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+import org.jdom.Element;
+
+public class DisplayerFunctionalTest extends FunctionalTestCase {
+
+ public void testNoId() throws Exception {
+ webTester.beginAt("displayer");
+ Document responseDocument = responseXmlDocument();
+
+ Element rootElement = responseDocument.getRootElement();
+ assertErrorResponse(rootElement, "A Test Result ID and a browser ID must both be given");
+ }
+
+ public void testInvalidId() throws Exception {
+ String id = String.valueOf(System.currentTimeMillis());
+ webTester.beginAt("displayer?id=" + id + "&browserId=0");
+ Document responseDocument = responseXmlDocument();
+
+ Element rootElement = responseDocument.getRootElement();
+ assertErrorResponse(rootElement, "No Test Result has been submitted with ID '" + id + "' for browser ID '0'");
+ }
+
+ public void testInvalidBrowserId() throws Exception {
+ String id = String.valueOf(System.currentTimeMillis());
+ webTester.beginAt("displayer?id=" + id + "&browserId=1000");
+ Document responseDocument = responseXmlDocument();
+
+ Element rootElement = responseDocument.getRootElement();
+ assertErrorResponse(rootElement, "Invalid Browser ID '1000'");
+ }
+
+ public void testValid() throws Exception {
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser(Browser.DEFAULT_SYSTEM_BROWSER, 0)));
+ BrowserResult browserResult = new BrowserResult();
+ String id = String.valueOf(System.currentTimeMillis());
+ browserResult.setId(id);
+ server.accept(browserResult);
+ webTester.beginAt("displayer?id=" + id + "&browserId=0");
+ assertEquals(XmlUtility.asString(new Document(browserResult.asXml())), webTester.getDialog().getResponseText());
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestRunManagerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestRunManagerTest.java
new file mode 100644
index 0000000..863ebc8
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestRunManagerTest.java
@@ -0,0 +1,175 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.*;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.List;
+
+public class DistributedTestRunManagerTest extends TestCase {
+
+ private Configuration configuration;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ configuration = new Configuration(new DummyConfigurationSource());
+ }
+
+ public void testSimple() throws MalformedURLException, UnsupportedEncodingException {
+ String encodedURL = URLEncoder.encode(DummyConfigurationSource.DUMMY_URL, "UTF-8");
+ String url1 = DummyConfigurationSource.REMOTE_URL_1 + "/runner?url=" + encodedURL;
+ String url2 = DummyConfigurationSource.REMOTE_URL_2 + "/runner?url=" + encodedURL;
+ MockRemoteServerHitter hitter = createMockHitter(url1, url2);
+ DistributedTestRunManager manager = new DistributedTestRunManager(hitter, configuration, null);
+ manager.runTests();
+ assertEquals(2, hitter.urlsPassed.size());
+ assertTrue(hitter.urlsPassed.contains(url1));
+ assertTrue(hitter.urlsPassed.contains(url2));
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+
+ DistributedTestRunResult expectedResult = new DistributedTestRunResult();
+ expectedResult.addTestRunResult(createResult1());
+ expectedResult.addTestRunResult(createResult2());
+
+ assertEquals(XmlUtility.asString(expectedResult.asXml()), XmlUtility.asString(result.asXml()));
+ }
+
+ public void testRemoteURLBlowsUp() {
+ DistributedTestRunManager manager = new DistributedTestRunManager(new BlowingUpRemoteServerHitter(), configuration, null);
+ assertFalse(configuration.shouldIgnoreUnresponsiveRemoteMachines());
+ manager.runTests();
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+ assertFalse(result.wasSuccessful());
+ List testRunResults = result.getTestRunResults();
+ assertEquals(2, testRunResults.size());
+ assertEquals(ResultType.UNRESPONSIVE, testRunResults.get(0).getResultType());
+ assertEquals(DummyConfigurationSource.REMOTE_URL_1, testRunResults.get(0).getUrl().toString());
+ assertEquals(DummyConfigurationSource.REMOTE_URL_2, testRunResults.get(1).getUrl().toString());
+ assertEquals(ResultType.UNRESPONSIVE, testRunResults.get(1).getResultType());
+ }
+
+ public void testRemoteURLBlowsUpButIgnored() {
+ configuration = new Configuration(new DummyConfigurationSource() {
+ public String ignoreUnresponsiveRemoteMachines() {
+ return "true";
+ }
+ });
+ assertTrue(configuration.shouldIgnoreUnresponsiveRemoteMachines());
+ DistributedTestRunManager manager = new DistributedTestRunManager(new BlowingUpRemoteServerHitter(), configuration, null);
+ manager.runTests();
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+ assertTrue(result.wasSuccessful());
+ assertEquals(0, result.getTestRunResults().size());
+ }
+
+ public void testOverrideURL() throws Exception {
+ String overrideURL = "http://my.override.com:1234?foo=bar&bar=foo";
+ String encodedOverrideURL = URLEncoder.encode(overrideURL, "UTF-8");
+ String url1 = DummyConfigurationSource.REMOTE_URL_1 + "/runner?url=" + encodedOverrideURL;
+ String url2 = DummyConfigurationSource.REMOTE_URL_2 + "/runner?url=" + encodedOverrideURL;
+ MockRemoteServerHitter hitter = createMockHitter(url1, url2);
+ DistributedTestRunManager manager = new DistributedTestRunManager(hitter, configuration, overrideURL);
+ manager.runTests();
+ assertEquals(2, hitter.urlsPassed.size());
+ assertTrue(hitter.urlsPassed.contains(url1));
+ assertTrue(hitter.urlsPassed.contains(url2));
+ }
+
+ public void testNoURL() throws Exception {
+ configuration = new Configuration(new DummyConfigurationSource() {
+ public String url() {
+ return null;
+ }
+ });
+ String url1 = DummyConfigurationSource.REMOTE_URL_1 + "/runner";
+ String url2 = DummyConfigurationSource.REMOTE_URL_2 + "/runner";
+ MockRemoteServerHitter hitter = createMockHitter(url1, url2);
+
+ DistributedTestRunManager manager = new DistributedTestRunManager(hitter, configuration, null);
+ manager.runTests();
+ assertEquals(2, hitter.urlsPassed.size());
+ assertTrue(hitter.urlsPassed.contains(url1));
+ assertTrue(hitter.urlsPassed.contains(url2));
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+
+ DistributedTestRunResult expectedResult = new DistributedTestRunResult();
+ expectedResult.addTestRunResult(createResult1());
+ expectedResult.addTestRunResult(createResult2());
+
+ assertEquals(XmlUtility.asString(expectedResult.asXml()), XmlUtility.asString(result.asXml()));
+ }
+
+ public void testDistributedResultReturned() throws Exception {
+ String encodedURL = URLEncoder.encode(DummyConfigurationSource.DUMMY_URL, "UTF-8");
+ String url1 = DummyConfigurationSource.REMOTE_URL_1 + "/runner?url=" + encodedURL;
+ String url2 = DummyConfigurationSource.REMOTE_URL_2 + "/runner?url=" + encodedURL;
+ MockRemoteServerHitter hitter = createMockHitterWithDistributedResults(url1, url2);
+ DistributedTestRunManager manager = new DistributedTestRunManager(hitter, configuration, null);
+ manager.runTests();
+ DistributedTestRunResult result = manager.getDistributedTestRunResult();
+ assertEquals(4, result.getTestRunResults().size());
+ }
+
+ private MockRemoteServerHitter createMockHitter(String url1, String url2) throws MalformedURLException {
+ MockRemoteServerHitter hitter = new MockRemoteServerHitter();
+ hitter.urlToDocument.put(url1, new Document(createResult1().asXml()));
+ hitter.urlToDocument.put(url2, new Document(createResult2().asXml()));
+ return hitter;
+ }
+
+ private MockRemoteServerHitter createMockHitterWithDistributedResults(String url1, String url2) throws MalformedURLException {
+ MockRemoteServerHitter hitter = new MockRemoteServerHitter();
+ DistributedTestRunResult distributedResult = new DistributedTestRunResult();
+ distributedResult.addTestRunResult(createResult1());
+ distributedResult.addTestRunResult(createResult2());
+ hitter.urlToDocument.put(url1, new Document(distributedResult.asXml()));
+ hitter.urlToDocument.put(url2, new Document(distributedResult.asXml()));
+ return hitter;
+ }
+
+ private TestRunResult createResult1() throws MalformedURLException {
+ TestRunResult result = new TestRunResult(new URL(DummyConfigurationSource.REMOTE_URL_1));
+ result.setOsString("my os");
+ BrowserResult browserResult1 = new BrowserResult();
+ browserResult1.setId("1");
+ browserResult1.setBrowser(new Browser("mybrowser.exe", 0));
+ browserResult1.setTime(123.45);
+ result.addBrowserResult(browserResult1);
+
+ BrowserResult browserResult2 = new BrowserResult();
+ browserResult2.setId("2");
+ browserResult2.setBrowser(new Browser("mybrowser.exe", 0));
+ browserResult2.setFailedToLaunch();
+ result.addBrowserResult(browserResult2);
+
+ return result;
+ }
+
+ private TestRunResult createResult2() throws MalformedURLException {
+ TestRunResult result = new TestRunResult(new URL(DummyConfigurationSource.REMOTE_URL_2));
+ result.setOsString("my other os");
+ BrowserResult browserResult1 = new BrowserResult();
+ browserResult1.setBrowser(new Browser("mybrowser.exe", 0));
+ browserResult1.setId("a");
+ browserResult1.setTime(123.45);
+ browserResult1.setBaseURL("http://www.example.com");
+ browserResult1.setId("12345");
+ browserResult1.setUserAgent("foo bar");
+ result.addBrowserResult(browserResult1);
+
+ BrowserResult browserResult2 = new BrowserResult();
+ browserResult1.setId("b");
+ browserResult2.setBrowser(new Browser("mybrowser.exe", 0));
+ browserResult2.setTimedOut();
+ result.addBrowserResult(browserResult2);
+
+ return result;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestSuiteBuilderTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestSuiteBuilderTest.java
new file mode 100644
index 0000000..9d47b25
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DistributedTestSuiteBuilderTest.java
@@ -0,0 +1,61 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+import org.jdom.Document;
+
+public class DistributedTestSuiteBuilderTest extends TestCase {
+ private DummyConfigurationSource originalSource;
+ private MockRemoteServerHitter mockHitter;
+ private DistributedTestSuiteBuilder builder;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ originalSource = new DummyConfigurationSource();
+ mockHitter = new MockRemoteServerHitter();
+ originalSource.setNeeds3rdRemoteMachineURL();
+ mockHitter.urlToDocument.put(DummyConfigurationSource.REMOTE_URL_1 + "/config", remoteConfiguration1XmlDocument());
+ mockHitter.urlToDocument.put(DummyConfigurationSource.REMOTE_URL_2 + "/config", remoteConfiguration2XmlDocument());
+ mockHitter.urlToDocument.put(DummyConfigurationSource.REMOTE_URL_3 + "/config", remoteConfiguration3XmlDocument());
+ builder = new DistributedTestSuiteBuilder(originalSource, mockHitter);
+ }
+
+ public void testSimple() throws Exception {
+ TestSuite aSuite = new TestSuite();
+ builder.addTestsTo(aSuite);
+
+ assertEquals(3, builder.getRemoteMachineURLCount());
+ assertEquals(5, builder.getBrowserCount());
+ assertEquals("JsUnit Tests (3 machines, 5 direct browsers)", aSuite.getName());
+ }
+
+ private Document remoteConfiguration1XmlDocument() {
+ Configuration configuration = new Configuration(new StubConfigurationSource() {
+ public String browserFileNames() {
+ return "browser1.exe,browser2.exe";
+ }
+ });
+ return new Document(configuration.asXml(ServerType.STANDARD));
+ }
+
+ private Document remoteConfiguration2XmlDocument() {
+ Configuration configuration = new Configuration(new StubConfigurationSource() {
+ public String browserFileNames() {
+ return "browser3.exe,browser4.exe,browser5";
+ }
+ });
+ return new Document(configuration.asXml(ServerType.STANDARD));
+ }
+
+ private Document remoteConfiguration3XmlDocument() {
+ Configuration configuration = new Configuration(new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "http://machine4:6060/jsunit";
+ }
+ });
+ return new Document(configuration.asXml(ServerType.FARM));
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyConfigurationSource.java
new file mode 100644
index 0000000..13386c9
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyConfigurationSource.java
@@ -0,0 +1,65 @@
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationSource;
+
+public class DummyConfigurationSource implements ConfigurationSource {
+
+ public static final String DUMMY_URL = "http://www.example.com:1234/jsunit/runner?autoRun=true&submitResults=true";
+ public static final String REMOTE_URL_1 = "http://my.machine.com:8080/jsunit";
+ public static final String REMOTE_URL_2 = "http://your.machine.com:9090/jsunit";
+ public static final String REMOTE_URL_3 = "http://his.machine.com:7070/jsunit";
+ public static final String BROWSER_FILE_NAME = "mybrowser.exe";
+ private boolean needs3rdRemoteMachineURL;
+
+ public String resourceBase() {
+ return ".";
+ }
+
+ public String port() {
+ return "1234";
+ }
+
+ public String logsDirectory() {
+ return "";
+ }
+
+ public String browserFileNames() {
+ return BROWSER_FILE_NAME;
+ }
+
+ public String url() {
+ return DUMMY_URL;
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return "";
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return "true";
+ }
+
+ public String description() {
+ return "This is my server!";
+ }
+
+ public String logStatus() {
+ return "false";
+ }
+
+ public String timeoutSeconds() {
+ return "60";
+ }
+
+ public String remoteMachineURLs() {
+ String result = REMOTE_URL_1 + "," + REMOTE_URL_2;
+ if (needs3rdRemoteMachineURL)
+ result += ("," + REMOTE_URL_3);
+ return result;
+ }
+
+ public void setNeeds3rdRemoteMachineURL() {
+ this.needs3rdRemoteMachineURL = true;
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyFarmConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyFarmConfigurationSource.java
new file mode 100644
index 0000000..64ce403
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyFarmConfigurationSource.java
@@ -0,0 +1,51 @@
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationSource;
+
+public class DummyFarmConfigurationSource implements ConfigurationSource {
+
+ public String resourceBase() {
+ return ".";
+ }
+
+ public String port() {
+ return "1234";
+ }
+
+ public String logsDirectory() {
+ return "c:\\logs";
+ }
+
+ public String browserFileNames() {
+ return null;
+ }
+
+ public String url() {
+ return null;
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return null;
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return null;
+ }
+
+ public String description() {
+ return "This is a cool server";
+ }
+
+ public String logStatus() {
+ return "true";
+ }
+
+ public String timeoutSeconds() {
+ return "25";
+ }
+
+ public String remoteMachineURLs() {
+ return "http://www.example.com:8081,http://www.example.com:8082";
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyHttpRequest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyHttpRequest.java
new file mode 100644
index 0000000..7a6b635
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/DummyHttpRequest.java
@@ -0,0 +1,251 @@
+package net.jsunit;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.Principal;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+
+public class DummyHttpRequest implements HttpServletRequest {
+ protected Map parametersToValues;
+ private String ipAddress;
+ private String host;
+
+ public DummyHttpRequest(Map parametersToValues) {
+ this.parametersToValues = parametersToValues;
+ }
+
+ public String getAuthType() {
+ return null;
+ }
+
+ public Cookie[] getCookies() {
+ return null;
+ }
+
+ public long getDateHeader(String name) {
+ return 0;
+ }
+
+ public String getHeader(String name) {
+ return null;
+ }
+
+ public Enumeration getHeaders(String name) {
+ return null;
+ }
+
+ public Enumeration getHeaderNames() {
+ return null;
+ }
+
+ public int getIntHeader(String name) {
+ return 0;
+ }
+
+ public String getMethod() {
+ return null;
+ }
+
+ public String getPathInfo() {
+ return null;
+ }
+
+ public String getPathTranslated() {
+ return null;
+ }
+
+ public String getContextPath() {
+ return null;
+ }
+
+ public String getQueryString() {
+ return null;
+ }
+
+ public String getRemoteUser() {
+ return null;
+ }
+
+ public boolean isUserInRole(String role) {
+ return false;
+ }
+
+ public Principal getUserPrincipal() {
+ return null;
+ }
+
+ public String getRequestedSessionId() {
+ return null;
+ }
+
+ public String getRequestURI() {
+ return null;
+ }
+
+ public StringBuffer getRequestURL() {
+ return null;
+ }
+
+ public String getServletPath() {
+ return null;
+ }
+
+ public HttpSession getSession(boolean create) {
+ return null;
+ }
+
+ public HttpSession getSession() {
+ return null;
+ }
+
+ public boolean isRequestedSessionIdValid() {
+ return false;
+ }
+
+ public boolean isRequestedSessionIdFromCookie() {
+ return false;
+ }
+
+ public boolean isRequestedSessionIdFromURL() {
+ return false;
+ }
+
+ public Object getAttribute(String name) {
+ return null;
+ }
+
+ public Enumeration getAttributeNames() {
+ return null;
+ }
+
+ public String getCharacterEncoding() {
+ return null;
+ }
+
+ public void setCharacterEncoding(String env) throws UnsupportedEncodingException {
+ }
+
+ public int getContentLength() {
+ return 0;
+ }
+
+ public String getContentType() {
+ return null;
+ }
+
+ public ServletInputStream getInputStream() throws IOException {
+ return null;
+ }
+
+ public String getParameter(String name) {
+ Object object = parametersToValues.get(name);
+ if (object instanceof String) return (String) object;
+ if (object instanceof String[]) return ((String[]) object)[0];
+ return null;
+ }
+
+ public Enumeration getParameterNames() {
+ return null;
+ }
+
+ public String[] getParameterValues(String name) {
+ Object object = parametersToValues.get(name);
+ if (object instanceof String) return new String[]{(String) object};
+ if (object instanceof String[]) return (String[]) object;
+ return null;
+ }
+
+ public Map getParameterMap() {
+ return null;
+ }
+
+ public String getProtocol() {
+ return null;
+ }
+
+ public String getScheme() {
+ return null;
+ }
+
+ public String getServerName() {
+ return null;
+ }
+
+ public int getServerPort() {
+ return 0;
+ }
+
+ public BufferedReader getReader() throws IOException {
+ return null;
+ }
+
+ public String getRemoteAddr() {
+ return ipAddress;
+ }
+
+ public String getRemoteHost() {
+ return host;
+ }
+
+ public void setAttribute(String name, Object o) {
+ }
+
+ public void removeAttribute(String name) {
+ }
+
+ public Locale getLocale() {
+ return null;
+ }
+
+ public Enumeration getLocales() {
+ return null;
+ }
+
+ public boolean isSecure() {
+ return false;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String path) {
+ return null;
+ }
+
+ public String getRealPath(String path) {
+ return null;
+ }
+
+ public boolean isRequestedSessionIdFromUrl() {
+ return false;
+ }
+
+ public int getRemotePort() {
+ return 0;
+ }
+
+ public String getLocalName() {
+ return null;
+ }
+
+ public String getLocalAddr() {
+ return null;
+ }
+
+ public int getLocalPort() {
+ return 0;
+ }
+
+ public void setIpAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/EndToEndTestCase.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/EndToEndTestCase.java
new file mode 100644
index 0000000..fcb2206
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/EndToEndTestCase.java
@@ -0,0 +1,14 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+
+public abstract class EndToEndTestCase extends TestCase {
+
+ protected int port;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ port = new TestPortManager().newPort();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ExternallyShutDownStandaloneTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ExternallyShutDownStandaloneTestTest.java
new file mode 100644
index 0000000..b3f52ae
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ExternallyShutDownStandaloneTestTest.java
@@ -0,0 +1,58 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.ResultType;
+
+public class ExternallyShutDownStandaloneTestTest extends TestCase {
+
+ public ExternallyShutDownStandaloneTestTest(String name) {
+ super(name);
+ }
+
+ protected ConfigurationSource configurationSource() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:8080/jsunit/testRunner.html?" +
+ "testPage=http://localhost:8080/jsunit/tests/jsUnitTestSuite.html" +
+ "&autoRun=true&submitresults=true&resultId=foobar";
+ }
+ };
+ }
+
+ public void testBrowsersExternallyShutDown() throws Exception {
+ final StandaloneTest test = new StandaloneTest(configurationSource());
+ new Thread() {
+ public void run() {
+ try {
+ while (test.getServer() == null)
+ Thread.sleep(100);
+ while (test.getServer().getBrowserProcess() == null)
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ fail();
+ }
+ Process process = test.getServer().getBrowserProcess();
+ process.destroy();
+ try {
+ process.waitFor();
+ } catch (InterruptedException e) {
+ fail();
+ }
+ }
+ }.start();
+
+ TestResult result = test.run();
+ assertFalse(result.wasSuccessful());
+ assertEquals(
+ ResultType.EXTERNALLY_SHUT_DOWN,
+ test.getServer().lastResult().getResultType());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.java
new file mode 100644
index 0000000..9605f2a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FailedToLaunchBrowserStandaloneTestTest.java
@@ -0,0 +1,34 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.ResultType;
+
+public class FailedToLaunchBrowserStandaloneTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource configurationSource() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return "no_such_browser.exe";
+ }
+
+ public String url() {
+ return "http://localhost:"+port+"/jsunit/testRunner.html?" +
+ "testPage=http://localhost:"+port+"/jsunit/tests/jsUnitUtilityTests.html" +
+ "&autoRun=true&submitresults=true&resultId=foobar";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ public void testFailToLaunchBrowsers() throws Exception {
+ StandaloneTest test = new StandaloneTest(configurationSource());
+ TestResult result = test.run();
+ assertFalse(result.wasSuccessful());
+ assertEquals(ResultType.FAILED_TO_LAUNCH, test.getServer().lastResult().getResultType());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTest.java
new file mode 100644
index 0000000..57678b8
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTest.java
@@ -0,0 +1,38 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.ResultType;
+import org.jdom.Document;
+
+import java.net.URLEncoder;
+
+public class FarmServerFunctionalTest extends FunctionalTestCase {
+
+ private JsUnitFarmServer farmServer;
+ private int otherPort;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ otherPort = new TestPortManager().newPort();
+ farmServer = new JsUnitFarmServer(new Configuration(new FunctionalTestFarmConfigurationSource(otherPort, port)));
+ farmServer.start();
+ }
+
+ protected int webTesterPort() {
+ return otherPort;
+ }
+
+ public void testHitFarmRunner() throws Exception {
+ String url =
+ "/runner?url=" + URLEncoder.encode("http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html", "UTF-8");
+ webTester.beginAt(url);
+ Document document = responseXmlDocument();
+ assertEquals(ResultType.SUCCESS.name(), document.getRootElement().getAttribute("type").getValue());
+ }
+
+ public void tearDown() throws Exception {
+ farmServer.dispose();
+ super.tearDown();
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTestSuite.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTestSuite.java
new file mode 100644
index 0000000..08dff6f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerFunctionalTestSuite.java
@@ -0,0 +1,14 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class FarmServerFunctionalTestSuite extends TestCase {
+ public static TestSuite suite() {
+ TestSuite result = new TestSuite();
+// result.addTestSuite(FarmServerFunctionalTest.class);
+ result.addTestSuite(FarmServerLandingPageFunctionalTest.class);
+
+ return result;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerLandingPageFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerLandingPageFunctionalTest.java
new file mode 100644
index 0000000..41f7251
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FarmServerLandingPageFunctionalTest.java
@@ -0,0 +1,45 @@
+package net.jsunit;
+
+import com.meterware.httpunit.HttpUnitOptions;
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.sourceforge.jwebunit.WebTester;
+
+public class FarmServerLandingPageFunctionalTest extends TestCase {
+
+ static {
+ HttpUnitOptions.setScriptingEnabled(false);
+ }
+
+ private WebTester webTester;
+ private JsUnitFarmServer server;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ int port = new TestPortManager().newPort();
+ Configuration configuration = new Configuration(new FunctionalTestConfigurationSource(port));
+ server = new JsUnitFarmServer(configuration);
+ server.start();
+ webTester = new WebTester();
+ webTester.getTestContext().setBaseUrl("http://localhost:" + port + "/jsunit");
+ }
+
+ protected void tearDown() throws Exception {
+ server.dispose();
+ super.tearDown();
+ }
+
+ public void testSimple() throws Exception {
+ webTester.beginAt("/");
+ assertOnLandingPage();
+ webTester.assertLinkPresentWithText("runner");
+ webTester.assertLinkNotPresentWithText("displayer");
+ webTester.assertLinkPresentWithText("testRunner.html");
+ webTester.assertLinkPresentWithText("config");
+ }
+
+ private void assertOnLandingPage() {
+ webTester.assertTitleEquals("JsUnit Farm Server");
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestCase.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestCase.java
new file mode 100644
index 0000000..fd48e36
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestCase.java
@@ -0,0 +1,93 @@
+package net.jsunit;
+
+import com.meterware.httpunit.HttpUnitOptions;
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.BrowserResultWriter;
+import net.jsunit.model.ResultType;
+import net.sourceforge.jwebunit.WebTester;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.List;
+
+public abstract class FunctionalTestCase extends TestCase {
+
+ static {
+ HttpUnitOptions.setScriptingEnabled(false);
+ }
+
+ protected WebTester webTester;
+ protected JsUnitStandardServer server;
+ protected int port;
+ protected Configuration configuration;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ port = new TestPortManager().newPort();
+ configuration = new Configuration(new FunctionalTestConfigurationSource(port));
+ server = new JsUnitStandardServer(configuration, new MockBrowserResultRepository(), true);
+ if (shouldMockOutProcessStarter())
+ server.setProcessStarter(new MockProcessStarter());
+ server.start();
+ webTester = new WebTester();
+ webTester.getTestContext().setBaseUrl("http://localhost:" + webTesterPort() + "/jsunit");
+ }
+
+ protected boolean shouldMockOutProcessStarter() {
+ return true;
+ }
+
+ protected int webTesterPort() {
+ return port;
+ }
+
+ public void tearDown() throws Exception {
+ if (server != null)
+ server.dispose();
+ super.tearDown();
+ }
+
+ protected Document responseXmlDocument() throws JDOMException, IOException {
+ String responseXml = webTester.getDialog().getResponseText();
+ SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
+ Reader stringReader = new StringReader(responseXml);
+ return saxBuilder.build(stringReader);
+ }
+
+ protected void assertConfigXml() throws JDOMException, IOException {
+ System.out.println(webTester.getDialog().getResponseText());
+ Document result = responseXmlDocument();
+ Element root = result.getRootElement();
+ assertEquals("configuration", root.getName());
+ }
+
+ protected void assertErrorResponse(Element rootElement, String message) {
+ assertEquals("error", rootElement.getName());
+ assertEquals(message, rootElement.getText());
+ }
+
+ protected void assertSuccessfulRunResult(Document result, ResultType expectedResultType, String expectedUrl, int expectedBrowserResultCount) {
+ Element root = result.getRootElement();
+ assertEquals("testRunResult", root.getName());
+ assertEquals(expectedBrowserResultCount, root.getChildren("browserResult").size());
+ assertEquals(expectedResultType.name(), root.getAttribute("type").getValue());
+ Element urlProperty = urlPropertyElement(root);
+ assertEquals(expectedUrl, urlProperty.getAttribute(BrowserResultWriter.PROPERTY_VALUE).getValue());
+ }
+
+ @SuppressWarnings("unchecked")
+ private Element urlPropertyElement(Element root) {
+ List children = root.getChild("browserResult").getChild(BrowserResultWriter.PROPERTIES).getChildren(BrowserResultWriter.PROPERTY);
+ for (Element child : children) {
+ if (child.getAttribute(BrowserResultWriter.PROPERTY_KEY).getValue().equals(BrowserResultWriter.URL))
+ return child;
+ }
+ return null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestConfigurationSource.java
new file mode 100644
index 0000000..462881d
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestConfigurationSource.java
@@ -0,0 +1,61 @@
+/**
+ *
+ */
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+
+public class FunctionalTestConfigurationSource implements ConfigurationSource {
+
+ private final int port;
+
+ public FunctionalTestConfigurationSource(int port) {
+ this.port = port;
+ }
+
+ public String resourceBase() {
+ return ".";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ public String logsDirectory() {
+ return "";
+ }
+
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER + "," + Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true";
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return "";
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return String.valueOf(Boolean.TRUE);
+ }
+
+ public String description() {
+ return null;
+ }
+
+ public String logStatus() {
+ return String.valueOf(true);
+ }
+
+ public String timeoutSeconds() {
+ return "60";
+ }
+
+ public String remoteMachineURLs() {
+ return "http://www.example.com,http://www.example2.com";
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestFarmConfigurationSource.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestFarmConfigurationSource.java
new file mode 100644
index 0000000..d7e5596
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestFarmConfigurationSource.java
@@ -0,0 +1,59 @@
+package net.jsunit;
+
+import net.jsunit.configuration.ConfigurationSource;
+
+public class FunctionalTestFarmConfigurationSource implements ConfigurationSource {
+
+ private int port;
+ private int remotePort;
+
+ public FunctionalTestFarmConfigurationSource(int port, int remotePort) {
+ this.port = port;
+ this.remotePort = remotePort;
+ }
+
+ public String resourceBase() {
+ return null;
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ public String logsDirectory() {
+ return ".";
+ }
+
+ public String browserFileNames() {
+ return null;
+ }
+
+ public String url() {
+ return null;
+ }
+
+ public String ignoreUnresponsiveRemoteMachines() {
+ return null;
+ }
+
+ public String closeBrowsersAfterTestRuns() {
+ return null;
+ }
+
+ public String description() {
+ return null;
+ }
+
+ public String logStatus() {
+ return "true";
+ }
+
+ public String timeoutSeconds() {
+ return "60";
+ }
+
+ public String remoteMachineURLs() {
+ return "http://localhost:" + remotePort;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestSuite.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestSuite.java
new file mode 100644
index 0000000..71087fa
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/FunctionalTestSuite.java
@@ -0,0 +1,25 @@
+package net.jsunit;
+
+import junit.framework.TestSuite;
+
+public class FunctionalTestSuite {
+
+ public static TestSuite suite() {
+ TestSuite result = new TestSuite();
+ result.addTestSuite(AcceptorFunctionalTest.class);
+ result.addTestSuite(ConfigurationFunctionalTest.class);
+ result.addTestSuite(DisplayerFunctionalTest.class);
+ result.addTestSuite(InvalidRemoteMachinesDistributedTestTest.class);
+ result.addTestSuite(FailedToLaunchBrowserStandaloneTestTest.class);
+ result.addTestSuite(ServerLandingPageFunctionalTest.class);
+ result.addTestSuite(OverrideURLDistributedTestTest.class);
+ result.addTestSuite(RemoteConfigurationSourceFunctionalTest.class);
+ result.addTestSuite(RunnerFunctionalTest.class);
+ result.addTestSuite(SpecificBrowserDistributedTestTest.class);
+ result.addTestSuite(SuccessfulStandaloneTestTest.class);
+ result.addTestSuite(TimedOutBrowserStandaloneTestTest.class);
+ result.addTestSuite(TwoValidLocalhostsDistributedTestTest.class);
+ result.addTestSuite(UrlOverrideStandaloneTestTest.class);
+ return result;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ImpureUnitTestSuite.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ImpureUnitTestSuite.java
new file mode 100644
index 0000000..5607030
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ImpureUnitTestSuite.java
@@ -0,0 +1,55 @@
+package net.jsunit;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import net.jsunit.action.DistributedTestRunnerActionTest;
+import net.jsunit.action.FarmServerConfigurationActionTest;
+import net.jsunit.action.TestRunnerActionSimultaneousRunBlockingTest;
+import net.jsunit.action.TestRunnerActionTest;
+import net.jsunit.configuration.ConfigurationSourceResolutionTest;
+import net.jsunit.configuration.ConfigurationTest;
+import net.jsunit.configuration.EnvironmentVariablesConfigurationSourceTest;
+import net.jsunit.configuration.PropertiesConfigurationSourceTest;
+import net.jsunit.interceptor.BrowserResultInterceptorTest;
+import net.jsunit.interceptor.FarmServerInterceptorTest;
+import net.jsunit.interceptor.RequestSourceInterceptorTest;
+import net.jsunit.model.*;
+
+public class ImpureUnitTestSuite {
+
+ public static Test suite() {
+ TestSuite result = new TestSuite();
+ result.addTestSuite(BrowserResultInterceptorTest.class);
+ result.addTestSuite(BrowserResultTest.class);
+ result.addTestSuite(ClientServerInteractionTest.class);
+ result.addTestSuite(ClientServerConnectionTest.class);
+ result.addTestSuite(ConfigurationSourceResolutionTest.class);
+ result.addTestSuite(ConfigurationTest.class);
+ result.addTestSuite(DistributedTestRunResultBuilderTest.class);
+ result.addTestSuite(DistributedTestSuiteBuilderTest.class);
+ result.addTestSuite(EnvironmentVariablesConfigurationSourceTest.class);
+ result.addTestSuite(ExternallyShutDownBrowserResultTest.class);
+ result.addTestSuite(FailedToLaunchBrowserResultTest.class);
+ result.addTestSuite(FarmServerConfigurationActionTest.class);
+ result.addTestSuite(FarmServerInterceptorTest.class);
+ result.addTestSuite(DistributedTestRunManagerTest.class);
+ result.addTestSuite(DistributedTestRunnerActionTest.class);
+ result.addTestSuite(JsUnitFarmServerTest.class);
+ result.addTestSuite(JsUnitStandardServerTest.class);
+ result.addTestSuite(PropertiesConfigurationSourceTest.class);
+ result.addTestSuite(RemoteConfigurationSourceTest.class);
+ result.addTestSuite(RemoteMachineRunnerHitterTest.class);
+ result.addTestSuite(RemoteTestRunClientTest.class);
+ result.addTestSuite(RequestSourceInterceptorTest.class);
+ result.addTestSuite(ResultAcceptorTest.class);
+ result.addTestSuite(TestRunnerActionSimultaneousRunBlockingTest.class);
+ result.addTestSuite(TestRunNotifierServerTest.class);
+ result.addTestSuite(TestRunResultBuilderTest.class);
+ result.addTestSuite(TestRunManagerTest.class);
+ result.addTestSuite(TestRunResultTest.class);
+ result.addTestSuite(TestRunnerActionTest.class);
+ result.addTestSuite(TimeoutCheckerTest.class);
+ result.addTestSuite(TimedOutBrowerResultTest.class);
+ return result;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/InvalidRemoteMachinesDistributedTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/InvalidRemoteMachinesDistributedTestTest.java
new file mode 100644
index 0000000..6a6b76a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/InvalidRemoteMachinesDistributedTestTest.java
@@ -0,0 +1,39 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.ResultType;
+
+public class InvalidRemoteMachinesDistributedTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource invalidRemoteMachinesFarmSource() {
+ return new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "http://invalid_machine1:8080, http://invalid_machine2:8080";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ protected ConfigurationSource serverSource() {
+ return new StubConfigurationSource() {
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ public void testUnresponsive() {
+ DistributedTest test = new DistributedTest(serverSource(), invalidRemoteMachinesFarmSource());
+ TestResult testResult = test.run();
+ assertFalse(testResult.wasSuccessful());
+ assertEquals(
+ ResultType.UNRESPONSIVE,
+ test.getDistributedTestRunManager().getDistributedTestRunResult().getResultType()
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitFarmServerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitFarmServerTest.java
new file mode 100644
index 0000000..2c65cd3
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitFarmServerTest.java
@@ -0,0 +1,20 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+
+public class JsUnitFarmServerTest extends TestCase {
+
+ private JsUnitFarmServer server;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ server = new JsUnitFarmServer(new Configuration(new DummyFarmConfigurationSource()));
+ }
+
+ public void testStartTestRun() throws Exception {
+ assertEquals(ServerType.FARM, server.serverType());
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitStandardServerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitStandardServerTest.java
new file mode 100644
index 0000000..6767909
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/JsUnitStandardServerTest.java
@@ -0,0 +1,163 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationException;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class JsUnitStandardServerTest extends TestCase {
+
+ private JsUnitStandardServer server;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ server = new JsUnitStandardServer(new Configuration(new DummyConfigurationSource()), new MockBrowserResultRepository(), false);
+ }
+
+ public void testStartTestRun() throws Exception {
+ server.setProcessStarter(new MockProcessStarter());
+ MockTestRunListener listener = new MockTestRunListener();
+ server.addBrowserTestRunListener(listener);
+ Thread thread = new Thread() {
+ public void run() {
+ try {
+ server.startTestRun();
+ } catch (Exception e) {
+ fail(e.toString());
+ }
+ }
+ };
+ thread.start();
+ Thread.sleep(500);
+ assertTrue(thread.isAlive());
+ listener.isReady = true;
+ thread.join();
+ }
+
+ public void testLaunchingBrowser() {
+ MockProcessStarter starter = new MockProcessStarter();
+ server.setProcessStarter(starter);
+ MockTestRunListener listener = new MockTestRunListener();
+ server.addBrowserTestRunListener(listener);
+
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser(DummyConfigurationSource.BROWSER_FILE_NAME, 0)));
+ assertTrue(listener.browserTestRunStartedCalled);
+ assertEquals(2, starter.commandPassed.length);
+ assertEquals("mybrowser.exe", starter.commandPassed[0]);
+ assertEquals(DummyConfigurationSource.DUMMY_URL, starter.commandPassed[1]);
+ assertFalse(listener.testRunFinishedCalled);
+ server.accept(new DummyBrowserResult(true, 0, 0));
+ assertTrue(listener.browserTestRunFinishedCalled);
+ }
+
+ public void testLaunchingBrowserCrashes() throws InterruptedException {
+ BlowingUpProcessStarter starter = new BlowingUpProcessStarter();
+ server.setProcessStarter(starter);
+ MockTestRunListener listener = new MockTestRunListener();
+ server.addBrowserTestRunListener(listener);
+
+ long launchTime = server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser(DummyConfigurationSource.BROWSER_FILE_NAME, 0)));
+ assertTrue(listener.browserTestRunStartedCalled);
+ assertTrue(listener.browserTestRunFinishedCalled);
+ assertTrue(listener.result.failedToLaunch());
+ assertTrue(server.hasReceivedResultSince(launchTime));
+ assertEquals(new Browser("mybrowser.exe", 0), listener.browser);
+ assertEquals("mybrowser.exe", listener.result.getBrowser().getFileName());
+ assertSame(listener.result, server.lastResult());
+
+ server.setProcessStarter(new MockProcessStarter());
+ listener.reset();
+ launchTime = server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("mybrowser2.exe", 1)));
+ assertFalse(server.hasReceivedResultSince(launchTime));
+ assertTrue(listener.browserTestRunStartedCalled);
+ assertFalse(listener.browserTestRunFinishedCalled);
+ assertEquals(new Browser("mybrowser2.exe", 1), listener.browser);
+ }
+
+ public void testStartEnd() {
+ server.setProcessStarter(new MockProcessStarter());
+ MockTestRunListener listener = new MockTestRunListener();
+ listener.isReady = true;
+ server.addBrowserTestRunListener(listener);
+ server.startTestRun();
+ assertTrue(listener.testRunStartedCalled);
+ server.finishTestRun();
+ assertTrue(listener.testRunFinishedCalled);
+ }
+
+ public void testAcceptResult() {
+ server.setProcessStarter(new MockProcessStarter());
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0)));
+ BrowserResult result = new BrowserResult();
+ server.accept(result);
+ assertEquals("mybrowser.exe", result.getBrowser().getFileName());
+ }
+
+ public void testOverrideUrl() {
+ MockProcessStarter starter = new MockProcessStarter();
+ server.setProcessStarter(starter);
+ MockTestRunListener listener = new MockTestRunListener();
+ server.addBrowserTestRunListener(listener);
+
+ String overrideUrl = "http://my.example.com:8080?submitResults=true&autoRun=true";
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0), overrideUrl));
+ assertEquals(2, starter.commandPassed.length);
+ assertEquals("mybrowser.exe", starter.commandPassed[0]);
+ assertEquals(overrideUrl, starter.commandPassed[1]);
+ }
+
+ public void testAddingSubmitResultsAndAutoRunParameters() throws Exception {
+ MockProcessStarter starter = new MockProcessStarter();
+ server.setProcessStarter(starter);
+ MockTestRunListener listener = new MockTestRunListener();
+ server.addBrowserTestRunListener(listener);
+
+ String overrideUrlWithoutSubmitResults = "http://my.example.com:8080?param=value";
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0), overrideUrlWithoutSubmitResults));
+ assertEquals(2, starter.commandPassed.length);
+ assertEquals("mybrowser.exe", starter.commandPassed[0]);
+ assertEquals(
+ overrideUrlWithoutSubmitResults + "&autoRun=true&submitResults=localhost:1234/jsunit/acceptor",
+ starter.commandPassed[1]
+ );
+ }
+
+ public void testNoURLSpecified() throws Exception {
+ server = new JsUnitStandardServer(new Configuration(new DummyConfigurationSource() {
+ public String url() {
+ return "";
+ }
+ }), new MockBrowserResultRepository(), false);
+ MockProcessStarter starter = new MockProcessStarter();
+ server.setProcessStarter(starter);
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("mybrowser.exe", 0)));
+ assertFalse(server.lastResult().wasSuccessful());
+ assertTrue(server.lastResult().getServerSideExceptionStackTrace().indexOf(NoUrlSpecifiedException.class.getName()) != -1);
+ }
+
+ public void testInvalidConfiguration() {
+ try {
+ server = new JsUnitStandardServer(new Configuration(new InvalidConfigurationSource()), false);
+ fail();
+ } catch (ConfigurationException e) {
+
+ }
+ }
+
+ public void testAwaitingBrowserSubmission() throws Exception {
+ server.setProcessStarter(new MockProcessStarter());
+ assertFalse(server.isAwaitingBrowserSubmission());
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("foo.exe", 1)));
+ assertTrue(server.isAwaitingBrowserSubmission());
+ }
+
+ static class InvalidConfigurationSource extends DummyConfigurationSource {
+
+ public String url() {
+ return "invalid url";
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockBrowserResultRepository.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockBrowserResultRepository.java
new file mode 100644
index 0000000..a041b4a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockBrowserResultRepository.java
@@ -0,0 +1,21 @@
+package net.jsunit;
+
+import net.jsunit.logging.BrowserResultRepository;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+
+public class MockBrowserResultRepository implements BrowserResultRepository {
+ public BrowserResult storedResult;
+ public String requestedId;
+ public Browser requestedBrowser;
+
+ public void store(BrowserResult result) {
+ this.storedResult = result;
+ }
+
+ public BrowserResult retrieve(String id, Browser browser) {
+ this.requestedId = id;
+ this.requestedBrowser = browser;
+ return null;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockProcessStarter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockProcessStarter.java
new file mode 100644
index 0000000..e9a7711
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockProcessStarter.java
@@ -0,0 +1,14 @@
+package net.jsunit;
+
+import java.io.IOException;
+
+public class MockProcessStarter implements ProcessStarter {
+
+ public String[] commandPassed;
+
+ public Process execute(String[] command) throws IOException {
+ this.commandPassed = command;
+ return null;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockRemoteServerHitter.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockRemoteServerHitter.java
new file mode 100644
index 0000000..224fea6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/MockRemoteServerHitter.java
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package net.jsunit;
+
+import org.jdom.Document;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class MockRemoteServerHitter implements RemoteServerHitter {
+
+ public List urlsPassed = new ArrayList();
+ public Map urlToDocument = new HashMap();
+
+ public Document hitURL(URL url) {
+ String urlString = url.toString();
+ urlsPassed.add(urlString);
+ return urlToDocument.get(urlString);
+ }
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/OverrideURLDistributedTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/OverrideURLDistributedTestTest.java
new file mode 100644
index 0000000..8c634fd
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/OverrideURLDistributedTestTest.java
@@ -0,0 +1,49 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.ResultType;
+
+public class OverrideURLDistributedTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource farmSource() {
+ return new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "http://localhost:" + port;
+ }
+ };
+ }
+
+ protected ConfigurationSource serverSourceWithBadTestURL() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://www.example.com";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ public void testOverrideURL() throws Throwable {
+ DistributedTest test = new DistributedTest(serverSourceWithBadTestURL(), farmSource());
+ test.getDistributedTestRunManager().setOverrideURL(
+ "http://localhost:" + port + "/jsunit/testRunner.html?" +
+ "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true"
+ );
+ TestResult result = test.run();
+
+ assertEquals(
+ ResultType.SUCCESS,
+ test.getDistributedTestRunManager().getDistributedTestRunResult().getResultType()
+ );
+ assertTrue(result.wasSuccessful());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/PureUnitTestSuite.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/PureUnitTestSuite.java
new file mode 100644
index 0000000..0cea273
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/PureUnitTestSuite.java
@@ -0,0 +1,37 @@
+package net.jsunit;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import net.jsunit.action.ErrorXmlRenderableTest;
+import net.jsunit.action.LatestVersionActionTest;
+import net.jsunit.action.ResultAcceptorActionTest;
+import net.jsunit.action.ResultDisplayerActionTest;
+import net.jsunit.configuration.ArgumentsConfigurationSourceTest;
+import net.jsunit.interceptor.BrowserTestRunnerInterceptorTest;
+import net.jsunit.interceptor.RemoteRunnerHitterInterceptorTest;
+import net.jsunit.interceptor.VersionGrabberInterceptorTest;
+import net.jsunit.model.BrowserTest;
+import net.jsunit.model.TestCaseResultTest;
+import net.jsunit.model.TestPageResultTest;
+
+public class PureUnitTestSuite {
+
+ public static Test suite() {
+ TestSuite result = new TestSuite();
+ result.addTestSuite(ArgumentsConfigurationSourceTest.class);
+ result.addTestSuite(BrowserLaunchSpecificationTest.class);
+ result.addTestSuite(BrowserResultLogWriterTest.class);
+ result.addTestSuite(BrowserTest.class);
+ result.addTestSuite(BrowserTestRunnerInterceptorTest.class);
+ result.addTestSuite(ErrorXmlRenderableTest.class);
+ result.addTestSuite(DistributedTestRunResultTest.class);
+ result.addTestSuite(LatestVersionActionTest.class);
+ result.addTestSuite(RemoteRunnerHitterInterceptorTest.class);
+ result.addTestSuite(ResultAcceptorActionTest.class);
+ result.addTestSuite(ResultDisplayerActionTest.class);
+ result.addTestSuite(TestCaseResultTest.class);
+ result.addTestSuite(TestPageResultTest.class);
+ result.addTestSuite(VersionGrabberInterceptorTest.class);
+ return result;
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceFunctionalTest.java
new file mode 100644
index 0000000..aa7cd13
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceFunctionalTest.java
@@ -0,0 +1,20 @@
+package net.jsunit;
+
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+import net.jsunit.utility.XmlUtility;
+
+public class RemoteConfigurationSourceFunctionalTest extends FunctionalTestCase {
+
+ public void testSimple() throws Exception {
+ String remoteMachineURL = "http://localhost:" + port + "/jsunit";
+ RemoteConfigurationSource source = new RemoteConfigurationSource(new RemoteMachineServerHitter(), remoteMachineURL);
+ assertTrue(source.isInitialized());
+ Configuration remoteConfiguration = new Configuration(source);
+ assertEquals(
+ XmlUtility.asString(configuration.asXml(ServerType.STANDARD)),
+ XmlUtility.asString(remoteConfiguration.asXml(ServerType.STANDARD))
+ );
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceTest.java
new file mode 100644
index 0000000..90e9ec2
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteConfigurationSourceTest.java
@@ -0,0 +1,36 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+public class RemoteConfigurationSourceTest extends TestCase {
+ private String baseURL;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ baseURL = "http://www.example.com:1234/jsunit";
+ }
+
+ public void testSimple() throws Exception {
+ Configuration configuration = new Configuration(new DummyConfigurationSource());
+ MockRemoteServerHitter mockHitter = new MockRemoteServerHitter();
+ mockHitter.urlToDocument.put(baseURL + "/config", new Document(configuration.asXml(ServerType.STANDARD)));
+
+ RemoteConfigurationSource remoteSource = new RemoteConfigurationSource(mockHitter, baseURL);
+ assertTrue(remoteSource.isInitialized());
+
+ Configuration remoteConfiguration = new Configuration(remoteSource);
+ assertEquals(XmlUtility.asString(configuration.asXml(ServerType.STANDARD)),
+ XmlUtility.asString(remoteConfiguration.asXml(ServerType.STANDARD))
+ );
+ }
+
+ public void testBlowingUpURL() throws Exception {
+ RemoteConfigurationSource remoteSource = new RemoteConfigurationSource(new BlowingUpRemoteServerHitter(), baseURL);
+ assertFalse(remoteSource.isInitialized());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteMachineRunnerHitterTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteMachineRunnerHitterTest.java
new file mode 100644
index 0000000..75f30fb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RemoteMachineRunnerHitterTest.java
@@ -0,0 +1,59 @@
+// Copyright 2005 Google Inc.
+// All Rights Reserved.
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+public class RemoteMachineRunnerHitterTest extends TestCase {
+
+ String xml = "my text";
+
+ public void testAllAtOnce() throws Exception {
+ RemoteMachineServerHitter hitter = new RemoteMachineServerHitter();
+ Document document = hitter.hitURL(createURL(xml, xml.length()));
+ assertDocumentHasXml(xml, document);
+ }
+
+ public void testAPieceAtATime() throws Exception {
+ RemoteMachineServerHitter hitter = new RemoteMachineServerHitter();
+ Document document = hitter.hitURL(createURL(xml, 3));
+ assertDocumentHasXml(xml, document);
+ }
+
+ private void assertDocumentHasXml(String expectedXML, Document document) {
+ assertEquals(expectedXML, XmlUtility.asString(document.getRootElement()));
+ }
+
+ private URL createURL(final String xml, final int byteCount) throws MalformedURLException {
+ return new URL("http", "www.example.com", 8080, "foo", new URLStreamHandler() {
+ protected URLConnection openConnection(URL u) {
+ return new URLConnection(u) {
+ public void connect() {
+ }
+
+ public InputStream getInputStream() {
+ return new InputStream() {
+
+ private int index = 0;
+
+ public int read() {
+ if (index >= xml.length())
+ return -1;
+ return xml.codePointAt(index++);
+ }
+ };
+ }
+ };
+ }
+ });
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ResultAcceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ResultAcceptorTest.java
new file mode 100644
index 0000000..9c5d5fc
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ResultAcceptorTest.java
@@ -0,0 +1,116 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.interceptor.BrowserResultInterceptor;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ResultAcceptorTest extends TestCase {
+
+ protected Map requestMap;
+ private JsUnitStandardServer server;
+ private MockBrowserResultRepository mockBrowserResultRepository;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ Configuration configuration = new Configuration(new StubConfigurationSource() {
+
+ public String browserFileNames() {
+ return "browser1.exe,browser2.exe,browser3.exe";
+ }
+
+ public String logStatus() {
+ return String.valueOf(Boolean.FALSE);
+ }
+
+ public String url() {
+ return "http://bar";
+ }
+
+ });
+ mockBrowserResultRepository = new MockBrowserResultRepository();
+ server = new JsUnitStandardServer(configuration, mockBrowserResultRepository, false);
+ server.setProcessStarter(new MockProcessStarter());
+ requestMap = new HashMap();
+ requestMap.put(BrowserResultWriter.ID, new String[]{"ID_foo"});
+ requestMap.put(BrowserResultWriter.USER_AGENT, new String[]{"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"});
+ requestMap.put(BrowserResultWriter.TIME, new String[]{"4.3"});
+ requestMap.put(BrowserResultWriter.JSUNIT_VERSION, new String[]{"2.5"});
+ requestMap.put(BrowserResultWriter.TEST_CASES, dummyTestCaseStrings());
+ }
+
+ protected String[] dummyTestCaseStrings() {
+ return new String[]{"file:///dummy/path/dummyPage.html:testFoo|1.3|S||", "file:///dummy/path/dummyPage.html:testFoo|1.3|E|Test Error Message|", "file:///dummy/path/dummyPage.html:testFoo|1.3|F|Test Failure Message|"};
+ }
+
+ protected void submit() {
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser("browser2.exe", 1)));
+ HttpServletRequest request = new DummyHttpRequest(requestMap);
+ server.accept(new BrowserResultInterceptor().build(request));
+ }
+
+ public void testSubmitResults() {
+ assertEquals(0, server.getResults().size());
+ submit();
+ assertEquals(1, server.getResults().size());
+ submit();
+ assertEquals(1, server.getResults().size());
+ }
+
+ public void testSubmittedResultHeaders() {
+ submit();
+ BrowserResult result = server.getResults().get(0);
+ assertEquals("ID_foo", result.getId());
+ assertEquals("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)", result.getUserAgent());
+ assertEquals("2.5", result.getJsUnitVersion());
+ assertEquals(1, result.getErrorCount());
+ assertEquals(1, result.getFailureCount());
+ assertEquals(3, result.getTestCount());
+ assertEquals(4.3d, result.getTime(), .001d);
+ }
+
+ public void testSubmittedTestCaseResults() {
+ submit();
+ BrowserResult result = server.getResults().get(0);
+ assertEquals(3, result.getTestCaseResults().size());
+ }
+
+ public void testHasReceivedResultSinceDate() throws InterruptedException {
+ assertFalse(server.hasReceivedResultSince(System.currentTimeMillis()));
+ long time = System.currentTimeMillis();
+ Thread.sleep(100);
+ submit();
+ assertTrue(server.hasReceivedResultSince(time));
+ }
+
+ public void testFindResultByIdInMemoryOrOnDisk() throws InvalidBrowserIdException {
+ assertNull(server.findResultWithId("ID_foo", 1));
+ assertEquals("ID_foo", mockBrowserResultRepository.requestedId);
+ assertEquals(1, mockBrowserResultRepository.requestedBrowser.getId());
+ submit();
+ mockBrowserResultRepository.requestedId = null;
+ assertFalse(server.getResults().isEmpty());
+ assertNotNull(server.findResultWithId("ID_foo", 1));
+ assertNull(mockBrowserResultRepository.requestedId);
+ assertNull(server.findResultWithId("Invalid ID", 1));
+ assertEquals("Invalid ID", mockBrowserResultRepository.requestedId);
+ mockBrowserResultRepository.requestedId = null;
+ server.clearResults();
+ assertTrue(server.getResults().isEmpty());
+ server.findResultWithId("ID_foo", 1);
+ assertEquals("ID_foo", mockBrowserResultRepository.requestedId);
+ assertEquals(1, mockBrowserResultRepository.requestedBrowser.getId());
+ }
+
+ public void testLog() {
+ submit();
+ assertEquals("ID_foo", mockBrowserResultRepository.storedResult.getId());
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RunnerFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RunnerFunctionalTest.java
new file mode 100644
index 0000000..1ed6e56
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/RunnerFunctionalTest.java
@@ -0,0 +1,47 @@
+package net.jsunit;
+
+import net.jsunit.model.ResultType;
+import org.jdom.Document;
+
+import java.net.URLEncoder;
+
+public class RunnerFunctionalTest extends FunctionalTestCase {
+
+ public void testSimple() throws Exception {
+ webTester.beginAt("runner");
+ Document result = responseXmlDocument();
+ assertSuccessfulRunResult(
+ result,
+ ResultType.SUCCESS,
+ "http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html", 2);
+ }
+
+ public void testOverrideUrl() throws Exception {
+ webTester.beginAt("runner?url=" + URLEncoder.encode("http://127.0.0.1:" + port + "/jsunit/testRunner.html?testPage=http://127.0.0.1:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true", "UTF-8"));
+ Document result = responseXmlDocument();
+ assertSuccessfulRunResult(
+ result,
+ ResultType.SUCCESS,
+ "http://127.0.0.1:" + port + "/jsunit/tests/jsUnitUtilityTests.html", 2);
+ }
+
+ public void testSpecifyBrowser() throws Exception {
+ webTester.beginAt("runner?browserId=0");
+ Document result = responseXmlDocument();
+ assertSuccessfulRunResult(
+ result,
+ ResultType.SUCCESS,
+ "http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html", 1);
+ }
+
+ public void testSpecifyInvalidBrowser() throws Exception {
+ webTester.beginAt("runner?browserId=23");
+ Document result = responseXmlDocument();
+ assertErrorResponse(result.getRootElement(), "Invalid browser ID: 23");
+ }
+
+ protected boolean shouldMockOutProcessStarter() {
+ return false;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ServerLandingPageFunctionalTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ServerLandingPageFunctionalTest.java
new file mode 100644
index 0000000..cd6cc6a
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/ServerLandingPageFunctionalTest.java
@@ -0,0 +1,81 @@
+package net.jsunit;
+
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.ResultType;
+import net.jsunit.utility.SystemUtility;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.Document;
+
+public class ServerLandingPageFunctionalTest extends FunctionalTestCase {
+
+ public void testSlash() throws Exception {
+ webTester.beginAt("/");
+ assertOnLandingPage();
+ webTester.assertTextPresent(SystemUtility.osString());
+ webTester.assertTextPresent(SystemUtility.hostname());
+ webTester.assertTextPresent(SystemUtility.ipAddress());
+ webTester.assertLinkPresentWithText(new FunctionalTestConfigurationSource(port).url());
+ }
+
+ public void testIndexDotJsp() throws Exception {
+ webTester.beginAt("/index.jsp");
+ assertOnLandingPage();
+ }
+
+ public void testConfigLink() throws Exception {
+ webTester.beginAt("/");
+ webTester.clickLink("config");
+ assertConfigXml();
+ }
+
+ protected boolean shouldMockOutProcessStarter() {
+ return false;
+ }
+
+ public void testRunnerForParticularBrowser() throws Exception {
+ webTester.beginAt("/");
+ webTester.setWorkingForm("runnerForm");
+ webTester.selectOption("browserId", Browser.DEFAULT_SYSTEM_BROWSER);
+ webTester.setFormElement("url", "http://localhost:" + port + "/jsunit/testRunner.html?testPage=http://localhost:" + port + "/jsunit/tests/jsUnitAssertionTests.html");
+ webTester.submit();
+ assertSuccessfulRunResult(
+ responseXmlDocument(),
+ ResultType.SUCCESS,
+ "http://localhost:" + port + "/jsunit/tests/jsUnitAssertionTests.html",
+ 1
+ );
+ }
+
+ public void testRunnerForAllBrowsers() throws Exception {
+ webTester.beginAt("/");
+ webTester.setWorkingForm("runnerForm");
+ webTester.setFormElement("url", "http://localhost:" + port + "/jsunit/testRunner.html?testPage=http://localhost:" + port + "/jsunit/tests/jsUnitAssertionTests.html");
+ webTester.submit();
+ assertSuccessfulRunResult(
+ responseXmlDocument(),
+ ResultType.SUCCESS,
+ "http://localhost:" + port + "/jsunit/tests/jsUnitAssertionTests.html",
+ 2
+ );
+ }
+
+ public void testDisplayerForm() throws Exception {
+ server.launchBrowserTestRun(new BrowserLaunchSpecification(new Browser(Browser.DEFAULT_SYSTEM_BROWSER, 0)));
+ BrowserResult browserResult = new BrowserResult();
+ String id = String.valueOf(System.currentTimeMillis());
+ browserResult.setId(id);
+ server.accept(browserResult);
+ webTester.beginAt("/");
+ webTester.setWorkingForm("displayerForm");
+ webTester.setFormElement("id", id);
+ webTester.selectOption("browserId", Browser.DEFAULT_SYSTEM_BROWSER);
+ webTester.submit();
+ assertEquals(XmlUtility.asString(new Document(browserResult.asXml())), webTester.getDialog().getResponseText());
+ }
+
+ private void assertOnLandingPage() {
+ webTester.assertTitleEquals("JsUnit Server");
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SpecificBrowserDistributedTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SpecificBrowserDistributedTestTest.java
new file mode 100644
index 0000000..89061a6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SpecificBrowserDistributedTestTest.java
@@ -0,0 +1,54 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.DistributedTestRunResult;
+import net.jsunit.model.ResultType;
+
+public class SpecificBrowserDistributedTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource farmSource() {
+ return new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "http://localhost:" + port;
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ };
+ }
+
+ protected StubConfigurationSource serverSource() {
+ return new StubConfigurationSource() {
+
+ public String browserFileNames() {
+ return "invalid1.exe," + Browser.DEFAULT_SYSTEM_BROWSER + ",invalid2.exe";
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?"
+ + "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ public void testSuccessfulRun() {
+ DistributedTest test = new DistributedTest(serverSource(), farmSource());
+ test.limitToBrowser(new Browser(Browser.DEFAULT_SYSTEM_BROWSER, 1));
+ TestResult testResult = test.run();
+ assertTrue(testResult.wasSuccessful());
+ DistributedTestRunResult distributedTestRunResult = test.getDistributedTestRunManager().getDistributedTestRunResult();
+ assertEquals(ResultType.SUCCESS, distributedTestRunResult.getResultType());
+ assertEquals(1, distributedTestRunResult.getTestRunResults().size());
+
+ assertNull(test.getTemporaryStandardServer());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SuccessfulStandaloneTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SuccessfulStandaloneTestTest.java
new file mode 100644
index 0000000..2c96f63
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/SuccessfulStandaloneTestTest.java
@@ -0,0 +1,35 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+
+public class SuccessfulStandaloneTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource configurationSource() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER + "," + Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?" +
+ "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitTestSuite.html" +
+ "&autoRun=true&submitresults=true&resultId=foobar";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ };
+ }
+
+ public void testSuccessfulRun() throws Exception {
+ StandaloneTest test = new StandaloneTest(configurationSource());
+ TestResult result = test.run();
+ assertTrue(result.wasSuccessful());
+ assertTrue(test.getServer().lastResult().wasSuccessful());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestPortManager.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestPortManager.java
new file mode 100644
index 0000000..3105a34
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestPortManager.java
@@ -0,0 +1,15 @@
+package net.jsunit;
+
+public class TestPortManager {
+
+ /**
+ * Unassigned range from 48004 to 48555:
+ * @see IANA Port Assignments
+ */
+ private static int port = 48004;
+
+ public int newPort() {
+ return port++;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestRunManagerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestRunManagerTest.java
new file mode 100644
index 0000000..11d52c5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TestRunManagerTest.java
@@ -0,0 +1,240 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.TestRunResult;
+import net.jsunit.utility.SystemUtility;
+import org.jdom.Element;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class TestRunManagerTest extends TestCase {
+
+ public void testDisposedDuringTestRun() throws InterruptedException {
+ KillableBrowserTestRunner runner = new KillableBrowserTestRunner();
+ final TestRunManager manager = new TestRunManager(runner);
+ Thread thread = new Thread() {
+ public void run() {
+ manager.runTests();
+ }
+ };
+ thread.start();
+ while (!runner.startTestRunCalled)
+ Thread.sleep(10);
+ runner.isAlive = false;
+ thread.join();
+ assertTrue(runner.finishTestRunCalled);
+ }
+
+ public void testOverrideUrl() {
+ MockBrowserTestRunner runner = new MockBrowserTestRunner();
+ runner.hasReceivedResult = true;
+ String overrideUrl = "http://my.override.url:8080/jsunit/testRunner.html?someParam=someValue&someOtherParam=someOtherValue";
+ TestRunManager manager = new TestRunManager(runner, overrideUrl);
+ manager.runTests();
+
+ assertEquals(2, runner.launchSpecs.size());
+ BrowserLaunchSpecification spec1 = runner.launchSpecs.get(0);
+ assertTrue(spec1.hasOverrideUrl());
+ assertEquals(overrideUrl, spec1.getOverrideUrl());
+ BrowserLaunchSpecification spec2 = runner.launchSpecs.get(1);
+ assertTrue(spec2.hasOverrideUrl());
+ assertEquals(overrideUrl, spec2.getOverrideUrl());
+ }
+
+ public void testNoOverrideUrl() {
+ MockBrowserTestRunner runner = new MockBrowserTestRunner();
+ runner.hasReceivedResult = true;
+ TestRunManager manager = new TestRunManager(runner, null);
+ manager.runTests();
+
+ assertEquals(2, runner.launchSpecs.size());
+ assertFalse(runner.launchSpecs.get(0).hasOverrideUrl());
+ assertFalse(runner.launchSpecs.get(1).hasOverrideUrl());
+ }
+
+ public void testPropertiesSet() throws Exception {
+ MockBrowserTestRunner runner = new MockBrowserTestRunner();
+ runner.hasReceivedResult = true;
+ TestRunManager manager = new TestRunManager(runner, null);
+ manager.runTests();
+ TestRunResult testRunResult = manager.getTestRunResult();
+ assertEquals(SystemUtility.osString(), testRunResult.getOsString());
+ assertEquals(SystemUtility.ipAddress(), testRunResult.getIpAddress());
+ assertEquals(SystemUtility.hostname(), testRunResult.getHostname());
+ }
+
+ static class SuccessfulBrowserTestRunner implements BrowserTestRunner {
+
+ public List getBrowsers() {
+ return Arrays.asList(new Browser("browser1.exe", 0), new Browser("browser2.exe", 1));
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ return 0;
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return true;
+ }
+
+ public BrowserResult lastResult() {
+ return new DummyBrowserResult(true, 0, 0);
+ }
+
+ public void accept(BrowserResult result) {
+ }
+
+ public void dispose() {
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) {
+ return null;
+ }
+
+ public Element asXml() {
+ return null;
+ }
+
+ public void startTestRun() {
+ }
+
+ public void finishTestRun() {
+ }
+
+ public void logStatus(String message) {
+ }
+
+ public int timeoutSeconds() {
+ return 0;
+ }
+
+ public boolean isAlive() {
+ return true;
+ }
+
+ }
+
+ static class FailingBrowserTestRunner implements BrowserTestRunner {
+
+ private Browser currentBrowser;
+
+ public List getBrowsers() {
+ return Arrays.asList(
+ new Browser("browser1.exe", 0),
+ new Browser("browser2.exe", 1),
+ new Browser("browser3.exe", 2)
+ );
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ currentBrowser = launchSpec.getBrowser();
+ return 0;
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return true;
+ }
+
+ public BrowserResult lastResult() {
+ if (currentBrowser.hasId(0))
+ return new DummyBrowserResult(false, 0, 1);
+ else if (currentBrowser.hasId(1))
+ return new DummyBrowserResult(false, 1, 0);
+ else
+ return new DummyBrowserResult(false, 2, 3);
+ }
+
+ public void accept(BrowserResult result) {
+ }
+
+ public void dispose() {
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) {
+ return null;
+ }
+
+ public Element asXml() {
+ return null;
+ }
+
+ public void startTestRun() {
+ }
+
+ public void finishTestRun() {
+ }
+
+ public void logStatus(String message) {
+ }
+
+ public int timeoutSeconds() {
+ return 0;
+ }
+
+ public boolean isAlive() {
+ return true;
+ }
+
+ }
+
+ static class KillableBrowserTestRunner implements BrowserTestRunner {
+
+ private boolean isAlive;
+ private boolean startTestRunCalled;
+ private boolean finishTestRunCalled;
+
+ public void startTestRun() {
+ startTestRunCalled = true;
+ }
+
+ public void finishTestRun() {
+ finishTestRunCalled = true;
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ return 0;
+ }
+
+ public void accept(BrowserResult result) {
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return false;
+ }
+
+ public BrowserResult lastResult() {
+ return null;
+ }
+
+ public void dispose() {
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) {
+ return null;
+ }
+
+ public void logStatus(String message) {
+ }
+
+ public List getBrowsers() {
+ return Arrays.asList(new Browser("browser1.exe", 0));
+ }
+
+ public int timeoutSeconds() {
+ return 0;
+ }
+
+ public boolean isAlive() {
+ return isAlive;
+ }
+
+ public Element asXml() {
+ return null;
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimedOutBrowserStandaloneTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimedOutBrowserStandaloneTestTest.java
new file mode 100644
index 0000000..c3229a2
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimedOutBrowserStandaloneTestTest.java
@@ -0,0 +1,40 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.ResultType;
+
+public class TimedOutBrowserStandaloneTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource configurationSource() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?" +
+ "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitTestSuite.html" +
+ "&autoRun=true&submitresults=true&resultId=foobar";
+ }
+
+ public String timeoutSeconds() {
+ return "0";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ };
+ }
+
+ public void testBrowserTimesOut() throws Exception {
+ StandaloneTest test = new StandaloneTest(configurationSource());
+ TestResult result = test.run();
+ assertEquals(ResultType.TIMED_OUT, test.getServer().lastResult().getResultType());
+ assertFalse(result.wasSuccessful());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimeoutCheckerTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimeoutCheckerTest.java
new file mode 100644
index 0000000..cf6e736
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TimeoutCheckerTest.java
@@ -0,0 +1,97 @@
+package net.jsunit;
+
+import junit.framework.TestCase;
+import net.jsunit.model.Browser;
+import net.jsunit.model.ResultType;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class TimeoutCheckerTest extends TestCase {
+
+ private MockBrowserTestRunner mockRunner;
+ private TimeoutChecker checker;
+ private MockProcess mockProcess;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ mockRunner = new MockBrowserTestRunner();
+ mockRunner.timeoutSeconds = Integer.MAX_VALUE;
+ mockProcess = new MockProcess();
+ checker = new TimeoutChecker(mockProcess, new Browser("mybrowser.exe", 0), 1, mockRunner, 1);
+ checker.start();
+ }
+
+ public void tearDown() throws Exception {
+ if (checker != null && checker.isAlive()) {
+ checker.die();
+ }
+ super.tearDown();
+ }
+
+ public void testInitialConditions() {
+ assertTrue(checker.isAlive());
+ }
+
+ public void testDie() throws InterruptedException {
+ checker.die();
+ Thread.sleep(10);
+ assertFalse(checker.isAlive());
+ }
+
+ public void testTimeOut() throws InterruptedException {
+ mockRunner.timeoutSeconds = 0;
+ while (mockRunner.acceptedResult == null)
+ Thread.sleep(10);
+ assertEquals(ResultType.TIMED_OUT, mockRunner.acceptedResult.getResultType());
+ }
+
+ public void testNotTimeOut() throws InterruptedException {
+ mockRunner.hasReceivedResult = true;
+ while (checker.isAlive())
+ Thread.sleep(10);
+ assertFalse(checker.isAlive());
+ }
+
+ public void xtestExternallyShutDown() throws InterruptedException {
+ assertFalse(mockRunner.hasReceivedResult);
+ mockProcess.done = true;
+ while (mockRunner.acceptedResult == null)
+ Thread.sleep(10);
+ assertTrue(mockRunner.acceptedResult.externallyShutDown());
+ assertFalse(checker.isAlive());
+ }
+
+ static class MockProcess extends Process {
+
+ private boolean done = false;
+
+ public OutputStream getOutputStream() {
+ return null;
+ }
+
+ public InputStream getInputStream() {
+ return null;
+ }
+
+ public InputStream getErrorStream() {
+ return null;
+ }
+
+ public int waitFor() throws InterruptedException {
+ return 0;
+ }
+
+ public int exitValue() {
+ if (!done)
+ throw new IllegalThreadStateException();
+ else
+ return 0;
+ }
+
+ public void destroy() {
+ }
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TwoValidLocalhostsDistributedTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TwoValidLocalhostsDistributedTestTest.java
new file mode 100644
index 0000000..4ff9d74
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/TwoValidLocalhostsDistributedTestTest.java
@@ -0,0 +1,87 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+import net.jsunit.model.DistributedTestRunResult;
+import net.jsunit.model.ResultType;
+
+public class TwoValidLocalhostsDistributedTestTest extends EndToEndTestCase {
+ private JsUnitStandardServer secondServer;
+ private int otherPort;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ otherPort = new TestPortManager().newPort();
+ secondServer = new JsUnitStandardServer(new Configuration(secondServerSource()), false);
+ secondServer.start();
+ }
+
+ protected void tearDown() throws Exception {
+ if (secondServer != null)
+ secondServer.dispose();
+ super.tearDown();
+ }
+
+ protected ConfigurationSource farmSource() {
+ return new StubConfigurationSource() {
+ public String remoteMachineURLs() {
+ return "http://localhost:" + port + ", http://localhost:" + otherPort;
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ };
+ }
+
+ protected StubConfigurationSource serverSource() {
+ return new StubConfigurationSource() {
+
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?"
+ + "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+ };
+ }
+
+ protected StubConfigurationSource secondServerSource() {
+ return new StubConfigurationSource() {
+
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://localhost:" + port + "/jsunit/testRunner.html?"
+ + "testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true";
+ }
+
+ public String port() {
+ return String.valueOf(otherPort);
+ }
+ };
+ }
+
+ public void testSuccessfulRun() {
+ DistributedTest test = new DistributedTest(serverSource(), farmSource());
+ TestResult testResult = test.run();
+ assertTrue(testResult.wasSuccessful());
+ DistributedTestRunResult distributedTestRunResult = test.getDistributedTestRunManager().getDistributedTestRunResult();
+ assertEquals(ResultType.SUCCESS, distributedTestRunResult.getResultType());
+ assertEquals(2, distributedTestRunResult.getTestRunResults().size());
+
+ assertNull(test.getTemporaryStandardServer());
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UnitTestSuite.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UnitTestSuite.java
new file mode 100644
index 0000000..1ddabbe
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UnitTestSuite.java
@@ -0,0 +1,14 @@
+package net.jsunit;
+
+import junit.framework.TestSuite;
+
+public class UnitTestSuite {
+
+ public static TestSuite suite() {
+ TestSuite result = new TestSuite();
+ result.addTest(PureUnitTestSuite.suite());
+ result.addTest(ImpureUnitTestSuite.suite());
+ return result;
+ }
+
+}
\ No newline at end of file
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UrlOverrideStandaloneTestTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UrlOverrideStandaloneTestTest.java
new file mode 100644
index 0000000..e657535
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/UrlOverrideStandaloneTestTest.java
@@ -0,0 +1,35 @@
+package net.jsunit;
+
+import junit.framework.TestResult;
+import net.jsunit.configuration.ConfigurationSource;
+import net.jsunit.model.Browser;
+
+public class UrlOverrideStandaloneTestTest extends EndToEndTestCase {
+
+ protected ConfigurationSource configurationSource() {
+ return new StubConfigurationSource() {
+ public String browserFileNames() {
+ return Browser.DEFAULT_SYSTEM_BROWSER;
+ }
+
+ public String url() {
+ return "http://www.example.com";
+ }
+
+ public String port() {
+ return String.valueOf(port);
+ }
+
+ };
+ }
+
+ public void testOverridenURL() throws Exception {
+ StandaloneTest test = new StandaloneTest(configurationSource());
+ test.setOverrideURL(
+ "http://localhost:" + port + "/jsunit/testRunner.html?testPage=http://localhost:" + port + "/jsunit/tests/jsUnitUtilityTests.html&autoRun=true&submitresults=true&resultId=foobar");
+ TestResult testResult = test.run();
+ assertTrue(testResult.wasSuccessful());
+ assertTrue(test.getServer().lastResult().wasSuccessful());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/BlockingTestRunner.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/BlockingTestRunner.java
new file mode 100644
index 0000000..e1eedea
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/BlockingTestRunner.java
@@ -0,0 +1,69 @@
+package net.jsunit.action;
+
+import net.jsunit.BrowserLaunchSpecification;
+import net.jsunit.BrowserTestRunner;
+import net.jsunit.model.Browser;
+import net.jsunit.model.BrowserResult;
+import org.jdom.Element;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class BlockingTestRunner implements BrowserTestRunner {
+ public boolean blocked;
+
+ public Element asXml() {
+ return null;
+ }
+
+ public void startTestRun() {
+ blocked = true;
+ while (blocked) {
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+
+ public void finishTestRun() {
+ }
+
+ public long launchBrowserTestRun(BrowserLaunchSpecification launchSpec) {
+ return 0;
+ }
+
+ public void accept(BrowserResult result) {
+ }
+
+ public boolean hasReceivedResultSince(long launchTime) {
+ return false;
+ }
+
+ public BrowserResult lastResult() {
+ return null;
+ }
+
+ public void dispose() {
+ }
+
+ public BrowserResult findResultWithId(String id, int browserId) {
+ return null;
+ }
+
+ public void logStatus(String message) {
+ }
+
+ public List getBrowsers() {
+ return Arrays.asList(new Browser[]{new Browser("browser.exe", 0)});
+ }
+
+ public int timeoutSeconds() {
+ return 0;
+ }
+
+ public boolean isAlive() {
+ return false;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/DistributedTestRunnerActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/DistributedTestRunnerActionTest.java
new file mode 100644
index 0000000..be9d6e8
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/DistributedTestRunnerActionTest.java
@@ -0,0 +1,44 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.DummyConfigurationSource;
+import net.jsunit.JsUnitFarmServer;
+import net.jsunit.RemoteServerHitter;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.model.TestRunResult;
+import org.jdom.Document;
+
+import java.net.URL;
+
+public class DistributedTestRunnerActionTest extends TestCase {
+
+ private DistributedTestRunnerAction action;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ action = new DistributedTestRunnerAction();
+ action.setFarmServer(new JsUnitFarmServer(new Configuration(new DummyConfigurationSource())));
+ action.setRemoteRunnerHitter(new SuccessfulRemoteServerHitter());
+ }
+
+ public void testSimple() throws Exception {
+ assertEquals(DistributedTestRunnerAction.SUCCESS, action.execute());
+ assertTrue(action.getTestRunManager().getDistributedTestRunResult().wasSuccessful());
+ assertNull(action.getTestRunManager().getOverrideURL());
+ }
+
+ public void testOverrideURL() throws Exception {
+ String overrideURL = "http://overrideurl.com:1234?foo=bar&bar=fo";
+ action.setUrl(overrideURL);
+ assertEquals(DistributedTestRunnerAction.SUCCESS, action.execute());
+ assertEquals(overrideURL, action.getTestRunManager().getOverrideURL());
+ }
+
+ static class SuccessfulRemoteServerHitter implements RemoteServerHitter {
+
+ public Document hitURL(URL url) {
+ return new Document(new TestRunResult().asXml());
+ }
+
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ErrorXmlRenderableTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ErrorXmlRenderableTest.java
new file mode 100644
index 0000000..531e1b7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ErrorXmlRenderableTest.java
@@ -0,0 +1,12 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.utility.XmlUtility;
+
+public class ErrorXmlRenderableTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ ErrorXmlRenderable renderable = new ErrorXmlRenderable("a message");
+ assertEquals("a message", XmlUtility.asString(renderable.asXml()));
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/FarmServerConfigurationActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/FarmServerConfigurationActionTest.java
new file mode 100644
index 0000000..4365c82
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/FarmServerConfigurationActionTest.java
@@ -0,0 +1,108 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.BlowingUpRemoteServerHitter;
+import net.jsunit.DummyConfigurationSource;
+import net.jsunit.JsUnitFarmServer;
+import net.jsunit.MockRemoteServerHitter;
+import net.jsunit.configuration.Configuration;
+import net.jsunit.configuration.ServerType;
+import net.jsunit.utility.XmlUtility;
+import org.jdom.CDATA;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.filter.Filter;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class FarmServerConfigurationActionTest extends TestCase {
+
+ private FarmServerConfigurationAction action;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ action = new FarmServerConfigurationAction();
+ Configuration configuration = new Configuration(new DummyConfigurationSource());
+ JsUnitFarmServer server = new JsUnitFarmServer(configuration);
+ action.setFarmServer(server);
+ }
+
+ public void testSimple() throws Exception {
+ MockRemoteServerHitter mockHitter = new MockRemoteServerHitter();
+ Configuration configuration1 = configuration1();
+ Configuration configuration2 = configuration2();
+ mockHitter.urlToDocument.put(DummyConfigurationSource.REMOTE_URL_1 + "/config", new Document(configuration1.asXml(ServerType.FARM)));
+ mockHitter.urlToDocument.put(DummyConfigurationSource.REMOTE_URL_2 + "/config", new Document(configuration2.asXml(ServerType.FARM)));
+ action.setRemoteRunnerHitter(mockHitter);
+ action.execute();
+ assertEquals(2, mockHitter.urlsPassed.size());
+ String xml = XmlUtility.asString(action.getXmlRenderable().asXml());
+ assertEquals(
+ "" +
+ "" +
+ XmlUtility.asString(configuration1.asXml(ServerType.FARM)) +
+ "" +
+ "" +
+ XmlUtility.asString(configuration2.asXml(ServerType.FARM)) +
+ "" +
+ "",
+ xml
+ );
+ }
+
+ public void testCrashingRemoteURLs() throws Exception {
+ action.setRemoteRunnerHitter(new BlowingUpRemoteServerHitter());
+ action.execute();
+ Element rootElement = action.getXmlRenderable().asXml();
+ List stackTraceElements = getCDATAExceptionStackTracesUnder(rootElement);
+ assertEquals(2, stackTraceElements.size());
+ for (CDATA stackTraceElement : stackTraceElements)
+ stackTraceElement.detach();
+
+ String xml = XmlUtility.asString(rootElement);
+ assertEquals(
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "" +
+ "",
+ xml
+ );
+ }
+
+ private List getCDATAExceptionStackTracesUnder(Element rootElement) {
+ Iterator it = rootElement.getDescendants(new Filter() {
+ public boolean matches(Object arg0) {
+ return arg0 instanceof CDATA;
+ }
+ });
+ List stackTraceElements = new ArrayList();
+ while (it.hasNext()) {
+ CDATA next = (CDATA) it.next();
+ stackTraceElements.add(next);
+ }
+ return stackTraceElements;
+ }
+
+ private Configuration configuration2() {
+ return new Configuration(new DummyConfigurationSource() {
+ public String url() {
+ return "http://www.2.example.com";
+ }
+ });
+ }
+
+ private Configuration configuration1() {
+ return new Configuration(new DummyConfigurationSource() {
+ public String url() {
+ return "http://www.1.example.com";
+ }
+ });
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/LatestVersionActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/LatestVersionActionTest.java
new file mode 100644
index 0000000..770214e
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/LatestVersionActionTest.java
@@ -0,0 +1,26 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.version.MockVersionGrabber;
+import net.jsunit.version.BlowingUpVersionGrabber;
+
+public class LatestVersionActionTest extends TestCase {
+ private LatestVersionAction action;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ action = new LatestVersionAction();
+ }
+
+ public void testGetLatestVersion() throws Exception {
+ action.setVersionGrabber(new MockVersionGrabber(43.21));
+ assertEquals(LatestVersionAction.SUCCESS, action.execute());
+ assertEquals(43.21, action.getLatestVersion());
+ }
+
+ public void testBlowUp() throws Exception {
+ action.setVersionGrabber(new BlowingUpVersionGrabber());
+ assertEquals(LatestVersionAction.ERROR, action.execute());
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultAcceptorActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultAcceptorActionTest.java
new file mode 100644
index 0000000..91dae73
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultAcceptorActionTest.java
@@ -0,0 +1,18 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.DummyBrowserResult;
+import net.jsunit.MockBrowserTestRunner;
+
+public class ResultAcceptorActionTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ ResultAcceptorAction action = new ResultAcceptorAction();
+ DummyBrowserResult dummyResult = new DummyBrowserResult(false, 1, 2);
+ action.setBrowserResult(dummyResult);
+ MockBrowserTestRunner mockRunner = new MockBrowserTestRunner();
+ action.setBrowserTestRunner(mockRunner);
+ assertEquals(ResultAcceptorAction.SUCCESS, action.execute());
+ assertSame(dummyResult, mockRunner.acceptedResult);
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultDisplayerActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultDisplayerActionTest.java
new file mode 100644
index 0000000..c8c7553
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/ResultDisplayerActionTest.java
@@ -0,0 +1,62 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.InvalidBrowserIdException;
+import net.jsunit.MockBrowserTestRunner;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.utility.XmlUtility;
+
+public class ResultDisplayerActionTest extends TestCase {
+
+ private ResultDisplayerAction action;
+ private MockBrowserTestRunner mockRunner;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ action = new ResultDisplayerAction();
+ mockRunner = new MockBrowserTestRunner();
+ action.setBrowserTestRunner(mockRunner);
+ action.setId("12345");
+ action.setBrowserId(8);
+ }
+
+ public void testResultFound() throws Exception {
+ mockRunner.resultToReturn = new BrowserResult();
+ assertEquals(ResultDisplayerAction.SUCCESS, action.execute());
+ assertEquals("12345", mockRunner.idPassed);
+ assertEquals(8, mockRunner.browserIdPassed.intValue());
+ assertEquals(mockRunner.resultToReturn, action.getXmlRenderable());
+ }
+
+ public void testResultNotFound() throws Exception {
+ assertEquals(ResultDisplayerAction.SUCCESS, action.execute());
+ assertEquals("12345", mockRunner.idPassed);
+ assertEquals(8, mockRunner.browserIdPassed.intValue());
+ assertEquals("No Test Result has been submitted with ID '12345' for browser ID '8'", XmlUtility.asString(action.getXmlRenderable().asXml()));
+ }
+
+ public void testIdNotGiven() throws Exception {
+ action.setId(null);
+ action.setBrowserId(null);
+ assertEquals(ResultDisplayerAction.ERROR, action.execute());
+ assertNull(mockRunner.idPassed);
+ assertNull(mockRunner.browserIdPassed);
+ assertEquals("A Test Result ID and a browser ID must both be given", XmlUtility.asString(action.getXmlRenderable().asXml()));
+ }
+
+ public void testInvalidBrowserId() throws Exception {
+ action.setId("54321");
+ action.setBrowserId(12345);
+ mockRunner = new MockBrowserTestRunner() {
+ public BrowserResult findResultWithId(String id, int browserId) throws InvalidBrowserIdException {
+ super.findResultWithId(id, browserId);
+ throw new InvalidBrowserIdException(browserId);
+ }
+ };
+ action.setBrowserTestRunner(mockRunner);
+ assertEquals(ResultDisplayerAction.ERROR, action.execute());
+ assertEquals("54321", this.mockRunner.idPassed);
+ assertEquals(12345, this.mockRunner.browserIdPassed.intValue());
+ assertEquals("Invalid Browser ID '12345'", XmlUtility.asString(action.getXmlRenderable().asXml()));
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.java
new file mode 100644
index 0000000..d561584
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionSimultaneousRunBlockingTest.java
@@ -0,0 +1,60 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+
+public class TestRunnerActionSimultaneousRunBlockingTest extends TestCase {
+ private BlockingTestRunner runner;
+ private TestRunnerAction action1;
+ private TestRunnerAction action2;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ runner = new BlockingTestRunner();
+ action1 = new TestRunnerAction();
+ action1.setBrowserTestRunner(runner);
+ action2 = new TestRunnerAction();
+ action2.setBrowserTestRunner(runner);
+ }
+
+ public void testSimultaneousRequestsAreQueued() throws Exception {
+ Executor executor1 = new Executor(action1);
+ executor1.start();
+ waitTillRunnerIsBlocked(runner);
+ Executor executor2 = new Executor(action2);
+ executor2.start();
+ runner.blocked = false;
+ waitTillExecutorIsDead(executor1);
+ waitTillRunnerIsBlocked(runner);
+ runner.blocked = false;
+ waitTillExecutorIsDead(executor2);
+ }
+
+ private void waitTillExecutorIsDead(Executor executor) throws InterruptedException {
+ while (executor.isAlive())
+ Thread.sleep(10);
+ }
+
+ private void waitTillRunnerIsBlocked(BlockingTestRunner runner) throws InterruptedException {
+ while (!runner.blocked) {
+ Thread.sleep(10);
+ }
+ }
+
+ class Executor extends Thread {
+
+ private TestRunnerAction action;
+
+ public Executor(TestRunnerAction action) {
+ this.action = action;
+
+ }
+
+ public void run() {
+ try {
+ action.execute();
+ } catch (Exception e) {
+ fail();
+ }
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionTest.java
new file mode 100644
index 0000000..f67c7b6
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/action/TestRunnerActionTest.java
@@ -0,0 +1,98 @@
+package net.jsunit.action;
+
+import junit.framework.TestCase;
+import net.jsunit.BrowserLaunchSpecification;
+import net.jsunit.MockBrowserTestRunner;
+import net.jsunit.model.ResultType;
+import net.jsunit.utility.XmlUtility;
+
+public class TestRunnerActionTest extends TestCase {
+
+ private TestRunnerAction action;
+ private MockBrowserTestRunner mockRunner;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ action = new TestRunnerAction();
+ mockRunner = new MockBrowserTestRunner();
+ mockRunner.hasReceivedResult = true;
+ action.setBrowserTestRunner(mockRunner);
+ }
+
+ public void testSuccess() throws Exception {
+ mockRunner.shouldSucceed = true;
+ assertEquals(TestRunnerAction.SUCCESS, action.execute());
+ String xmlString = XmlUtility.asString(action.getXmlRenderable().asXml());
+ assertTrue(xmlString.startsWith("Invalid browser ID: 34", XmlUtility.asString(action.getXmlRenderable().asXml()));
+ }
+
+ public void testLimitToBrowserWithNonIntegerId() throws Exception {
+ action.setBrowserId("foo");
+ action.execute();
+ assertEquals(TestRunnerAction.ERROR, action.execute());
+ assertTrue(mockRunner.launchSpecs.isEmpty());
+ assertEquals("Invalid browser ID: foo", XmlUtility.asString(action.getXmlRenderable().asXml()));
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserResultInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserResultInterceptorTest.java
new file mode 100644
index 0000000..04e28a2
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserResultInterceptorTest.java
@@ -0,0 +1,56 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.Action;
+import junit.framework.TestCase;
+import net.jsunit.DummyHttpRequest;
+import net.jsunit.action.BrowserResultAware;
+import net.jsunit.model.BrowserResult;
+import net.jsunit.model.BrowserResultWriter;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+public class BrowserResultInterceptorTest extends TestCase {
+
+ public void setUp() throws Exception {
+ super.setUp();
+ Map requestMap = new HashMap();
+ requestMap.put(BrowserResultWriter.ID, new String[]{"ID_foo"});
+ requestMap.put(BrowserResultWriter.USER_AGENT, new String[]{"user agent"});
+ requestMap.put(BrowserResultWriter.TIME, new String[]{"4.3"});
+ requestMap.put(BrowserResultWriter.JSUNIT_VERSION, new String[]{"2.5"});
+ requestMap.put(BrowserResultWriter.TEST_CASES, new String[]{"file:///dummy/path/dummyPage.html:testFoo|1.3|S||"});
+ HttpServletRequest request = new DummyHttpRequest(requestMap);
+ ServletActionContext.setRequest(request);
+ }
+
+ public void tearDown() throws Exception {
+ ServletActionContext.setRequest(null);
+ super.tearDown();
+ }
+
+ public void testSimple() throws Exception {
+ BrowserResultInterceptor interceptor = new BrowserResultInterceptor();
+ MockAction action = new MockAction();
+ MockActionInvocation invocation = new MockActionInvocation(action);
+ interceptor.intercept(invocation);
+ assertEquals("ID_foo", action.result.getId());
+ }
+
+ static class MockAction implements Action, BrowserResultAware {
+
+ private BrowserResult result;
+
+ public String execute() throws Exception {
+ return null;
+ }
+
+ public void setBrowserResult(BrowserResult result) {
+ this.result = result;
+ }
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.java
new file mode 100644
index 0000000..0231f79
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/BrowserTestRunnerInterceptorTest.java
@@ -0,0 +1,47 @@
+package net.jsunit.interceptor;
+
+import junit.framework.TestCase;
+import net.jsunit.BrowserTestRunner;
+import net.jsunit.MockBrowserTestRunner;
+import net.jsunit.XmlRenderable;
+import net.jsunit.action.JsUnitBrowserTestRunnerAction;
+
+public class BrowserTestRunnerInterceptorTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ MockJsUnitAction action = new MockJsUnitAction();
+ final BrowserTestRunner mockRunner = new MockBrowserTestRunner();
+ BrowserTestRunnerInterceptor.setBrowserTestRunnerSource(new BrowserTestRunnerSource() {
+ public BrowserTestRunner getRunner() {
+ return mockRunner;
+ }
+
+ });
+ assertNull(action.getBrowserTestRunner());
+ BrowserTestRunnerInterceptor interceptor = new BrowserTestRunnerInterceptor();
+
+ MockActionInvocation mockInvocation = new MockActionInvocation(action);
+ interceptor.intercept(mockInvocation);
+
+ assertSame(mockRunner, action.getBrowserTestRunner());
+ assertTrue(mockInvocation.wasInvokeCalled);
+ }
+
+ public void tearDown() throws Exception {
+ BrowserTestRunnerInterceptor.setBrowserTestRunnerSource(new DefaultBrowserTestRunnerSource());
+ super.tearDown();
+ }
+
+ static class MockJsUnitAction extends JsUnitBrowserTestRunnerAction {
+
+ public String execute() throws Exception {
+ return null;
+ }
+
+ public XmlRenderable getXmlRenderable() {
+ return null;
+ }
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/FarmServerInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/FarmServerInterceptorTest.java
new file mode 100644
index 0000000..5aed5f7
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/FarmServerInterceptorTest.java
@@ -0,0 +1,37 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import junit.framework.TestCase;
+import net.jsunit.DummyConfigurationSource;
+import net.jsunit.JsUnitFarmServer;
+import net.jsunit.action.JsUnitServerAware;
+import net.jsunit.configuration.Configuration;
+
+public class FarmServerInterceptorTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ MockAction action = new MockAction();
+ JsUnitFarmServer server = new JsUnitFarmServer(new Configuration(new DummyConfigurationSource()));
+ assertNull(action.farmServer);
+ FarmServerInterceptor interceptor = new FarmServerInterceptor();
+
+ MockActionInvocation mockInvocation = new MockActionInvocation(action);
+ interceptor.intercept(mockInvocation);
+
+ assertSame(server, action.farmServer);
+ assertTrue(mockInvocation.wasInvokeCalled);
+ }
+
+ static class MockAction implements Action, JsUnitServerAware {
+ public JsUnitFarmServer farmServer;
+
+ public String execute() throws Exception {
+ return null;
+ }
+
+ public void setFarmServer(JsUnitFarmServer farmServer) {
+ this.farmServer = farmServer;
+ }
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/MockActionInvocation.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/MockActionInvocation.java
new file mode 100644
index 0000000..2803e4f
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/MockActionInvocation.java
@@ -0,0 +1,59 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.*;
+import com.opensymphony.xwork.interceptor.PreResultListener;
+import com.opensymphony.xwork.util.OgnlValueStack;
+
+public class MockActionInvocation implements ActionInvocation {
+
+ private Action action;
+ public boolean wasInvokeCalled;
+
+ public MockActionInvocation(Action action) {
+ this.action = action;
+ }
+
+ public Action getAction() {
+ return action;
+ }
+
+ public boolean isExecuted() {
+ return false;
+ }
+
+ public ActionContext getInvocationContext() {
+ return null;
+ }
+
+ public ActionProxy getProxy() {
+ return null;
+ }
+
+ public Result getResult() throws Exception {
+ return null;
+ }
+
+ public String getResultCode() {
+ return null;
+ }
+
+ public void setResultCode(String string) {
+ }
+
+ public OgnlValueStack getStack() {
+ return null;
+ }
+
+ public void addPreResultListener(PreResultListener arg0) {
+ }
+
+ public String invoke() throws Exception {
+ wasInvokeCalled = true;
+ return null;
+ }
+
+ public String invokeActionOnly() throws Exception {
+ return null;
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.java
new file mode 100644
index 0000000..7f4eec5
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RemoteRunnerHitterInterceptorTest.java
@@ -0,0 +1,34 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.xwork.Action;
+import junit.framework.TestCase;
+import net.jsunit.RemoteMachineServerHitter;
+import net.jsunit.RemoteServerHitter;
+import net.jsunit.action.RemoteRunnerHitterAware;
+
+public class RemoteRunnerHitterInterceptorTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ RemoteRunnerHitterInterceptor interceptor = new RemoteRunnerHitterInterceptor();
+ MockAction action = new MockAction();
+ MockActionInvocation invocation = new MockActionInvocation(action);
+ interceptor.intercept(invocation);
+ assertNotNull(action.hitter);
+ assertTrue(action.hitter instanceof RemoteMachineServerHitter);
+ }
+
+ static class MockAction implements RemoteRunnerHitterAware, Action {
+
+ private RemoteServerHitter hitter;
+
+ public String execute() throws Exception {
+ return null;
+ }
+
+ public void setRemoteRunnerHitter(RemoteServerHitter hitter) {
+ this.hitter = hitter;
+ }
+
+ }
+
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RequestSourceInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RequestSourceInterceptorTest.java
new file mode 100644
index 0000000..1a6a7a8
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/RequestSourceInterceptorTest.java
@@ -0,0 +1,44 @@
+package net.jsunit.interceptor;
+
+import com.opensymphony.webwork.ServletActionContext;
+import com.opensymphony.xwork.Action;
+import junit.framework.TestCase;
+import net.jsunit.DummyHttpRequest;
+import net.jsunit.action.RequestSourceAware;
+
+import java.util.HashMap;
+
+public class RequestSourceInterceptorTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ DummyHttpRequest request = new DummyHttpRequest(new HashMap());
+ request.setIpAddress("123.456.78.9");
+ request.setHost("www.example.com");
+ ServletActionContext.setRequest(request);
+ RequestSourceInterceptor interceptor = new RequestSourceInterceptor();
+ RequestSourceAction action = new RequestSourceAction();
+ MockActionInvocation invocation = new MockActionInvocation(action);
+ interceptor.intercept(invocation);
+ assertTrue(invocation.wasInvokeCalled);
+
+ assertEquals("123.456.78.9", action.ipAddress);
+ assertEquals("www.example.com", action.host);
+ }
+
+ static class RequestSourceAction implements RequestSourceAware, Action {
+ private String ipAddress;
+ private String host;
+
+ public void setRequestIPAddress(String ipAddress) {
+ this.ipAddress = ipAddress;
+ }
+
+ public void setRequestHost(String host) {
+ this.host = host;
+ }
+
+ public String execute() throws Exception {
+ return null;
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/VersionGrabberInterceptorTest.java b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/VersionGrabberInterceptorTest.java
new file mode 100644
index 0000000..5ae60a1
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/java/tests_server/net/jsunit/interceptor/VersionGrabberInterceptorTest.java
@@ -0,0 +1,32 @@
+package net.jsunit.interceptor;
+
+import junit.framework.TestCase;
+import com.opensymphony.xwork.Action;
+import net.jsunit.action.VersionGrabberAware;
+import net.jsunit.version.VersionGrabber;
+import net.jsunit.version.JsUnitWebsiteVersionGrabber;
+
+public class VersionGrabberInterceptorTest extends TestCase {
+
+ public void testSimple() throws Exception {
+ VersionGrabberInterceptor interceptor = new VersionGrabberInterceptor();
+ VersionGrabberAction action = new VersionGrabberAction();
+ MockActionInvocation invocation = new MockActionInvocation(action);
+ interceptor.intercept(invocation);
+ assertNotNull(action.versionGrabber);
+ assertTrue(action.versionGrabber instanceof JsUnitWebsiteVersionGrabber);
+ assertTrue(invocation.wasInvokeCalled);
+ }
+
+ static class VersionGrabberAction implements Action, VersionGrabberAware {
+ private VersionGrabber versionGrabber;
+
+ public String execute() throws Exception {
+ return null;
+ }
+
+ public void setVersionGrabber(VersionGrabber versionGrabber) {
+ this.versionGrabber = versionGrabber;
+ }
+ }
+}
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/JDOM_license.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/JDOM_license.txt
new file mode 100644
index 0000000..86e1d54
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/JDOM_license.txt
@@ -0,0 +1,56 @@
+/*--
+
+ $Id: JDOM_license.txt 81 2003-07-24 04:44:54Z edwardhieatt $
+
+ Copyright (C) 2000-2003 Jason Hunter & Brett McLaughlin.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions, and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions, and the disclaimer that follows
+ these conditions in the documentation and/or other materials
+ provided with the distribution.
+
+ 3. The name "JDOM" must not be used to endorse or promote products
+ derived from this software without prior written permission. For
+ written permission, please contact .
+
+ 4. Products derived from this software may not be called "JDOM", nor
+ may "JDOM" appear in their name, without prior written permission
+ from the JDOM Project Management .
+
+ In addition, we request (but do not require) that you include in the
+ end-user documentation provided with the redistribution and/or in the
+ software itself an acknowledgement equivalent to the following:
+ "This product includes software developed by the
+ JDOM Project (http://www.jdom.org/)."
+ Alternatively, the acknowledgment may be graphical using the logos
+ available at http://www.jdom.org/images/logos.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many
+ individuals on behalf of the JDOM Project and was originally
+ created by Jason Hunter and
+ Brett McLaughlin . For more information on
+ the JDOM Project, please see .
+
+ */
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/Jetty_license.html b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/Jetty_license.html
new file mode 100644
index 0000000..9e470e3
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/Jetty_license.html
@@ -0,0 +1,213 @@
+
+
+ Jetty License
+
+
+
+
+
Jetty License
+
$Revision$
+
+Preamble:
+
+
+
+ The intent of this document is to state the conditions under which the
+ Jetty Package may be copied, such that the Copyright Holder maintains some
+ semblance of control over the development of the package, while giving the
+ users of the package the right to use, distribute and make reasonable
+ modifications to the Package in accordance with the goals and ideals of
+ the Open Source concept as described at
+ http://www.opensource.org.
+
+
+ It is the intent of this license to allow commercial usage of the Jetty
+ package, so long as the source code is distributed or suitable visible
+ credit given or other arrangements made with the copyright holders.
+
+
Definitions:
+
+
+
+
+
"Jetty" refers to the collection of Java classes that are
+ distributed as a HTTP server with servlet capabilities and
+ associated utilities.
+
+
+
+
"Package" refers to the collection of files distributed by the
+ Copyright Holder, and derivatives of that collection of files
+ created through textual modification.
+
+
+
+
"Standard Version" refers to such a Package if it has not been
+ modified, or has been modified in accordance with the wishes
+ of the Copyright Holder.
+
+
+
+
"Copyright Holder" is whoever is named in the copyright or
+ copyrights for the package.
+ Mort Bay Consulting Pty. Ltd. (Australia) is the "Copyright
+ Holder" for the Jetty package.
+
+
+
+
"You" is you, if you're thinking about copying or distributing
+ this Package.
+
+
+
+
"Reasonable copying fee" is whatever you can justify on the
+ basis of media cost, duplication charges, time of people involved,
+ and so on. (You will not be required to justify it to the
+ Copyright Holder, but only to the computing community at large
+ as a market that must bear the fee.)
+
+
+
+
"Freely Available" means that no fee is charged for the item
+ itself, though there may be fees involved in handling the item.
+ It also means that recipients of the item may redistribute it
+ under the same conditions they received it.
+
+
+
+
+0. The Jetty Package is Copyright (c) Mort Bay Consulting Pty. Ltd.
+(Australia) and others. Individual files in this package may contain
+additional copyright notices. The javax.servlet packages are copyright
+Sun Microsystems Inc.
+
+ 1. The Standard Version of the Jetty package is
+ available from http://jetty.mortbay.org.
+
+
+
+ 2. You may make and distribute verbatim copies of the source form
+ of the Standard Version of this Package without restriction, provided that
+ you include this license and all of the original copyright notices
+ and associated disclaimers.
+
+
+
+ 3. You may make and distribute verbatim copies of the compiled form of the
+ Standard Version of this Package without restriction, provided that you
+ include this license.
+
+
+
+ 4. You may apply bug fixes, portability fixes and other modifications
+ derived from the Public Domain or from the Copyright Holder. A Package
+ modified in such a way shall still be considered the Standard Version.
+
+
+
+ 5. You may otherwise modify your copy of this Package in any way, provided
+ that you insert a prominent notice in each changed file stating how and
+ when you changed that file, and provided that you do at least ONE of the
+ following:
+
+
+
+
+ a) Place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or
+ an equivalent medium, or placing the modifications on a major archive
+ site such as ftp.uu.net, or by allowing the Copyright Holder to include
+ your modifications in the Standard Version of the Package.
+
+ b) Use the modified Package only within your corporation or organization.
+
+
+
+ c) Rename any non-standard classes so the names do not conflict
+ with standard classes, which must also be provided, and provide
+ a separate manual page for each non-standard class that clearly
+ documents how it differs from the Standard Version.
+
+
+
+ d) Make other arrangements with the Copyright Holder.
+
+
+
+
+6. You may distribute modifications or subsets of this Package in source
+code or compiled form, provided that you do at least ONE of the following:
+
+
+ a) Distribute this license and all original copyright messages, together
+ with instructions (in the about dialog, manual page or equivalent) on where
+ to get the complete Standard Version.
+
+ b) Accompany the distribution with the machine-readable source of
+ the Package with your modifications. The modified package must include
+ this license and all of the original copyright notices and associated
+ disclaimers, together with instructions on where to get the complete
+ Standard Version.
+
+
+
+ c) Make other arrangements with the Copyright Holder.
+
+
+
+
+7. You may charge a reasonable copying fee for any distribution of this
+Package. You may charge any fee you choose for support of this Package.
+You may not charge a fee for this Package itself. However,
+you may distribute this Package in aggregate with other (possibly
+commercial) programs as part of a larger (possibly commercial) software
+distribution provided that you meet the other distribution requirements
+of this license.
+
+ 8. Input to or the output produced from the programs of this Package
+ do not automatically fall under the copyright of this Package, but
+ belong to whomever generated them, and may be sold commercially, and
+ may be aggregated with this Package.
+
+
+
+ 9. Any program subroutines supplied by you and linked into this Package
+ shall not be considered part of this Package.
+
+
+
+ 10. The name of the Copyright Holder may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+
+
+ 11. This license may change with each release of a Standard Version of
+ the Package. You may choose to use the license associated with version
+ you are using or the license of the latest Standard Version.
+
+
+
+ 12. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+
+
+ 13. If any superior law implies a warranty, the sole remedy under such shall
+ be , at the Copyright Holders option either a) return of any price paid or
+ b) use or reasonable endeavours to repair or replace the software.
+
+
+
+ 14. This license shall be read under the laws of Australia.
+
+
+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/MPL-1.1.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/MPL-1.1.txt
new file mode 100644
index 0000000..7a45bfe
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/MPL-1.1.txt
@@ -0,0 +1,470 @@
+ MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/gpl-2.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/gpl-2.txt
new file mode 100644
index 0000000..45645b4
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/gpl-2.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/index.html b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/index.html
new file mode 100644
index 0000000..7df3cfb
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/index.html
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+ Licensing
+
+
+
+
+
JDOM: Portions of this software are copyright Copyright (C) 2000-2003 Jason Hunter & Brett McLaughlin. All
+ rights reserved. See JDOM_license.txt.
+
Jetty: Portions of this software are copyright � Mort Bay Consulting Pty. Ltd. (Australia) and others. All
+ Rights Reserved. See Jetty_license.html.
+
Individual files in this package may contain additional copyright notices. The javax.servlet packages are
+ copyright Sun Microsystems Inc. All Rights Reserved.
+
+
+
+
JsUnit licenses:
+ JsUnit is licensed under 3 different licenses giving you the freedom
+ to use, modify and distribute JsUnit in a variety of fashions.
+
+
+
+
+ Every Java and JavaScript source file in this distribution should be considered to be under the following licensing
+ terms.
+
+ ***** BEGIN LICENSE BLOCK *****
+ - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ -
+ - The contents of this file are subject to the Mozilla Public License Version
+ - 1.1 (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ - http://www.mozilla.org/MPL/
+ -
+ - Software distributed under the License is distributed on an "AS IS" basis,
+ - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ - for the specific language governing rights and limitations under the
+ - License.
+ -
+ - The Original Code is Edward Hieatt code.
+ -
+ - The Initial Developer of the Original Code is
+ - Edward Hieatt, edward@jsunit.net.
+ - Portions created by the Initial Developer are Copyright (C) 2003
+ - the Initial Developer. All Rights Reserved.
+ -
+ - Author Edward Hieatt, edward@jsunit.net
+ -
+ - Alternatively, the contents of this file may be used under the terms of
+ - either the GNU General Public License Version 2 or later (the "GPL"), or
+ - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ - in which case the provisions of the GPL or the LGPL are applicable instead
+ - of those above. If you wish to allow use of your version of this file only
+ - under the terms of either the GPL or the LGPL, and not to allow others to
+ - use your version of this file under the terms of the MPL, indicate your
+ - decision by deleting the provisions above and replace them with the notice
+ - and other provisions required by the LGPL or the GPL. If you do not delete
+ - the provisions above, a recipient may use your version of this file under
+ - the terms of any one of the MPL, the GPL or the LGPL.
+ -
+ - ***** END LICENSE BLOCK *****
+
+
+
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/lgpl-2.1.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/lgpl-2.1.txt
new file mode 100644
index 0000000..cbee875
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/lgpl-2.1.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-c.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-c.txt
new file mode 100644
index 0000000..bd3ad22
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-c.txt
@@ -0,0 +1,35 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is __________________________________________.
+ *
+ * The Initial Developer of the Original Code is
+ * ____________________________________________.
+ * Portions created by the Initial Developer are Copyright (C) 2___
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-html.txt b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-html.txt
new file mode 100644
index 0000000..33f0980
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/licenses/mpl-tri-license-html.txt
@@ -0,0 +1,35 @@
+
diff --git a/ant-jsunit-hieatt/trunk/lib/jsunit/tests/data/data.html b/ant-jsunit-hieatt/trunk/lib/jsunit/tests/data/data.html
new file mode 100644
index 0000000..f872420
--- /dev/null
+++ b/ant-jsunit-hieatt/trunk/lib/jsunit/tests/data/data.html
@@ -0,0 +1,218 @@
+
+
+
+
+ test
+
+
+
+
This page contains tests for the version checking code in JsUnit that looks to see whether a newer version of JsUnit
+ is available. To see them, take a look at the source.