Web Worker Harness for test262

Web Workers allow running scripts in the background without blocking or freezing the user interface. By using Web Workers to run non-UI scripts in the background, your application can take advantage of multiple cores on your machine to execute scripts concurrently.

This demo kicks off a set of JavaScript functional tests. They are run both on the UI thread and in the background via Web Workers to showcase the relative performance of each approach.

Loading... Loading...



Tests To Run: 2731 | Total Tests Ran: | Pass: | Fail: | Failed To Load:

Executing Test: View failures


Tests To Run: 2731 | Total Tests Ran: | Pass: | Fail: |  Failed To Load:

Executing Test: View failures



The JavaScript functional tests in this demo are a subset of the tests from the test262 test suite for ECMAScript, a test suite sponsored by ECMA. These tests are based on a June 15th, 2011 snapshot of the tests that we’ve submitted to test262 for Chapter 15.2. The tests execute in two modes. When run on the UI thread, a traditional single threaded JavaScript execution model is used, wherein script yields control to the UI thread after each test is executed to update the progress bar. When run using Web Workers, a single Web Worker is spawned to run the tests in the background; upon completion of each test an asynchronous message is posted from the Web Worker to the UI thread to update the progress bar. Due to the concurrent execution of script and asynchronous nature of message passing from the Worker, using Web Workers help complete the validation much faster.

To run the latest version of full test262 suite on your browser to check how closely it follows the ECMAScript 5th Edition Language Specification, visit http://test262.ecmascript.org/.