Page 1 of 1

API documentation

Posted: Tue Mar 13, 2018 6:07 pm
by CWhiting
I was looking through the 8.0.1 API documentation to see if I could create a utility to pull the descriptions on the Test Cases or/and Smart Folders. I began to get confused as sprinkled through the documentation are references to ITestContainer. The IModule page says to see ITestContainer. How I 'see ITestContainer'? Should I see a definition for ITestContainer in the document?

Re: API documentation

Posted: Wed Mar 14, 2018 2:38 pm
by RobinHood42
Hi,

Just created a small code snippet, which allows you to retrieve the TestCase "Description":
var currentContainer = TestSuite.CurrentTestContainer;
        		
        	if(currentContainer.IsTestCase)
        	{
        		var tc = currentContainer as TestCaseNode;
        		Console.WriteLine(tc.Comment);
        	}
Hope this helps :mrgreen:

Cheers,
Robin