[webkit-dev] WebKit unit test framework

Timothy Hatcher timothy at apple.com
Wed Apr 20 15:00:25 PDT 2011

I think having something the WebKit community owns and controls is preferred over importing and using a third-party library.

So that makes me prefer TestWebKitAPI (or something built from/on it) over gtest. And TestWebKitAPI already has a very simple test for WTF::Vector — just begging to be expanded.

On Apr 18, 2011, at 11:36 AM, David Levin wrote:

> Issue: There has been a long standing bug to add unit tests to WebKit (https://bugs.webkit.org/show_bug.cgi?id=21010). It was also mentioned on webkit-dev that it would be helpful in various cases.
> Landscape: Surveying WebKit, it is looks like there are at least three testing frameworks being used: TestWebKitAPI/WebKitAPITest (in Tools), QTest, gtest (in Source/WebKit/chromium/). However, only one TestWebKitAPI has been used so far (as far as I can tell) for testing core WebKit items like WTF (though I was unaware of TestWebKitAPI until Friday).
> It seems like a good way to think about the issue of which to use in general in WebKit would be to decide on what would be desired in our framework and then see how each matches up.
> Here's my take on this. (It may be biased toward what I am familiar with but I welcome others to add their own criteria.) 
> Criteria
> Musts:
> Compatible license with WebKit
> Builds/Can be built on the many platforms and build systems supported by WebKit (ideally without extra installs).
> Useful:
> Easy to write tests
> Hackable to suit our needs
> Well tested features (to support hackability/stability)
> Supports filtering of tests so you can run just the test you care about (and easily listing the tests).
> Supports writing out values when there is test failure. (For example, if the is verifying that A == B but that is not true, then the values of A and B should be printed.)
> Well documented
> thanks,
> dave
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

— Timothy Hatcher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110420/a148264f/attachment.html>

More information about the webkit-dev mailing list