Automated Test Framework - Cannot validate Additional Comments or Work Notes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 11:21 AM
In our instance, we have a business rule that will add the Close Notes of a Incident or Catalog Task to the Work Notes of the Parent Record. In other words, once a subtask closes, the Close Notes will be copied into the Work Notes of the Parent Task.
When I attempt to use a Server Validate or Form Validate in Automated Testing to make sure the Work Notes are updated, I cannot find the fields anywhere to do so.
Steps followed in Automated Test Framework
- Create Record Producer (for Catalog Item)
- Set Variables in Catalog Item
- Submit Record Producer
- Record Insert - sc_task with Step 3 as Parent
- Record Query to confirm Parent - Child Relationship
- Record Update - Fill in Mandatory Fields
- Open Existing Task
- UI Action to Close Task
- Open the RITM Form (generated from Catalog Item)
- ****Cannot find Fields to verify Work Notes updated from sc_task Close Notes****
The ServiceNow docs have failed me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2019 08:11 AM
Hi Nitesh,
I tried creating a script to read the sys_journal_field table with a Server Side script, but I cannot figure out how to get the current open form id in the automated test. Any thoughts on how to accomplish what you mentioned?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2019 06:55 AM
When you say you want to open the form id you mean you want to open the parent record where the work notes have been inserted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2019 07:01 AM
Hi Nitesh,
That is correct. The "Close Notes" field from the INCTASK will be copied into the "WorkNotes" field of the parent INC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2019 02:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2020 07:07 AM
I found Yaraslau's gif exceedingly helpful. Sadly in my sys_history_line table I wasn't able to find details of the record I created in the ATF tests. Working with my ignorance I reverted to using the sys_audit table and, though unable to snag the ids for user or created record (greyed out!?) I was able to construct a test that did what I wanted. As the image does not exactly show:
- Table Name was the name of the task extended custom scope table that I was testing
- New Value was the work_note the previous step had added
- Instance: Orlando