[webkit-dev] layout tests

David D. Kilzer ddkilzer at kilzer.net
Tue May 22 20:40:57 PDT 2007


Look at help for run-webkit-tests (or read the source; it's just Perl):

$ ./WebKitTools/Scripts/run-webkit-tests --help

New *.html (or *.xhtml, etc.) files in the LayoutTests hierarchy automatically
get new results generated for them (if none exist).  Look at existing tests to
get ideas about how to write your own.

There are basically two types of tests:

1. Those driven by JavaScript that print some kind of "success" or "failure"
message (which usually are dumped as text instead of as a render tree).

2. Those that just render (or don't crash), and whose render tree is dumped out
as the test result.0

Dave


Reem Yazigi <reemyazigi at hotmail.com> wrote:


---------------------------------

Adam and All,

Thanks a lot for the explanation. You said that "run-webkit-tests" takes the
resulting output  and compares it to the expected output we have for each test
that is  checked in to the Subversion repository. How if I want to add my own
tests? How can I generate the expected results text files? Any automated way to
do that?

Thanks,

-Reem






---------------------------------

From:  Adam Roben <aroben at apple.com>
To:  Reem Yazigi <reemyazigi at hotmail.com>
CC:  dacarson at gmail.com, webkit-dev at lists.webkit.org
Subject:  Re: [webkit-dev] layout tests
Date:  Tue, 22 May 2007 17:14:00 -0700
>On May 22, 2007, at 4:42 PM, Reem Yazigi wrote:
>>Thanks for the link and the Qt port advice... I'm still confused  
>>about what does DumpRenderTree do exactly!! Does it only set up  
>>WebKit to run a specific test case? Does it make any decision  
>>concerning wether the Layout test is failing or passing? if yes, 
>>can  someone please tell me what part of the code is responsible 
>>for that  and how browser specific it is?
>>
>DumpRenderTree can either take a single argument that is a path to a 
>  test file (like fast/events/frame-tab-focus.html), or it can take 
>a  list of test files on standard input. DumpRenderTree then passes 
>the  test(s) to WebKit and outputs specially-formatted information 
>on  standard output. run-webkit-tests runs DumpRenderTree and passes 
>it a  list of tests on its standard input, then takes the resulting 
>output  and compares it to the expected output we have for each test 
>that is  checked in to the Subversion repository.
>
>So DumpRenderTree has no concept of a "passing" or "failing" test -- 
>  only run-webkit-tests knows that information. A simple string  
>comparison is done on the actual results (output by DumpRenderTree)  
>and the expected results (checked in to Subversion) to make that  
>determination.
>
>-Adam



---------------------------------
 PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows
Live Hotmail. > _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo/webkit-dev
> 






More information about the webkit-dev mailing list