The CreatorCon Call for Content is officially open! Get started here.

How to Verify Group's Role using Role's Sys ID

ashok9034
Tera Contributor

Hello,

I'm using ATF Test to validate if a Role is added or part of an existing Group.

When I'm running the Test, ATF is validating using the sys_id of Created Date instead of sys_id of Role.

Since Created Date is bound to change, it might Fail the script. How to make ATF verify the test using Role sys_id instead of Created Date sys_id?

ashok9034_0-1709629774321.png

 

ashok9034_1-1709629786136.png

Thank you.

3 REPLIES 3

sunwin93
Tera Contributor

Hi @ashok9034 , 

I believe for group role you are using group role table. So Please check display field of that table is true for role.

Please try or correct me if I am misunderstanding your issue.

Please mark helpful if it find so.

Thank You

Sanjeet

Hi @sunwin93 

So, when I'm trying to verify if a Role is added under a Group through ATF Testing, the ATF Test is trying to validate the role with sys_id of Created field instead of sys_id of Role field.

Can you help me on how to pass sys_id of Role for validation?

ashok9034_0-1709637167062.png

Thank You.

Hi @ashok9034 ,

Yes I can help you.

Can you please let me know which test type details and  you are using and servicenow instance.

I will check and please check display value of dictionary of this table "sys_group_has_role" . If value is true for role field or created field. and if it is true for created and then try to change it to role and see.