Notifications

110 views

Description


By default, a ServiceNow instance retains the test results for Automated Test Framework (ATF) tests and suites for 30 days.  In most cases this is an adequate time span to retain the records.  However, if a customer needs to increase (or decrease) this timespan for which these results are retained on the instance this can be done.  This article will detail the steps which can be taken to modify this retention period as needed.

Procedure


The retention period can be specified specifically for Test results and for Test Suite results.  The steps to update the retention policy for both ATF tests and ATF test suites will be described.

 

Update the Retention Policy for ATF Tests

To update the test results for individual ATF Tests, the following steps can be used:

Log into the instance with an account having the admin or atf_test_admin role assigned.

Browse to the following location on the instance using the Menu Navigator: Automated Test Framework -> Administration -> Table Cleanup.

A list of Auto Flush records should appear, which should probably contain two records, one with a Tablename of sys_atf_test_result and another with a Tablename of sys_atf_test_suite_result.  Click the Information icon to the left of the record with the name sys_atf_test_result to open that record for editing.

The default value for the Age in seconds field will probably be 2,592,000 which corresponds to 30 days.

Modify this value to a number of seconds for which you would prefer to retain these records (for example a value of 7,776,000 would be populated in this field to retain the ATF test result records for 90 days).

The other fields in the record should be left as previously set.  These fields in this record control the table to be cleared, the field used for comparison in determining the age of a record, and any additional filtering to use to determine if a specific record should be nominated for deletion.  In most cases, the standard pre-set values for these fields can be used.

Adjusting the retention period for ATF Test Result records

Note that by default, the Conditions section specifies that any Test Result record that has the Retain indefinitely checkbox value selected will not be deleted regardless of the age of that record.

Click the Update button to save the change to the record.

 

Update the Retention Policy for ATF Test Suites

The process for updating the retention policy for ATF Test Suite records is very similar, however it will apply to test suite result records instead.  To modify this retention period, the following steps can be used.

Log into the instance with an account having the admin or atf_test_admin role.

Browse to the following location on the instance using the Menu navigator: Automated Test Framework -> Administration -> Table Cleanup.

A list of Auto Flush records should appear, which will probably contain two records, one with a Tablename of sys_atf_test_result and another with a Tablename of sys_atf_test_suite_result.  Click the Information icon to the left of the record with the name sys_atf_test_suite_result to open that record for editing.

The default value for the Age in seconds field will probably be 2,592,000 which corresponds to 30 days.

Modify this value to a number of seconds for which you want to retain these records (for example a value of 5,184,000 could be populated in this field to retain the ATF test suite result records for 60 days).

Updating the retention age for Automated Test Suite results

The remaining fields on the form should generally be left to the default values.  These fields control other aspects of the data retention for this table, including the field name for comparison for determination of the age of the record, whether the record is active and any conditions to further limit the deletion of records from the table. 

Note that, by default the Conditions section specifies that any Test Suite Result record that has the Retain indefinitely checkbox value selected will not be deleted regardless of the age of that record.

Click the Update button to save the change to the record.

 

Note that, using the default settings, any individual Test result or Test Suite result record can be configured to never be deleted,  This is done by selecting the Retain indefinitely checkbox on the individual Test Result or Test Suite Result record.

Retain test record indefinitely

Additional Information


The following ServiceNow Docs site article describes in more detail the process of modifying the Auto Flush settings for the ATF Test and Test Suite result records:

Modify data retention policy for ATF test results

Article Information

Last Updated:2019-01-02 09:26:47
Published:2019-01-02