The CreatorCon Call for Content is officially open! Get started here.

General ATF questions

David247
Tera Contributor

Hello all, I'm attempting to create some CHG ATF tests since our flows are custom.

I have read it is best to keep the tests small which is what I'm trying to do.

Here are my main questions:

1. When a test is complete, it rolls back all the data. Is it possible to stop this?

2. I want to have tests in a suite. I need to create a change request in the first test, then open the record created in the first test in the 2nd test. I don't think this is possible since the record that is created in the first test is rolled back when it finishes. So is it possible to open a record that was created in a previous test when ran in a suite?

 

Thanks for your help!

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi @David247 

1. No, you cannot stop this as this is a fundamental feature which makes absolutely sense.

2. Rolling back is performed at the end of an ATF run. So if you execute a suite, you of course can reference a record created in step 1 within a following step. Everything else would not make sense for the overall ATF topic.

Maik 

Greetings Maik, thanks for responding.

 

Your reply for question 2 did not clear up my question. You said I can reference step 1 within a following step, which I know how to do. But, can I reference a record in a step in TEST 1 in TEST 2?

Shaqeel
Mega Sage
Mega Sage

Hi @David247 

Answers:

1. Yes it is possible to stop roll back.

https://www.servicenow.com/community/developer-forum/atf-setting-the-quot-exclude-from-rollback-quot....

 

2. The best practice is to create one TEST which will include both TEST1 & TEST2 as they are depended. It is good to have 4-5 test(big) for INC instead of 10 small test.

 

 

Regards,

Shaqeel


***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.

***********************************************************************************************************************





Regards

Shaqeel