- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 06:15 AM
So, we have read where it is better to use the "Create a User" Step instead of the "Impersonate a User" step (especially to protect against the situation where a user may become inactive.
We see where you can select Groups/Roles for users when using "Create a User", but what about other "User" related-fields? We have certain Catalog Items that have Criteria that make them only available based on which Department a User is in. But we do not know how we can set the Department field when using the "Create a User" step.
Likewise, some of our Catalog Items have approvals that are based on the User's Manager, so I think we need a way to set the User's Manager when we Create a User, but do not see how we can set a Manager when we use "Create a User".
So how can we set things like "Department" and "Manager" when we use the "Create a User" step in Automated Testing Framework Tests when Testing Catalog Items (for our Service Portal)?
Thanks
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2020 01:14 PM
I'm not sure it's covered in the ATF Fundamentals course, but that is a pretty thorough 8-hour self-paced training course and a great place to start. It is also mentioned, though not with an example, in the ATF webinar and best practices links you can find at this ATF Resources post.
For your use case it would look like:
ATF Test Step 1: Use the record query step to lookup a user that meets the specifications you're looking for (has a department or manager, etc.)
ATF Test Step 2: Impersonate step where you impersonate the user found in the record query step 1.
I've been meaning to write up a detailed post on dynamic selection, but in the meantime hopefully this helps. The ATF Resources post I linked to has a couple of different training links I would definitely work through.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2020 07:17 AM
If you impersonate user at step 1 , you will get logged in as Joe User1 and then be updating the profile.
Does Joe user1 has access to update user's profile, Most probably No. This is where the test would be failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2020 10:39 AM
Similarly to my comments to Brad above, you are absolutely correct.
I see that I cannot impersonate my new user until after updating the record.
Thank you.