Re: Using WPT as unit tests for polyfill libraries?

@Ms2ger

Thanks for the quick reply. I’ll be sure to check wptrunner out.

I’m also planning to contribute a few tests. I wonder if a spec has to reach certain level before tests can be added to wpt? For example, tests for the ChildNode interface introduced in dom4 seems to be missing from wpt. If I submit tests like these, will they be merged? What happens if specs do introduce breaking changes?

Also, some tests are unlikely to fail in browsers but polyfill libraries might fail them. For example, many classList polyfill libraries treat classList.toggle(“name”, undefined) the same as classList.toggle(“name”). Will wpt be interested in merging tests like these?

@ Andreas

You mean something along the line of quirksmode’s compatibility table and caniuse? That would be very cool, and I think the table provided by wpt can be way more granular, which should be very informative.

> On Feb 17, 2015, at 8:30 PM, Andreas Tolfsen <ato@mozilla.com> wrote:
> 
> On 17 Feb 2015, at 07:54, Glen Huang <curvedmark@gmail.com> wrote:
>> - How to automate the tests in multiple browsers? More specifically, is it possible to integrate WPT into, say, sauce labs?
> 
> Ms2ger mentioned wptrunner.  It provides a cross-browser (mostly) OS independent test runner for the wpt tests.
> 
> For most browsers it uses WebDriver to load in the tests, so it could technically be made to run against any remote providing a Selenium server.
> 
> However from a vendor point of view, we typically want to test against fresh builds in our CI system to catch regressions.
> 
> Tracking interoperability between different UAs is, I think, a desired outcome we want from wpt.  As far as I know there have been talk about creating a dashboard to help visualise and track this.
> 
> 

Received on Wednesday, 18 February 2015 05:36:38 UTC