Using the CleanupLatest utility to fix log records set to latest

This topic describes how to use the CleanupLatest utility to find and correct TMTestLog and TMSuiteLog records that are incorrectly marked as latest.

When you execute a configured test case or test suite and commit the results, Rational® ClearQuest® Test Manager creates a log record and sets the Latest field to true to indicate that this is the most recent log record for the configured test case or test suite. Rational ClearQuest Test Manager also finds the previous log record and changes the value of its Latest field to false.

In a Rational ClearQuest MultiSite environment, Rational ClearQuest Test Manager cannot update the previous log record if that record is mastered at a different replica. Therefore, it is possible that two log records for the same configured test case or test suite can be marked as latest.

The CleanupLatest utility queries the ClearQuest user database for these records and changes the Latest field to false on the older records. Run the utility periodically on each replica in a MultiSite clan.

The CleanupLatest utility is installed in the directory where you install ClearQuest. On Windows® the default installation directory is C:\Program Files\Rational\ClearQuest. On Linux® the default installation directory is /opt/rational/clearquest. Run the utility from the directory where it is installed.

Use the following syntax to run the utility:

java –jar CleanupLatest.jar –lid LoginID –pw Password –udb UserDB –sr SchemaRepo

Table 1. CleanupLatest utility arguments
Argument Description
LoginID User ID that you use to log in to ClearQuest
Password Your ClearQuest password
UserDB Name of the ClearQuest user database
SchemaRepo Name of the ClearQuest schema repository

When you run the utility it creates a file named CleanupLatest.properties, which includes the options and values that you specify when you run the command. If you run the utility without specifying options, it uses the options and values in the CleanupLatest.properties file. You can edit the values in the CleanupLatest.properties file. If you specify the options on the command line, the utility uses those instead of the ones in the CleanupLatest.properties file.

Note: When you specify the password with the –pw option, the utility writes an encrypted version of the password to the CleanupLatest.properties file. If you specify the password in the CleanupLatest.properties file and do not specify it on the command line, the utility does not write an encrypted version of it to the CleanupLatest.properties file.

The following restrictions apply to specifying values:

If the utility cannot change the Latest field of a log record because the record is mastered at a different replica, it displays an error message. Run the utility at the remote replica to change records mastered there.


Feedback