> On May 8, 2017, at 9:44 PM, Geoffrey Garen <gga...@apple.com> wrote:
> 
>> Is it time to make testharness.js the recommended way of writing LayoutTests?
> 
> What are the costs and benefits of testharness.js?

Benefit: 
- Tests would be more easily upstreamable to web-platform-tests, which are run 
by all major browser engines. This would help a lot in terms of 
interoperability. As previously discussed, Gecko and Blink already do automated 
export of tests to web-platform-tests. I believe we should do in the same 
direction and contribute more tests back.
- It is quite powerful (see documentation [1], has things like Promise tests, 
Worker tests and advanced assertions.

Cost:
- People are not necessarily used to it so there is a little bit of a learning 
curve. It is well documented though [1].

> 
> We usually try to make regression tests reductions of some larger problem to 
> aid debugging and to make testing fast. But testharness.js is 95kB. That's 
> kind of the opposite of a reduction.

It is proposed as a replacement to js-test.js, which a lot of us are already 
using in our layout tests. Using js-test.js or testharness.js has rarely 
interfered in my reductions, although it has happened to me.
For some tests, we’ll probably not use any framework. However, for most of 
them, I personally don’t see an issue.

[1] http://testthewebforward.org/docs/testharness-library.html 
<http://testthewebforward.org/docs/testharness-library.html>


> 
> Geoff
> 
>> 
>> To continue moving forward, some of us are proposing to serve all tests in 
>> LayoutTests/wpt through the WPT server [1].
>> This would serve some purposes like increasing the use of WPT goodies: 
>> file-specific headers, templated tests (*.any.js), IDLParser, server-side 
>> scripts...
>> It could also ease test migration from WebKit to W3C WPT.
>> 
>> Some rules can guide whether adding tests to LayoutTests/wpt or 
>> LayoutTests/imported/w3c/web-platform-tests:
>> - WebKit specific tests (crash tests, tests using internals...) in 
>> LayoutTests/wpt
>> - Spec conformance/interoperability tests in 
>> LayoutTests/imported/w3c/web-platform-tests
>> 
>>    y
>> 
>> [1]: bug 171479 <https://bugs.webkit.org/show_bug.cgi?id=171479>
>> 
>> 
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev@lists.webkit.org <mailto:webkit-dev@lists.webkit.org>
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to