GullFOSS
OpenOffice.org Engineering at Sun
 
 
 
 
More Flickr photos tagged with openoffice

Today's Page Hits: 3398

Locations of visitors to this page
« Some Calc features... | Main | New: OOo-DEV 3.0... »
Thursday, 20 Nov 2008
QA Automation: Global filters to be removed from master.inc
Joerg Skottke

In the ongoing effort to speed up the automated tests i had a look at the global filters which are loaded during each test initialization. These filters are defined in gvariabl.inc, called from master.inc and filled in t_filters.inc.

Some time ago we switched from UI filternames to API filternames which resulted in using the API calls FileSaveAs() and FileOpen() instead of opening the file dialogs each time. The result was a considerable speed gain. You might want to read my prior blogs about this subject:

Thorsten Bosbach reworked large parts of the initialization code switching as much as possible to API calls instead of accessing the controls/settings via UI. While doing so we noticed that establishing a UNO connection to the office can be a quite time consuming process as well (though still much faster than UI actions).

So I started profiling and noticed that retrieving the filter names via GetDefaultFilterNames() took somewhere near 15 seconds because the filters were retrieved with API calls one by one.

The first optimization i did was to get the whole bunch of filters in one go from the API reducing the time to some 6 to 12 seconds - still a lot (about 20% of the test case initialization time).

I discussed the matter with my fellow QA colleagues and we decided to further pursue the matter.

The result was: Only one test really needs all filters (f_first.bas) and some filters were used in a grand total of 11 .inc files.

So i suggested removing the call to GetDefaultFilterNames() from master.inc. The details of the modification is fully documented in issue 96341 which is resolved in CWS qascripts02 to be integrated into DEV300m36.

The speed gain is at least 6 seconds per test file of which we have 225 for the time being. Additionally i was able to trash on unused function, moved two functions to the /includes/optional/, a nice little cleanup benefit. If you need the current UI filter names you just have to include the file in your .bas file:

sub LoadIncludeFiles

[...]

use "global/tools/includes/optional/t_ui_filters.inc"
call GetUseFiles()
end sub




tags:

Posted by Joerg Skottke on 20 Nov 2008  |  PermaLink |  Bookmark to Delicious To Delicious |  Digg this Digg this

Comments

Post a Comment:
Comments are closed for this entry.
« Some Calc features... | Main | New: OOo-DEV 3.0... » GullFOSS