Permalink
Browse files

Add some TestSwarm reporting hooks.

  • Loading branch information...
1 parent 55ccae8 commit 9ca81b5152f6efaf115b8708d69bd5c3212675e5 @jcoglan committed Dec 21, 2010
Showing with 15 additions and 1 deletion.
  1. +14 −0 source/test/unit/ui/browser/test_runner.js
  2. +1 −1 test/testswarm.pl
@@ -50,6 +50,20 @@ JS.Test.Unit.UI.extend({
this._mediator.addListener(JS.Test.Unit.UI.TestRunnerMediator.FINISHED, this.method('_finished'));
this._mediator.addListener(JS.Test.Unit.TestCase.STARTED, this.method('_testStarted'));
this._mediator.addListener(JS.Test.Unit.TestCase.FINISHED, this.method('_testFinished'));
+
+ if (!window.TestSwarm) return;
+
+ TestSwarm.serialize = function() { return 'HTML' };
+ this._mediator.addListener(JS.Test.Unit.TestCase.FINISHED, TestSwarm.heartbeat);
+
+ this._mediator.addListener(JS.Test.Unit.UI.TestRunnerMediator.FINISHED,
+ function() {
+ TestSwarm.submit({
+ fail: this._result.failureCount(),
+ error: this._result.errorCount(),
+ total: this._result.runCount()
+ });
+ }, this);
},
_startMediator: function() {
View
@@ -13,7 +13,7 @@
# Your authorization token.
-my $AUTH_TOKEN = "c4295e3bceb94d8c44946d7d1f3db967fcba88eb";
+my $AUTH_TOKEN = "96a844c8a3ec643b249dabfedb505238db43e512";
# The maximum number of times you want the tests to be run.

0 comments on commit 9ca81b5

Please sign in to comment.