ATF is failing on Tests with 2 created users

Community Alums
Not applicable

Hey there!

We have been working with ATF for a while now and loving the feature. Since we were able to quickly test for upgrades and releases, it saves us allot of time. 

However, right now (since a week) we are facing a weird issue we never came accross before. While creating users in a test, always the 2nd one we want to created fails to be added to a group or get roles. This way we can't continue with the test.

We have checked allot (permissions, changes in update sets etc) but we could not find the cause of this. Anyone else has experienced something similar or know the answer to our burning question? 

Thanks in advance!

11 REPLIES 11

Hi,

are you having any before insert BR on sys_user_grmember table which might be blocking adding user to group 'NN_Project Team'

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Tony K
Kilo Sage
Kilo Sage

interesting issues as I just came across this myself. Since it says we should create a user instead of impersonate, I'm trying to create a test that ends up needing to create two users as well. Get the same error about can't create user, but I can't find anything that gives more details behind the error. Guess I'll stick with just an impersonate on one of the create users instead. I guess a guy could open a HI ticket if they needed it resolved. 

Joanna4
Kilo Contributor

I have encountered the same issue (creating and impersonating 2 users in one test). I found workaround. In step 1 create user you will impersonate as the second one (uncheck "Impersonate this user"). Create and impersonate user which you need and perform needed steps. When you need to use the second person (created in step one, but not impersonated) just use step Impersonate (instead of previous Create user and impersonate).
That worked for me 😉

just to clarify, if in step 1 you only create user and uncheck impersonate the newly created user, are you actually doing the testing as the user you just created? or are you just creating a user account? 

Joanna4
Kilo Contributor

I am just creating user. I impersonate it in later steps.
For example:
step 1: Create user Adam Smith (just create, do not impersonate)
step 2: Create user Bob Burrows (create and impersonate)
steps 3-6: test steps to be performed while impersoanting Bob
step 7: impersonate Adam
steps 8-10: test steps to be performed while impersonating Adam.