QTP/UFT Support Tip: Object Repository file size is not reduced after removing test objects

Hello everyone,

 

In QuickTest Professional (QTP)/Unified Functional Testing (UFT), the local object repository file (ObjectRepository.bdb) can be found under the Action's folder to which it belongs to. The default size of the file starts at 192 KB.

After adding/learning many objects, the object repository file size increases significantly. Removing test objects from the object repository does not seem to have an impact on the file size, as it will remain with the same size even if it is emptied.

 

The size of the BDB file is not reduced back to 192 KB due to internal implementation of the Berkeley Database. Space freed by deleting data from the BDB file is never returned to the filesystem, although it is reused where possible.

 

Workaround:

 

To reduce the file size after removing test objects from it:

  1. Export the Local Object Repository to a Shared object repository file (File > Export Local Objects...).
  2. Close your current test.
  3. Change the shared object repository TSR file extension to BDB (i.e. name the tsr file as ObjectRepository.bdb).
  4. Backup the original local object repository file, and place the newObjectRepository.bdb file under the Action's folder to use it as the local object repository. The new file size should be smaller than the original.

 

Related article: KM00629669

 

Thanks