Implementation:SeleniumHQ Selenium Closure Testing TestRunner
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing a singleton test runner that executes TestCases and exposes results to Selenium for automation, used by Selenium JavaScript atoms.
Description
goog.testing.TestRunner is a vendored copy of the Google Closure Library module. It is a singleton object that executes goog.testing.TestCase instances, displays results in the DOM, and exposes hooks for Selenium automation (G_testRunner.isFinished(), isSuccess(), getReport(), getRunTime(), getTestResults()). It auto-discovers JsUnit-style test pages if no TestCase is registered by window.onload. It tracks errors, manages test case references, and supports error filtering. Selenium uses this as part of its JavaScript atom infrastructure.
Usage
This module is consumed internally by Selenium's JavaScript atoms build system. Not imported directly by end users.
Code Reference
Source Location
- Repository: SeleniumHQ_Selenium
- File: third_party/closure/goog/testing/testrunner.js
- Lines: 1-559
Key Exports
goog.provide('goog.testing.TestRunner');
goog.testing.TestRunner = function() { ... };
// this.errors = [];
// this.testCase = null;
// this.initialized = false;
// Selenium hooks:
// G_testRunner.isFinished()
// G_testRunner.isSuccess()
// G_testRunner.getReport()
// G_testRunner.getRunTime()
// G_testRunner.getTestResults()