CLI Reference > Server Administration Commands > tm purgeresults
  
tm purgeresults
purges test results for test cases
Synopsis
tm purgeresult [--before=value] [--hostname=value] [--port=value] [--password=value] [--user=value] [(-?|--usage)] [(-g|--gui)] [(-F value|--selectionFile=value)] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=value] [--forceConfirm=[yes|no]] sessionID...
Description
This command purges test results for the test cases in a test session. You can specify the test session to purge results for, or purge results for all test sessions that were created before a specified date.
For example,
tm purgeresults --before=01/01/2008
purges all test results created before January 1, 2008.
When a test result is deleted, its attachments and test steps are also deleted.
This command confirms all actions by displaying the number of results and number of sessions to be purged. Once the command is started, it cannot be cancelled.
* 
You must have the PurgeTestResult permission to run this command.
Options
This command takes the universal options available to tm commands, as well as some general options. See the options reference page for descriptions.
--sessionID=value
the ID of the test session that the test cases belong to. You must specify either this option or the --before option.
* 
The test result policy for the test session must allow the user to modify test results.
--before=value
deletes all test results in all test sessions that were created before the specified date, where value is of the form:
MM/dd/yyy h:mm:ss [AM|PM]
See the :time:timestamp option in options for additional date formats.
* 
In order to use this option, you cannot use the --sessionID option or specify any test cases using test id....
sessionID...
the ID of the test session that you want to purge test results for. You must specify either a session or the --before option.
* 
The test session must be in a state that allows test results to be modified, and the test result policy for the session must allow the user to modify test results.
See Also
Miscellaneous: options