Hello,
I'm trying to get a list of the test case names that are active. However, I can't seem to get the right information back. I keep getting one item with the name "SpaceTRAXbuild" whereas I'm expecting to get two items back with names "Create_and_log_into_New_Department" and "Initial_inventroy"
Below is the code I came up with after looking through multiple posts on this forum and Ranorex's API reference page.
Code: Select all
TestSuite ts = new TestSuite("SpaceTRAXbuild");
TestSuiteRunConfig tsrc = new TestSuiteRunConfig("Build_Single_Test", ts);
ts.Run();
var entries = TestSuite.Current.SelectedRunConfig.GetActiveTestContainers();
foreach(var entry in entries)
{
var testcase = entry as TestCaseNode;
if(testcase != null)
{
//I get one entry back only and the Name is "SpaceTRAXbuild"
string testcaseName = testcase.Name;
}
}