Why Does My ATF Test Hang-Up When It Finishes and should be Rolling Back changes?

jmiskey
Kilo Sage

I have an ATF that seems to go through all the Steps successfully, but hangs up and never finishes.  It looks like it is getting hung up on the Rollback piece.  I have to Cancel Pending Steps, but when I look at the results, it shows every single step as being a success, and doesn't show any errors.  I have these tests in a Suite, so it never gets to the next Test.

Basically, what the test does is the following:

1.  Impersonate an Active User and submit a transaction from the Service Portal, which creates a RITM (Steps 1-5),

2.  Impersonate the User's Manager and approve the RITM (Steps 6-10)

3.  Create a User, make them a member of the Group the Task is assigned to, and Impersonate that user (Step 11)

4.  Open the Task and have the User updates fields and variables, and Close the Task (Steps 12-19)

5.  Open the Form and confirm that the State is "Closed Complete" (Steps 20-21)

So steps 1-19 work just fine.  If I run a test without steps 20-21, it works perfectly.  It seems that when I add steps 20-21, that is when the problem occurs.

This is what those two steps look like:

find_real_file.png

I am not sure what it is about these last steps it doesn't like and hangs up on (even though the Test Results say steps 20 and 21 are Successful).  Could it be that I am still that Impersonate User I created in Step 11?  If so, how do you "Un-Impersonate" a user?

Does anyone know why the test might hang up when trying to roll-back?

1 ACCEPTED SOLUTION

jmiskey
Kilo Sage

So I ended up opening a HI Ticket on this.  It is actually hanging on "reporting results", which it does at the end of the testing. 

They said this is a known issue (PRB1378364), and the current workaround is to go to Automated Test Framework --> Properties, and uncheck the "Test Debugging Properties" checkbox.

I did that, and then it completed successfully.

View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I do remember seeing an ATF/Catalog related PRB at one point that prevented the test from rolling back if the catalog item had use cart layout set to false, but if this usually works without the last couple of steps that may not be your issue. If this is repeatable you're probably best off opening a hi case.

I am not working with any PRB records in this test.  I will open up a HI Ticket.

Do you know if there is a way in ATF testing to "Un-Impersonate" a User?  Or is it simply a matter of choosing to impersonate someone else?

Thanks

jmiskey
Kilo Sage

So I ended up opening a HI Ticket on this.  It is actually hanging on "reporting results", which it does at the end of the testing. 

They said this is a known issue (PRB1378364), and the current workaround is to go to Automated Test Framework --> Properties, and uncheck the "Test Debugging Properties" checkbox.

I did that, and then it completed successfully.