For testing the access to file metadata from Explorer, or the behaviour of the FileMetaAssociationManager, manual testing is currently the only option. However, an automated test harness, TestDriver.exe, is provided to exercise the core functionality of the Property Handler and Context Menu Handler.

This works by using the same com interfaces that Explorer uses to drive the handlers to get and set properties, and also to export and import them.

TestDriver.exe contains a number of built-in tests, and a UI that allows them to be run individually or as a set. Most of the tests involve round tripping property values, by first setting them and then reading them. Properties are manipulated directly through the property handler, but also using the Windows API Code Pack, which itself uses the Property Handler, and also DSOFile which uses a completely independent mechanism to read and write properties.

The biggest of the tests uses a Windows API to enumerate all of the properties defined by Windows, and assigns random values to all of them which are writable. This typically comes to 625 different properties (400 or so are excluded because they are read-only, and 5 because they don't work). These values are stored as metadata on a file, exported as XML, imported onto a new file, and finally read from the new file and checked against the originally assigned values.

Also supported is running all of the tests in a loop to verify stability.

Last edited Apr 27, 2013 at 4:27 PM by Dijji, version 1


No comments yet.