Home

# Class goog.testing.MultiTestRunner

A component for running multiple tests within the browser.

extends goog.ui.Component

Instance Method Summary
| `addTests(?Array.<string> tests) ⇒ ?goog.testing.MultiTestRunner` Adds an array of tests to the tests that the test runner should execute.
| `clearStats_()` Clears the stats page.
| `createDom()` Creates the initial DOM representation for the component. The default implementation is to set this.element_ = div.
| `disposeInternal()` Disposes of the component. Calls {@code exitDocument}, which is expected to remove event handlers and clean up the component. Propagates the call to the component's children, if any. Removes the component's DOM from the document unless it was decorated.
| `drawFilesHistogram_()` Draws the histogram showing number of files loaded.
| `drawProgressSegment_(string title, <Any Type> success)` Adds a segment to the progress bar.
| `drawRunTimePie_()` Draws a pie chart showing the percentage of time spent running the tests compared to loading them etc.
| `drawStatsHistogram_(string statsField, number bucketSize, function (*, ...[*]): * valueTransformFn, number width, string title)` Draws a stats histogram.
| `drawStats_()` Draws the stats for the test run.
| `drawTestResult_(string test, <Any Type> success, string report)` Draws a test result in the report pane.
| `drawTimeHistogram_()` Draws the histogram showing how long each test took to complete.
| `drawWorstTestsTable_()` Draws a pie chart showing the percentage of time spent running the tests compared to loading them etc.
| `finish_()` Handles the test finishing, processing the results and rendering the report.
| `getAllTests() ⇒ ?Array.<string>` Returns the list of all tests added to the runner.
| `getBasePath() ⇒ string` Returns the basepath that tests added using addTests are resolved with.
| `getFilterFunction() ⇒ function (string): boolean` Returns a filter function. Only test paths that match the filter function will be executed.
| `getHidePasses() ⇒ boolean` Returns whether the report should contain passing tests at all, makes setVerbosePasses obsolete.
| `getName() ⇒ string` Returns the name for the test suite.
| `getPoolSize() ⇒ number` Returns the number of tests that can be run at the same time. This only improves performance due to the amount of time spent loading the tests.
| `getTestsThatFailed() ⇒ ?Array.<string>` Returns a list of tests from runner that have been marked as failed.
| `getTestsToRun() ⇒ ?Array.<string>` Returns the list of tests that will be run when start() is called.
| `getTimeStamp_() ⇒ string` Returns the current timestamp.
| `getTimeout() ⇒ number` Returns the number of milliseconds to wait for the page to load, initialize and run the tests.
| `getVerbosePasses() ⇒ boolean` Returns whether the report should contain verbose information for tests that pass.
| `log(string msg)` Logs a message to the log window.
| `onLogTabClicked_(?goog.events.BrowserEvent e)` Handles the log tab being clicked.
| `onReportTabClicked_(?goog.events.BrowserEvent e)` Handles the log tab being clicked.
| `onStartClicked_(?goog.events.BrowserEvent e)` Handles the start button being clicked.
| `onStatsTabClicked_(?goog.events.BrowserEvent e)` Handles the stats tab being clicked.
| `onStopClicked_(?goog.events.BrowserEvent e)` Handles the stop button being clicked.
| `processResult(?goog.testing.MultiTestRunner.TestFrame frame)` Processes a result returned from a TestFrame. If there are tests remaining it will trigger the next one to be run, otherwise if there are no tests and all results have been recieved then it will call finish.
| `resetProgressDom_()` Deletes and re-creates the progress table inside the progess element.
| `resetReport_()` Resets the report, clearing out all children and drawing the initial summary.
| `runNextTest_(?goog.testing.MultiTestRunner.TestFrame frame)` Runs the next available test, if there are any left.
| `setBasePath(string path) ⇒ ?goog.testing.MultiTestRunner` Sets the basepath that tests added using addTests are resolved with.
| `setFilterFunction(function (string): boolean filterFn) ⇒ ?goog.testing.MultiTestRunner` Sets a filter function. Only test paths that match the filter function will be executed.
| `setHidePasses(boolean hide) ⇒ ?goog.testing.MultiTestRunner` Sets whether the report should contain passing tests at all, makes setVerbosePasses obsolete.
| `setName(string name) ⇒ ?goog.testing.MultiTestRunner` Sets the name for the test suite.
| `setPoolSize(number size) ⇒ ?goog.testing.MultiTestRunner` Sets the number of tests that can be run at the same time. This only improves performance due to the amount of time spent loading the tests.
| `setStatsBucketSizes(number f, number t) ⇒ ?goog.testing.MultiTestRunner` Sets the bucket sizes for the histograms.
| `setTimeout(number timeout) ⇒ ?goog.testing.MultiTestRunner` Sets the number of milliseconds to wait for the page to load, initialize and run the tests.
| `setVerbosePasses(boolean verbose) ⇒ ?goog.testing.MultiTestRunner` Sets whether the report should contain verbose information for tests that pass.
| `showTab_(number tab)` Shows the report and hides the log if the argument is true.
| `start()` Starts executing the tests.
| `trimFileName_(string name) ⇒ string` Trims a filename to be less than 35-characters, ensuring that we do not break a path part.
| `writeCurrentSummary_()` Updates the report's summary.