How to get a list of test case guid

Class library usage, coding and language questions.
ewu
Posts: 4
Joined: Mon Dec 03, 2018 6:32 pm

How to get a list of test case guid

Post by ewu » Tue Dec 04, 2018 12:00 am

Hi,

I'm unable to get a list of current test case guid.

I have tried using

Code: Select all

TestSuite TS = (TestSuite)TestSuite.Current;
IList<TestSuiteEntry> ss =TS.GetAllTestSuiteEntries();
foreach(TestSuiteEntry x in ss)
{
	if(x.GetType()== typeof(TestCaseNode) && !x.DisplayName.Contains("Test Suite"))
		
		Report.Info(x.Id);
}
But I got an error message saying:

Code: Select all

The type 'CaseInsensitiveString' is defined in an assembly that is not referenced. You must add a reference to assembly 'Ranorex.Libs.Util'
How can I fix this error?

Thanks,
Emma

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4047
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to get a list of test case guid

Post by odklizec » Tue Dec 04, 2018 3:18 pm

Hi,

Go to your project, right click References, select Add references and in the appeared dialog, find Ranorex.Libs.Util.dll, which is located in Ranorex\bin folder.
Ranorex.Libs.Utils.png
Ranorex.Libs.Utils.png (83.36 KiB) Viewed 52 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ewu
Posts: 4
Joined: Mon Dec 03, 2018 6:32 pm

Re: How to get a list of test case guid

Post by ewu » Tue Dec 04, 2018 3:57 pm

Problem solved!
:D Thanks!