How to use GlobalData variables in tests

99 views
Skip to first unread message

Sameer Boxi

unread,
Mar 11, 2020, 1:34:38 AM3/11/20
to Cognizant Intelligent Test Scripter
I have test data in GlobalData and Login worksheet. I am able to call Login test data as "Login:UserID" but how to call out the data in tests from GlobalData sheet?

Krishna Kumar

unread,
Mar 11, 2020, 2:13:52 AM3/11/20
to Cognizant Intelligent Test Scripter
It's expected behavior. The global data sheet meant to store the common data across all datasheets. If you are looking to have data at the test case level, please use user-defined variable.

Sameer Boxi

unread,
Mar 12, 2020, 4:57:34 AM3/12/20
to Cognizant Intelligent Test Scripter
So it that mean, we can't use data from global data sheet? 

shantha laxmi kumar

unread,
Mar 12, 2020, 5:30:07 AM3/12/20
to Cognizant Intelligent Test Scripter
You can use the data in the global sheet but only in the test data sheet level. Please understand that the usage of this global sheet is to store global data across data sheets. You can indirectly access this data from the test case, using the other data sheets. Further if you directly want to access the global data you can create global variables under "user defined " tab of the Run settings.

Sameer Boxi

unread,
Mar 16, 2020, 12:45:47 AM3/16/20
to Cognizant Intelligent Test Scripter
Thanks for letting me know, we can't directly call global data sheet in tests. But as you said I can use data from global sheet to another test data sheet. How to call global data in other data sheet (syntax to call)?

I have URL, UserId and password in global data sheet and want to pass in Sanity data sheet. What should be the command in sanity datasheet cell?

Krishna Kumar

unread,
Mar 17, 2020, 2:18:46 AM3/17/20
to Cognizant Intelligent Test Scripter
Please follow the below steps to create data in the global datasheet.

1) select the cell in test data which you want to create it as Global data and in the test data panel, find the button (in globe shape) and click it
3) Give a name for the global data with the prefix "#" for example #gd, the new Global data created
4) Navigate to Global Data tab and see the new entry created
5) In the test case use the test data which needs to refer it from Global data

Thanks
CITS Support team
Reply all
Reply to author
Forward
0 new messages