test262: Industry JavaScript Standards Test Available

This is a great week for the Web, in particular JavaScript developers. Standards bodies have ratified the latest version of JavaScript, ECMA-262 edition 5.1, and have published the test262 test suite for JavaScript. Now, anyone can run the test suite at https://test262.ecmascript.org/ and compare how well different browsers support the standard. The suite already has over 10,000 tests contributed by members of JavaScript technical committee as well as all the JavaScript tests that we have posted on the IE Testing Center.

Standardized test suites are important for Web interoperability and enabling the same markup to work consistently across browsers and devices. ISO ratification unblocks some government agencies. We congratulate the committee and the standards bodies for achieving this important milestone.

Screenshot of the test262 from https://test262.ecmascript.org
Screenshot of the test262 from https://test262.ecmascript.org/

test262

Comprehensive test suites that come from a standards body working with the community are crucial for the Web, and Web interoperability, to make progress.

test262 is a strong step forward. The standards body responsible for JavaScript, Ecma International, has created a new home this test that anyone can run in their own browser. The results report shows how closely the browser you’re using follows the standard specification according to these tests.

During IE9 development, we published JavaScript tests on the IE Testing Center and worked closely with other participants in the JavaScript standard, Ecma Technical Committee 39 (TC39), to create an official test suite for ECMAScript sponsored by Ecma. 

Microsoft has contributed over 5,700 JavaScript tests from the IE Testing Center and will continue to submit them to the test262 project to help build a comprehensive test suite.  Together with tests contributed by other members of TC39 the suite already has over 10,000 tests.

You can see how closely the tests and the spec align:

Diagram showing how closely the tests and the spec align

ES5 SpecTest262 results page

The test262 site continues to be a work in progress, and TC39 members are still developing the test suite. While the suite is not complete yet, it is interesting to note how interoperable some of the same script is across different browsers:

Results of running the test262 in different browsers run on June 30, 2011
Results of running the test262 in different browsers run on June 30, 2011

We welcome your feedback. You can find the test cases Microsoft has developed at the IE Testing Center.

You can also submit feedback to ECMAScript.org via bug submissions. We also invite you to contribute to Test262 in other ways.

Web Workers: Running test262 Faster

You can use Web Workers to run test262 even faster. To demonstrate the promise of Web workers to make the Web faster overall, we’ve published a test drive that runs the tests from the standards body using Web workers.

Helpful Posts for Developers

For reference, here are recent blot posts covering the new features and developer productivity that come with ECMAScript 5:

Developers have great opportunities as the industry builds out more interoperable Web technologies. To take advantage of them, we recommend that developers test their sites in IE9 Standards Mode and try out ES5. The source code of test drive samples are a good starting point: ES5 Arrays, ES5 Breakout, an ES5 enabled version of Poker, and in IE10 Platform Preview TryStrict as well as the WebWorker harness for test262.

In addition to these posts and demos, there are other excellent discussions online which explore ECMAScript 5 in detail.

We’re very excited to have an official ECMA sponsored ES5 test suite site up and running for the JavaScript community.

-- Alex Chi, JavaScript Test Manager