In ATF Process unable to create a new user without admin role in a test step after Zurich Upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
While executing an ATF test case that creates a user with a specific role (not an admin role), the process fails during user creation with the following error:
"FAILED TRYING TO EXECUTE ON CONNECTION glide.2 (connpid=37009): INSERT INTO sys_user_grmember (`sys_id`,`sys_updated_by`,`sys_created_on`,`sys_domain`,`sys_updated_on`,`user`,`sys_created_by`,`group`) VALUES('494822993b50b21036672a4a85e45ade','system','2025-09-29 12:44:24','a2c564ab1bacd91018bfec60f54bcb21','2025-09-29 12:44:24','854822993b50b21036672a4a85e45abe','system','5ee74940b70022108d4406dd1e11a918') /* expoedev004, gs:glide.scheduler.worker.5, tx:9048a6593b50b21036672a4a85e45add, hash:-298895666 */
Unique Key violation detected by database ((conn=37009) Duplicate entry '5ee74940b70022108d4406dd1e11a918-854822993b50b21036672a4a85e4...' for key 'group_2')"
This error is blocking execution and impacts all related ATF test cases.
The issue occurs due to the group: Conditional Script Writer group
Could anyone please help on this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi,
The error indicates that the user you've created is already a member of that group, does a previous step or a piece of system automation auto-add the user to this group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi Kieran,
Thanks for the response.
Yes it indicates that user is already added in that mentioned group. System automatically add the user to this group.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
If the system auto-adds them, don't include the group in the step otherwise this error would occur

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Possible reasons-
ATF step attempts to create a relationship between a user and a group using record insert.
If the combination of user and group already exists in the sys_user_grmember table, the database prevents the insertion to maintain uniqueness.
This is common when you use the same test data, or if a prior test run was not properly cleaned up
Way to resolve It-
Check for Existing Membership: Before attempting to create a new relation, search (record lookup) for an existing sys_user_grmember record with the same user and group.
Conditional Insert: Only insert if that relationship does not exist yet.
Use Fresh Test Users/Groups: Consider creating a new user and group for each ATF run to avoid conflicts.
Test Cleanup: Ensure test data is cleaned up at the end of each ATF run to avoid lingering relationships.
Thanks,
Dhananjay.