API documentation

Class library usage, coding and language questions.
CWhiting
Posts: 6
Joined: Thu Mar 08, 2018 9:32 pm

API documentation

Post by CWhiting » Tue Mar 13, 2018 6:07 pm

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?

User avatar
RobinHood42
Posts: 238
Joined: Fri Jan 09, 2015 3:24 pm

Re: API documentation

Post by RobinHood42 » Wed Mar 14, 2018 2:38 pm

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