- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019 11:20 AM
I’m new to ATF and have only created a couple of tests so far, but really liking this feature. I’m stuck on creating a test though and can use some guidance. Here is the process I want to test: A specific user (Agris Support) forwards an email from Outlook to ServiceNow. This email then triggers a ServiceNow inbound action which creates a sc_task assigned to the Agris Support group.
So I would think my ATF test would be fairly simple with two steps; (1) insert email record, (2) check for the sc_task created by the inbound action. I’ve already successfully created the first step that inserts a record into the sys_email table with the User ID field set to Agris Support user. This SHOULD trigger the inbound action. It’s this second step I’m unsure on. I would think I want this step to be a Record Validation on the sc_task table. If I select Record Validation, it defaults the table to sys_email, but I can change this to sc_task where I want to validate the task was created by the inbound action. The next field to set on Record Validation is the Record filed. My only options on this field are to either select a specific SCTASK number, which I don’t know what that will be at this point, or select the record inserted by step 1 which is in sys_email table which is not the correct table.
Any suggestion on how to accomplish this test would be appreciated.
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019 05:37 PM
Doing inbound email validation in ATF is not a simple exercise, it requires 2 setup stages.
1. Insert the sys_email record with all the details you'd expect from the email
2. Insert a record into the sysevent table, with Param1 being the Step1 Record, and the Name being 'email.read' - it is this step that causes the inbound action to fire
3. do a Record Query step to validate that the sc_task was created. Make sure to construct your query such that it can only pick up the record you just created. Give it a healthy timeout, like 2 minutes, to ensure the system has enough capacity to process

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019 05:37 PM
Doing inbound email validation in ATF is not a simple exercise, it requires 2 setup stages.
1. Insert the sys_email record with all the details you'd expect from the email
2. Insert a record into the sysevent table, with Param1 being the Step1 Record, and the Name being 'email.read' - it is this step that causes the inbound action to fire
3. do a Record Query step to validate that the sc_task was created. Make sure to construct your query such that it can only pick up the record you just created. Give it a healthy timeout, like 2 minutes, to ensure the system has enough capacity to process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2019 12:55 PM
Adding the record into the sysevent table was the missing piece. Once I did that it worked. Thanks!