Does Your Browser Behave?

Thursday, March 11, 2010

Labels:

Last June, we launched the Sputnik JavaScript conformance test suite, a comprehensive set of more than 5000 tests. Today we're releasing a test runner for Sputnik, that allows you to easily run the complete test suite from within your browser.

Sputnik touches all aspects of the JavaScript language defined in the 3rd edition of the ECMA-262 spec. In many ways it can be seen as a continuation of and a complement to existing browser conformance testing tools, such as the Acid3 test. While we are always focused on improving speed, Sputnik is not about testing how fast your browser executes JavaScript, but rather whether it does so correctly.

Since we released the Sputnik tests as an open source project, the most requested feature has been the ability to run the tests in a browser, and we are excited to launch that functionality today. The new test runner lets you run the tests from a single URL and quickly see the results in your browser. This makes it easier both for users to see how well their browser conforms to the JavaScript spec, as well as for browser makers to find bugs and incompatibilities.

You can also use Sputnik to compare browser conformance. For example, below is an experimental plot that compares five popular browsers and which we hope to update as new stable versions of the browsers are released. We created this chart by running Sputnik in each of the five browsers and then plotting each browser such that the fewer tests a browser fails the closer it is to the center and the more failing tests two browsers have in common the closer they are placed to each other. In this example, when running Sputnik on a Windows machine, we saw the following results: Opera 10.50: 78 failures, Safari 4: 159 failures, Chrome 4: 218 failures, Firefox 3.6: 259 failures and Internet Explorer 8: 463 failures.


When we first released the Sputnik test suite we noted that to be compatible with the web you sometimes had to be incompatible with the JavaScript spec. Since then a new version of the spec, ECMAScript 5, has been released. Besides introducing a number of new language features, ECMAScript 5 changes how many existing features are defined to bring them in line with how they are used on the web. We are updating the Sputnik tests to reflect those changes so that 0 failures would mean not only compatibility with the spec but also compatibility with the web.

We are excited to see the efforts on conformance testing by other browser makers. For example, where Sputnik tests the language features in ECMAScript 5 which were also present in ECMAScript 3, Microsoft's es5conform project tests the new language features that were added in ECMAScript 5.

Incompatibilities between browsers remain one of the biggest challenges for web developers. We hope that giving users and browser vendors an easy way to test their browser will help promote browser robustness and compatibility across the industry.

35 comments:

Maxo said...

IE looks so lonely over there by itself. Poor IE, everyone else is playing nice and you're stuck with your noes in the corner.

Mike Powell said...

The chart is misleading. According to the text, Firefox and Chrome both still have over 200 failures, or about half the failures of IE. But because they're grouped together with *each other* over on the left, it makes IE look worse.

o grande eubage said...

Congrats Opera Software!

benhedrington said...

@Mike Powell from the test page this is the explanation of the plotting...

"The distance to the center shows how close the browser is to passing all tests; the further the browser is from the center the more tests it fails. The distance between browsers shows how different they are; the more similar two browsers are – the more test failures they have in common – the closer they will be."

benhedrington said...

Thus IE must be failing quite different tests than the WebKit cousins.

Mike Powell said...

@benhedrington Thanks for pointing that out, I did miss it. I still think the positioning leads to an inflated impression of IE's performance in the test relative to the others, but at least it's not arbitrary.

Andrew said...

Although technically it doesn't "behave" on the following websites because they do 0% Opera support:

[these websites all have confirmed critical bugs in Opera]
IMDB (go on, try and watch a movie trailer, I dare you)
Fandango
Netflix (try and watch streaming content)
Facebook (all around bad experience)
EBay (can't do anything)
Yahoo! Mail
Abc.com

There are also many bugs in the awful 10.50 release, including:
- Use image on desktop doesn't work
- Bookmark organization doesn't work
- Clicking middle click to scroll in iframe doesn't work
- Higher memory usage than 10.10
- Tab opening / closing on tab bar is buggy, especially when middle clicking
- Inline find is garbage, sometimes doesn't search at all
- Rendering bugs where parts of your page will render without styles or odd background repeats

Opera is like the world's fastest car that is too wide to fit on any road. No point in using the world's faster browser when the web doesn't care about Opera.

Wei Hu said...

My Chromium 5 on Linux had 222 failures, a bit more than the number you reported here for Chrome 4. Could it be some extensions I enabled?

leo_ said...

>Opera is like the world's fastest car that is too wide to fit on any road. No point in using the world's faster browser when the web doesn't care about Opera.

I do care, and my websites all work on Opera just fine...

I don't care the fact most people don't.

karlzt said...

It would be nice if it were dark themed

Eiras said...

@Andrew, at some point IE had 99% market share. No point in using other browser because nobody uses them and the web does not care about them right ? Yet, the good standard compliant browsers are growing and that means overall better interoperability and the evolution of the internet.

Opera is an excellent browser, with many innovations (as clearly everyone copies from them) and kick ass standards support.

If you have specific problems, don't bitch randomly in some random website. Rather report the issues to opera and websites. Else, you're just being a troll and stupid.

John Villar said...

@Andrew Man!! You're a hater or what? first: you should read before writing, because this is a conformance test, not an usability test; second: the phrase "these websites all have confirmed critical bugs in Opera"... you read it your way man... it is not opera failing on those sites... it is THOSE SITES failing in opera, that means, that's those sites' problems... not opera.... ppl like you always stop at the surface of the problems.... too bad

Brant said...

I can't even get the test to complete on Opera 10.5.

It's stuck at 4%.

Daniel said...

Very nice job, Opera.

RJF said...

@John Villar
"you read it your way man... it is not opera failing on those sites... it is THOSE SITES failing in opera, that means, that's those sites' problems... not opera.... ppl like you always stop at the surface of the problems...."

John - to me, as a user, it does not matter whose fault it is. Dh I care? Same difference. Websites don't work properly, period. And the list is actually quite long: off top of my head I could add Picassa, or Amazon ("look inside" feature doesn't work on Opera 10.50)... it's not some obscure domains noone ever has heard of. They are much more popular than Opera itself. So, if their developers don't bother testing for Opera - Opera has got a problem. Not Amazon.

Andrew said...

@Eiras oh don't worry, I've submitted many bug reports. Never seen any of them fixed. None of the bugs reported by any users for Opera 10.5 betas were fixed. Just go look at the Opera forums and see all the 10.5 bugs that will never get responded to.

And really, try submitting a bug report to Amazon, or Facebook, or YouTube. If you can even find a relevant bug report form (usually you can't and have to try some other channel), you will literally never get a response. I've done that too. Of course it never helps. Your Opera bug report is just a drop in the ocean that no one cares about.

Frank said...

If you look at http://my.opera.com/desktopteam/blog/ you will see plenty of bugs being fixed for Opera.

On that site is also linked the correct site where to report Opera bugs.

Khalil Wiederzan said...

opera is the one that has over 99.9% of failures and bugs andchrome has 200

K-m@cho said...

To all who said Opera 10.50 doesn't work. I think the problem is BKAC, cause I use it as my main browser every day, and I had no problems. And I'm a software developer, not a simple user who use it once a week, I spend almost all my day on the computer...

jto said...

Where can I file bugs against the Sputnik tests?

I'm a Mozilla developer, and I'm seeing test failures like this:

=== 15_Native_ECMA_Script_Objects/15.8_The_Math_Object/15.8.2_Function_Properties_of_the_Math_Object/15.8.2.16_sin/S15.8.2.16_A7 failed ===
--- errors ---
uncaught exception: SputnikError:
x = 6.283185307179586
libc.sin(x) = -2.4492935982947064e-16
Math.sin(x) = -2.4492127076447545e-16
Math.abs(libc.sin(x) - Math.sin(x)) > 1.9721522630525295e-31

There are a couple problems with this. First of all, x is the floating-point number closest to 2pi. So it seems to me (not a IEEE floating-point expert) that the answer should just be 0.

Second, we're just calling libc sin() here, which I think is what the other JavaScript implementations do too. So I have to wonder if anyone passes this test on Linux x86.

Sputnik does find some real bugs in Firefox, and we'll fix those. It's mostly stuff like "'delete arguments' returns true instead of false" and "`new isNaN()` succeeds, but per standard it should throw a TypeError".

Christian Plesner Hansen said...

@jto Bugs should be filed against the sputniktests project.

ms2ger said...

Could IE's low score have something to do with this code?

<!-- I have spent enough time already trying to make this work in IE8. -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >

That's not how you're going to get fair results…

elpedro said...

Andrew

"IMDB (go on, try and watch a movie trailer, I dare you)"
I've got no problem to watch this trailer on IMDB
http://www.imdb.com/video/wab/vi1416299801/player
What do I win ?
"Yahoo! Mail" what's wrong with yahoo mail ? It's one of my main adress.
"EBay "
Can't do anything ? I can visit ebay, search for items, I don't know what you mean, really.
"because they do 0% Opera support:"
The websites won't work not because they do 0% Opera support, but because they 0% W3C support. It's all their fault. Anyway, it doesn't matter because no Browser is 100% websites compliant, Firefox, IE have problem as well (and I'm not talking about IE 6 only). I prefer using Opera, and if ever a website doesn't work, there's always a solution (most of the times, ID as another browser is enough; sometimes User.JS or User.css will make the deal; or disable blockcontent, or javascript or whatever you may find in "edit sites preferences", you can change your settings for each sites if you want).

Andrew said...

I have no idea how you even got to that page, but movie trailers don't work in 10.50
http://www.imdb.com/video/imdb/vi73860121/

Opera Mail has plenty of confirmed problems
http://my.opera.com/community/forums/topic.dml?id=442921
http://my.opera.com/community/forums/topic.dml?id=388091
http://my.opera.com/community/forums/topic.dml?id=275034
http://my.opera.com/community/forums/topic.dml?id=436961

None of that matters. Anyway, please tweet this:

Please RT: @opera's PR: hundreds of users complain about rushed update, so delete all replies and lock thread http://tinyurl.com/ygapydh

Paulo said...

couldn't finish test on IE8, it hung forever.

chrome 4 and firefox 3.6 had similar results

IE6 wouldn't let me do the test, crashed... jeez

infomaniac said...

With IE6 I get 470 failures

James John Malcolm said...

Does the chart show ECMA 5 or ECMA 3?

paulus said...

"Goats Teleported" in Chome/Chromium for linux!!! What a crap in browser for Linux, but in windows not? Idiocy is increasing in popularity?

Johnny said...

OPERAAAAAAAAAAAAAAAHH! *-*

Christian Plesner Hansen said...

@ms2ger The IE=EmulateIE7 directive has no effect on IE's test results. It only affects how the page is rendered, not how JavaScript is executed.

Jamison said...

Ditto for what "ms2ger" said . .

I pointed IE*8* at Sputnik and then invoked View Source. I saw:
"
< meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >"

If you're going to fudge the test conditions like this, then you should at least put up an enormous warning message when this test is loaded into any version of IE other than IE7. Said warning message should say something like:
'This test only works on IE version 7. The results are MEANINGLESS on any other version of IE.'

==============
Re: the chart -- the error counts are a one-dimensional value; but the chart is two-dimensional. This fact leads to a more subtle problem in that the 'bulls eye' chart is misleading in terms of the relative number of errors in each browser. In other words, you're using distance to show the proportions, but you should be using the _area_ of the circles, to avoid being misleading

a Tufte example which illustrates this problem

Preferably, just use a simple bar chart and plot the browser 'simularity' on a separate scale.

hallvors said...

I believe X-UA-Compatible is only a layout thing. In other words, it just affects what the result page looks like in IE, while the test suite is all about core JavaScript and has nothing to do with layout. So specifying IE7 mode for the layout of the results has NOTHING to do with test execution.

Siva said...

I tested with IE9 and Opera 9.27 , it crashed after 50tests :(
Check @ http://hiswat.info/2010/03/browsersjavascript-test/

Rocky Madden said...

Interesting test! Heres hoping that IE 9 can be at a point all other browsers were a now/few years ago.

Frederik said...

It would be interesting to see the cart depicted in another way: Instead of having the browsers with the most common failures group together, then let the browsers with the most common succes' group together. That way, you could see what browser you should change to if you were having problems with any given Java-Applet. It would be the one opposite on the chart.