Avoid rollback in ATF to delete records

Andre27
Tera Contributor

hi there,

we do have an ATF with test step "Send REST Request" which is calling an instance API to create HR cases. Those created HR cases will not be rolled back after ATF is completed (because it´s a separate API call).

But I like to cleanup those case at the end of my ATF. How can I do the cleanup? Test step "Delete Record" will be rolled back? Can I mark a test step not to be rolled back?

Thanks Andre

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

cleanup should happen OOB

Check link shared by Matt

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I know ATFs do a rollback OOTB. The issue is the rollback is not working if ATF is calling an REST API on the same instance. In this scenario records (created by REST API via ATF) will not be deleted 😕

Thanks Andre

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Just to check, your question is about cleaning up the records which got created - through the REST call - in an other system?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark,

yes it´s about cleaning up the record created by REST call. But no not in an other system. It´s in SN instance as well. I´m testing my own REST API on the same SN instance where ATF is running too.

Thanks & Regards

Andre