Avoid rollback in ATF to delete records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 01:58 AM
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
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 02:21 AM
Hi,
There should* be no need. ATFs rollback all work done (on the test instance) during the test run.
(Which is why you should never run them in prod).
hth,matt
* https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714767
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 04:07 AM
Hi Matt,
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 05:31 AM
Apologies, I should have read the question properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2022 05:40 AM
in an attempt to make amends, could this be helpful?
https://community.servicenow.com/community?id=community_question&sys_id=148f9d0ddb6deb84b1b102d5ca96...
Prolly should dig a bit more but am in a meeting 😞