Skip to content

Commit

Permalink
Add some TestSwarm reporting hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Dec 21, 2010
1 parent 55ccae8 commit 9ca81b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions source/test/unit/ui/browser/test_runner.js
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion test/testswarm.pl
Expand Up @@ -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.

Expand Down

0 comments on commit 9ca81b5

Please sign in to comment.