record validation step in ATF

ShaziyaS1041050
Tera Contributor

After the record insert step in atf and i want to validate the record but when i am trying to run the TEST , iam getting failure in test saying that record is not found even though the record was inserted successfully

 

9 REPLIES 9

Ankur Bawiskar
Tera Patron

@ShaziyaS1041050 

Share steps screenshots.

Did you try testing with admin role?

If my response helped please mark it correct and close the thread so that it benefits future readers.

G Ponsekar
Tera Guru

Hi @ShaziyaS1041050 ,

 

The record might still be in the process of being committed to the database when the validation step attempts to find it.

Solution: Introduce a delay before the validation step.

  • Add a "Wait" step: You can add a specific "Wait" test step in your ATF test, specifying a duration (e.g., 5-10 seconds) to allow the database to commit the record.
  • Use gs.sleep(): If your validation is within a server-side script, you can use gs.sleep(milliseconds) to introduce a pause.
  • Increase the Timeout on the Validation Step: You can also set a timeout on the validation step itself, as described in this ServiceNow Community post.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

 

Thanks, GP

ShaziyaS1041050
Tera Contributor

@OlaN
@Ankur Bawiskar 
here is the screenshot , into the other atf as well only these steps i have added but that was running fine and 

ShaziyaS4380655_0-1755076377382.png

ShaziyaS4380655_1-1755076921021.png

ShaziyaS4380655_2-1755076949410.png

 

Is the test created in Global scope ?
I can see that you try to create and read a record from a scoped app. Are there permissions to read from Global to this scoped app ?

Yes test is created in a scoped application and iam trying to create and read a record  within the scoped application itself .