Page 1 of 1

How to get a list of test case guid

Posted: Tue Dec 04, 2018 12:00 am
by ewu
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

Re: How to get a list of test case guid

Posted: Tue Dec 04, 2018 3:18 pm
by odklizec
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

Re: How to get a list of test case guid

Posted: Tue Dec 04, 2018 3:57 pm
by ewu
Problem solved!
:D Thanks!