
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2019 12:42 PM
The Use Case I am trying to automate using ServiceNow ATF involves:
1. Creating an Event record with specific values (Record Insert into Event table {'em_event'}).
2. Validate that the new Event record contains an Alert number in the 'Alert' variable (Record Validation from Step 1).
This is now where I am stuck. I am trying to query a record from the Alert table ('em_alert') , whose [Alert.Number = Event.Alert]. I have tried 'Record Query', and 'Open Existing Record'. Both don't seem to work.
The next step would then be to query a record from the Incident table, whose [Incident.Number = Alert.Task], then validate a few variables within the Incident record.
The logic behind this is that an Alert is mapped to a new Event based on the input criteria of the Event. Then an Incident record is created from that Alert with specific pre-populated values.
Can anyone offer a solution or some advise? I would greatly appreciate it.
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 12:41 PM
So after some intense research, practice, and self-teaching, I figured it out 🙂 Basically, I needed to use 2 'Run Server Side Script' Test Steps for each call.
Test:
Test Result:
1st 'Run Server Side Script' Test Step:
2nd 'Run Server Side Script' Test Step:
For now, this is my best solution. However, if someone has a way to accomplish this with only one 'Run Server Side Script' Test Step, I would appreciate that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 07:31 AM
Could you show us the steps you've used so far with screenshots? I think you'll need to do a record query AND open existing record based on the record query.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 08:45 AM
Hi Brad,
This is what I have thus far...
And the result is...
I am trying to Query from em_alert, where Number = (Record Insert.Record.Alert), and then eventually Query from incident, where Number = Alert.Task.
Hope this information helps. I appreciate any advise or suggestion.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 09:39 AM
I hear a Server Side Script can be used to accomplish this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 12:43 PM
I was able to accomplish this with a 'Run Server Side Script' Test Step. Feel free to view my Accepted Solution for information purposes. Thanks!