Share via


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

Comments

  • Anonymous
    June 30, 2011
    This is just amazing. IE Team, I love you!

  • Anonymous
    June 30, 2011
    donde estan los trolls de firefox? de chrome?

  • Anonymous
    June 30, 2011
    The comment has been removed

  • Anonymous
    June 30, 2011
    IE team i have a question. Will the tabs in IE10 be like a retangle like they was in IE9  or will they be round like?  the rectangle tabs like thing is bugging me a lot. :(

  • Anonymous
    June 30, 2011
    IE team, I hope you will finally deliver a good browser to the market, after so many failures.

  • Anonymous
    June 30, 2011
    Half of this suite tests the support of JavaScript 'strict' mode, which is frankly not used anywhere as far as I know. But still, I'm impressed that IE is the leader in standard compliance :)

  • Anonymous
    June 30, 2011
    Half of this suite tests the support of JavaScript 'strict' mode, which is frankly not used anywhere as far as I know. But still, I'm impressed that IE is the leader in standard compliance :)

  • Anonymous
    June 30, 2011
    Web Workers: Running test262 Faster. Now refurbished throughout the test suite. It is a great time saver.

  • Anonymous
    June 30, 2011
    Some communication for this test effort is a good thing. Thanks! See you on bugs.ecmascript.org ;-)

  • Anonymous
    June 30, 2011
    Congrat IE team for reaching 231 points (out of 450) in html5test. It's very good :) I'm really happy for that :) http://html5test.com/

  • Anonymous
    June 30, 2011
    Please hint the 300 points barrier :) http://html5test.com/ It will be nice that we start to have all this goodies in all browsers. Has a webdeveloper... I will relly enjoy it. And as superuse, I will promise to start to install IE in all computers my computers friends, instead of Firefox or Chrome.

  • Anonymous
    June 30, 2011
    Please hint the 300 points barrier :) http://html5test.com/ It will be nice that we start to have all this goodies in all browsers. Has a webdeveloper... I will relly enjoy it. And as superuse, I will promise to start to install IE in all computers friends, instead of Firefox or Chrome.

  • Anonymous
    June 30, 2011
    Doesn't test Firefox 7.0 or Chrome 14.0 but tests alpha release of IE10. You just can't be any more blatant with your bias, can't you MS?

  • Anonymous
    July 01, 2011
    "Doesn't test Firefox 7.0 or Chrome 14.0 but tests alpha release of IE10. You just can't be any more blatant with your bias, can't you MS?" Chrome Beta (13.0) is tested above

  • Anonymous
    July 01, 2011
    Awesome job IE Team!!! Now can you guys finish implementing more CSS features (Text-Shadow)? And what about Spell Checking?

  • Anonymous
    July 01, 2011
    @LookCloser - Chrome 14.0 is the dev channel. Chrome 13.0 is the beta channel. In any event, on my machines, Chrome 13 is 95.5% and Chrome 14 fails (freezes?) on test 7477 (I think; it says "Total Tests Ran: 7476", so I assume it is stuck on the next one).

  • Anonymous
    July 01, 2011
    Unfortunately standards compliance and not having to write code specifically for IE are not the same thing, as IE still needs code tailored for it in branches separate from the code run by every other browser.

  • Anonymous
    July 01, 2011
    Unfortunately standards compliance and not having to write code specifically for IE are not the same thing, as IE still needs code tailored for it in branches separate from the code run by every other browser.

  • Anonymous
    July 01, 2011
    Anyone know if Opera ever plans to support Javascript?

  • Anonymous
    July 01, 2011
    CSS 2.1 standard conformance result can be found here on the W3C site: test.csswg.org/.../results.html htm5test.com is useless for conformance measuring as has limited tests and gives full marks to some browsers for incomplete coverage of standards. Future html5 conformace tests should be sought on the W3C site: w3c-test.org/.../report.htm

  • Anonymous
    July 01, 2011
    Congrats and thanks to IE team for pushing ES5 into the masses. I hope you will be able to reach 100%. Shame of MS PR department once again. Opera fails 30% of tests, but WHY ? what are those test cases testing ? - I can tell you, they test new properties added to Array, Object and Function constructors. Full analysis: my.opera.com/.../opera-fails-test262-or-not

  • Anonymous
    July 01, 2011
    @Miguel Web Developer You've been commenting here for so long and yet you still don't realize that html5test is a joke o.o

  • Anonymous
    July 02, 2011
    The comment has been removed

  • Anonymous
    July 02, 2011
    To commenter above: you're dumb if you think that variable declaration is a nuisance. It should be standardized and tested for.

  • Anonymous
    July 02, 2011
    If you think you can do without variable declaration, then your programs you've written clearly didn't exceed the complexity of "Hello, world." Grown-ups have discovered that variable declaration is benificial. Just follow their lead until you're old enough to understand the reasons behind it.

  • Anonymous
    July 02, 2011
    Great job IE Team!!! Now can you guys finish implementing more CSS features like Text-Shadow? And what about Spell Checking? http://bit.ly/ltDAnM

  • Anonymous
    July 03, 2011
    @Prior Semblance:   "html5test is a joke" why? They have some interesting objects, that I want to use as web developer. And I will be very happy if I can use it has standard (like HTML5 forms for example, do you think that a joke too). If IE make super users happy like me, maybe those super users would recommend more often IE to their friends. The truth is hard to say and it hurts a bit... But sometimes it's better to say the truth. So if you want to me, not changing the default browser, every time some friend asks me to reinstall windows, MAKE ME HAPPY. It's simple :) Like me there are other super users with the some opinion. So far you're doing an excellent work... continue doing it. I just have congrat that, and I'm changing my opinion about IE. Please continue doing it.

  • Anonymous
    July 04, 2011
    seeing as you like charts and graphs so much, try comparing IE9/IE10 with other browsers.. nontroppo.org/.../Hixie_DOM.html Or do you only cherrypick the good stuff for this blog?

  • Anonymous
    July 04, 2011
    @ mark: ...you mean cherrypick like html5test.com?

  • Anonymous
    July 04, 2011
    Why doesn't the test262 support web workers?

  • Anonymous
    July 11, 2011
    With 9.1, I thought you guys would take care of this: ACID3 (http://acid3.acidtests.org) Failed 5 of 100 tests. Test 01 passed, but took 303ms (less than 30fps) Test 03 passed, but took 159ms (less than 30fps) Test 04 passed, but took 128ms (less than 30fps) Test 07 passed, but took 38ms (less than 30fps) Test 08 passed, but took 231ms (less than 30fps) Test 26 passed, but took 599ms (less than 30fps) Test 34 passed, but took 44ms (less than 30fps) Test 65 passed, but took 75ms (less than 30fps) Test 69 passed, but took 25 attempts (less than perfect). Test 75 failed: Object doesn't support property or method 'beginElement' Test 76 failed: expected '0' but got '100' - Incorrect animVal value after svg animation. Test 77 failed: expected '4776' but got '5550.77978515625' - getComputedTextLength failed. Test 78 failed: expected '90' but got '1.9237771034240722' - getRotationOfChar(0) failed. Test 79 failed: character position 1, which is between a normal character and the first character of a two-character glyph, is 72.22000122070312 but should be 10000. Test 84 passed, but took 41ms (less than 30fps) Test 88 passed, but took 48ms (less than 30fps) Total elapsed time: 5.42s VS Chrome Failed 0 of 100 tests. Test 26 passed, but took 191ms (less than 30fps) Test 69 passed, but took 53 attempts (less than perfect). Total elapsed time: 2.97s Why don't you guys at MS-IE dept. like staking the Acid3 test? Now, you would probably talking about SMIL etc. but my point is to make you consider "Elapsed time": 5:42s vs 2:97s fastest browser eei! Its a BIG difference! I want the fastest browser namely IE10 the chrome killer. Chrome is a Cockroach!