How to Disable default rollback behavior in ATF ?

Goku811
Kilo Contributor

Hi All,

 

I’m working with Automated Test Framework (ATF) and had a question regarding its default rollback behavior.

 

As per my understanding, ATF automatically rolls back all database changes after a test execution. Is there any supported way to disable or bypass this rollback, or is it enforced by design?

 

If rollback cannot be disabled, what are the recommended best practices for validating end-to-end flows where records created or updated during the test need to persist for further validation?

 

Any insights or guidance would be appr

eciated.

3 REPLIES 3

Sardash
Giga Guru

@Goku811  - Automatic Rollback is built in functionality and cannot be disabled. Instead you can exclude certain tables from rollback by modifying their dictionary definitions. 

1. Go to System Definition > Dictionary

2. Open the record for the table you want to exclude 

3. In the Attributes field, add excludeFromRollback=true 

-------------------------------------------------------------------------------------------------------------------------------------

If my response helped, please mark it by selecting "Accept as Solution" and " Helpful."

Tauqueer
ServiceNow Employee

hi @goku

 

Could you please check whether disabling the system property glide.rollback.active resolves the issue?
Please also review the potential impact before proceeding, as turning this off will prevent ServiceNow’s platform rollback mechanism from running.

Thanks!

OlaN
Tera Sage

Hi, 

Rollbacks are an essential part of the ATF and can not be disabled to my knowledge.

However some things cannot be undone. If you're testing things like integrations then of course the rollback will not be able to undo the things sent to a 3rd party system.

Other minor thing you might notice is that the numbering of records will not be restored after creating new records. (so if the first test creates record INC001, then the next run will create record INC002 and so on).

 

Best practice if you need to test things end to end is to set up all those steps in a single test.