
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
02-03-2022 08:12 AM - edited 08-03-2024 07:11 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
Browsing through the San Diego release notes, my eyes caught "Use breakpoints to debug an automated test". That sounds interesting for debugging a test (step)!
Let's have a closer look at this new feature within Automated Test Framework.
Use breakpoints to debug an automated test
"Pause a test to troubleshoot failures or unexpected behavior by adding a breakpoint for a particular test step. You can now also pause before rollback at the end of the test."
Note: Breakpoints are session specific.
Add/Remove Breakpoint
Basically the use of breakpoints to debug an automated test consists of a context menu item "Add/Remove Breakpoint" which is available on the Related List "Test Steps" on the Test form lay-out (right-mouse-click on a Test Step). After setting the Breakpoint, the Test Steps display name will also get some additional styling.
To make use of the breakpoint set, instead of using the normal "Run Test" UI Action, use the newly added "Debug Test" UI Action.
Pause before rollback
Notice when clicking the "Debug Test" UI Action, on the modal also a new checkbox is visible: "Pause before rollback". This allows you to review the Test or touched data for example, before any changes are automatically rollbacked. Another great addition for debugging purposes.
Paused at breakpoint
When a breakpoint is hit, the Test will pause for a maximum duration of 10 minutes. When ready yourself, you can proceed the Test manually. Within the Client Test Runner these options will be shown:
If you used the "Pause before rollback" checkbox, at the end of the Test again the Test will be paused for a maximum duration of 10 minutes. When ready yourself, you can proceed the "Run Test" modal, a "Continue" UI Action will be visible.
---
And that's it. Hope you like it. If any questions or remarks, let me know!
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Platform Architect @ Eraneous
3x ServiceNow Developer MVP
3x ServiceNow Community MVP
---
- 1,780 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This was very helpful - thank you! I had seen/heard about the rollback feature in ATF for San Diego and was very happy! When trying to figure out how to use this feature, I couldn't find documentation on docs.servicenow.com (until I found your reference in the community). I had searched for the keywords of "rollback" and "atf rollback" and didn't find an article.... I didn't expect to see it as an additional note type of information on the break point page.
If anyone from ServiceNow see's this note, it would be wonderfully helpful if features that are NEW to a release had their own section or way to filter for them. It shouldn't be difficult to find the new functionality on a release... IMHO 🙂
If you are upgrading to San Diego (rather than a new install), you may need to check the sn_atf.debug property and set to "true" if not already set.
Link to the docs.servicenow.com page for atf break points, which happens to include the pause rollback feature.
Debug an automated test using breakpoints (servicenow.com)