[webkit-dev] WebKit unit test framework
levin at chromium.org
Mon Apr 18 11:36:39 PDT 2011
*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
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.)
- Compatible license with WebKit
- Builds/Can be built on the many platforms and build systems supported
by WebKit (ideally without extra installs).
- 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev