Shell test harness

David Bruant david.bruant at labri.fr
Thu Jul 7 04:58:48 PDT 2011


Hi Paul,

I've been working a little bit on the test262 website so I can share my 
2 cents. Basically, the test harness is in the sth.js file 
(http://hg.ecmascript.org/tests/test262/file/89c60d2478f1/test/harness/sth.js). 
You can find my own version as an attachement here 
(https://bugs.ecmascript.org/show_bug.cgi?id=113). Besides a (unproven) 
performance win, I have refactored the file to make it independent of 
how tests are run.

One important thing to think about is that you have to run each test in 
a fresh ECMAScript environment (otherwise, the execution of one test 
could interfere with the result of another). This is done in the test262 
website by running each test in a new iframe (the code was dependent on 
creating an iframe, but I have removed that dependency in my code by 
scoping the iframe variable in the this.run method). For that matter, 
Microsoft has showed a demo of test262 not running tests on iframes, but 
rather in WebWorkers: 
http://ie.microsoft.com/testdrive/HTML5/WebWorkerTest262/Default.html


Le 07/07/2011 02:27, Paul Biggar a écrit :
> - What does 'config/excludelist.xml' record? Is it the same
> information in SputnikGlobalscope.js, or is it different?
SputnikGlobalscope.js distinguishes tests that need to be run in the 
global scope. Running it encapsulated in something else would change the 
result. I think this is used for strict mode tests.

config/excludelist.xml lists tests that are invalid. They're kept for 
legacy reasons (and maybe they are just disabled temporarily waiting to 
be analyzed of fixed)

Hope it helps,

David


More information about the test262-discuss mailing list