Is it possible to turn off cleanup for ATF?

Andrii
Kilo Guru

Hi, as ATF has been included into ServiceNow, we've faced new challenge - we need to see real test records. However ATF deletes records after each test.

Is there any property that disables deletion of test data?

Idea behind is to use results of one test as an input of another test (not test steps but tests)

7 REPLIES 7

Marcin Vogelsin
Tera Expert

There's a small hack for that: 
- Create a custom server script step that does this: 

(function executeStep(inputs, outputs, stepResult, timeout) {
	
	//gs.sleep(1000*inputs.u_seconds);
	gs.sleep(1000*30);
	stepResult.setSuccess();

}(inputs, outputs, stepResult, timeout));

- Add the step to your test at the end

When you run it now, you have 30 sec to check all the records created by the test run. 
After the test execution they will be deleted anyway, but the test execution lasts longer now. 
Ofc you can parametrize the input depending on the needs (commented out code)

Gopi Naik1
Kilo Sage

Hi  

Andrii Iarmolatii,
 
Follow the below process:
  1. Open a form from a table to which you want to stop rollback.For example open incident form
  2. Click on Form context menu-->click on Configure-->Dictionary.
  3. You will find  a record with no column name 
  4. Open the record → Click Advanced view
  5. In the attributes field add an attribute excludeFromRollback=true
  6. Repeat these steps for every table to which you want to stop rollback.
 
If my solutions helps you to resolve the issue, Please accept solution and Hit "Helpful".

Thanks,
Gopi

Gopi Naik1
Kilo Sage

Hi  

Andrii Iarmolatii,
 
              If I have answered your question, please mark my response as correct and/or helpful.

 

If my solutions helps you to resolve the issue, Please accept solution and Hit "Helpful".

Thanks,
Gopi