Deleting historical test results data by using the command line
You can delete historical test suite results or the stub results and specify the results that you want to retain by using the HCL DevOps Test Integrations and APIs (Test Integrations and APIs) command line.
Deleting test suite results
The command delete-all-results-keeping as the default action deletes all historical test suite results and retains the results for the duration that is specified. The historical stub results are not deleted as the default action.
The syntax to delete all test suite results and retain the results for a specific duration is as follows:
IntegrationTesterCmd <Options> delete-all-results-keeping <arguments>
Where <duration> is the <arguments> that you can use, which is the period either in days (D) or months (M) that you want to keep the results.
The syntax to delete all test suite results of a project is as follows:
IntegrationTesterCmd --project <project_name> delete-all-results-keeping <duration>
The syntax to delete all test suite results in a results database that is secured by a user name and password and to retain the results of a specific duration is as follows:
IntegrationTesterCmd --databaseURL <results_database_URL> --dbuser <user_name> --password <password> delete-all-results-keeping <duration>
For example, to delete all test suite results in a results database with the URL as jdbc:db2://localhost:50000/resultdb, user name as jkelly, password as hayling and you want to keep results of the past one month, the command is as follows:
IntegrationTesterCmd --databaseURL jdbc:db2://localhost:50000/resultdb --dbuser jkelly --password hayling delete-all-results-keeping P1M
Deleting stub results
You must use the option --stubResults or -z to delete the historical stub results. The syntax to delete all stub results of a project is as follows:
IntegrationTesterCmd --project <project_name> --stubResults delete-all-results-keeping <duration>
For example, to delete all stub results of a project that are more than one month old or you want to keep results of the past one month, the command is as follows:
IntegrationTesterCmd --project <project_name> --stubResults delete-all-results-keeping P1M
The syntax to delete all stub results in a results database that is secured by a user name and password and to retain the results of a specific duration is as follows:
IntegrationTesterCmd --databaseURL <results_database_URL> --dbuser <user_name> --password <password> --stubResults delete-all-results-keeping <duration>
For example, to delete all stub results in a results database with the URL as jdbc:db2://localhost:50000/resultdb, user name as jkelly, password as hayling and you want to keep results of the past one month, the command is as follows:
IntegrationTesterCmd --databaseURL jdbc:db2://localhost:50000/resultdb --dbuser jkelly --password hayling --stubResults delete-all-results-keeping P1M
Command options and arguments
The following table lists the options that you can use with the
IntegrationTesterCmd
command for deleting historical test suite results
or stub results that are older than a specified period.
Options | Description |
---|---|
--project/-p | Path to project file (optional).
Used to limit the deletion to test suite results to a specific project. If not
specified then databaseUrl , dbuser , and
password are the required options. |
--databaseURL/-b | Results database URL (optional). For more information on the specification of database URLs when using IP literal addresses, see IP literal address. |
--dbuser/-g | Results database user name (optional) |
--password/-h | Results database password (optional) |
--ignorePolicy/-y | If present, the archive policy is ignored (flag). |
--stubResults/-z | If present, only the historical stub
results are deleted and the test suite results are not deleted (flag). When this option is used all historical stub results are deleted and the results retained for the duration specified. When this option is not used in the command, only the test suite results are deleted and the stub results are not deleted. |
Arguments | Description |
---|---|
duration | A representation of a time period of the form PnYnMnDTnHnMnS, using the World Wide Web Consortium (W3C) timeDuration specification. For example, to delete all results older than 6 months use P6M |