ATF Passing value form one Test case to another test case.

prineshkumar
Tera Expert

Hello,

 

I'm working on ATF.

I Have created a test case which will create an incident in service portal.

Now I want to open the same incident and resolve it in another test case. As I'm not able to get any reference from the previous test. I'm not able to open the incident.

 

Help will be appreciated.

Regards,

Prinesh

 

1 ACCEPTED SOLUTION

prineshkumar
Tera Expert

By adding the attribute excludeFromRollback=true to the a tables 'collection' dictionary record, the record will be preserved after the test is run.

View solution in original post

3 REPLIES 3

Ankush Agrawal
ServiceNow Employee
ServiceNow Employee

Hi Prinesh

It is considered a good practice to keep the tests independent of each other and this why no provision was given to share the records/configuration between ATF tests. Test data are reverted/deleted post a test execution.

--

Best regards

Ankush

Nitesh Balusu
Giga Guru

Prinesh,

 

Test variables can only be inputted and outputted between test steps of the same test case. They cannot be moved between multiple test cases as ATF cleans up whatever operations it performed after running each test case.

prineshkumar
Tera Expert

By adding the attribute excludeFromRollback=true to the a tables 'collection' dictionary record, the record will be preserved after the test is run.