- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 11:36 AM
I am creating an ATF Test to test an Incident from start to finish - from submission on our Service Portal to work completion/closure in ServiceNow. I have the Service Portal submission piece working just fine, but have run into some issues trying to create the Steps/Actions in working/closing the Incident in ServiceNow.
Once an Incident of this type is created, it is assigned to our "Document Services" group. So what I am trying to do is create a step to select a random user from the Document Services group, impersonate that user, and then set the "Assigned To" field on the Incident equal to this random user.
But I am having issues selecting this random user. If I do a Record Query step on the sys_user table, the issue is that Groups are not part of this table. So I tried doing a Record Query on the sys_user_grmember table, where the Group field was equal to "Document Services". It did not seem to like that.
Here are what my current steps look like. It is choking on step 6:
The error message it is returning is:
FAILURE: No records matching query:
Group = Document Services
I do have active members in my Document Service group.
What am I doing wrong? How can I accomplish my goal?
Thanks
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 11:59 AM
Hello,
Are you on ServiceNow New York? If you are, you can use the "Server -> Create New User" Step Configuration instead. In the Step Configuration, you can assign the user to the 'Document Services' Assignment Group.
If you're not on New York, your query should be to query a user from the sys_user table where 'Primary Assignment Group' is "Document Services".
Regards,
Gerald Onyia

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 11:59 AM
Hello,
Are you on ServiceNow New York? If you are, you can use the "Server -> Create New User" Step Configuration instead. In the Step Configuration, you can assign the user to the 'Document Services' Assignment Group.
If you're not on New York, your query should be to query a user from the sys_user table where 'Primary Assignment Group' is "Document Services".
Regards,
Gerald Onyia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 12:18 PM
Of course! So brilliantly simple!
Thank you so much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2020 12:24 PM
Not a problem man! Happy to help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2020 09:42 PM
Hi,
I don't see there is a field "Primary Assignment Group" in sys_user table.
So is thr other way to impersonate?
Thanks