How to select test cases in current configuration using code

Class library usage, coding and language questions.
ujjainkarh
Posts: 8
Joined: Fri Jul 10, 2015 6:39 am

How to select test cases in current configuration using code

Post by ujjainkarh » Fri Jul 10, 2015 8:38 am

Hi,

I am working on utility to run failed test cases using code after first round of execution. I want to select and tick failed test cases in .rxtst file from current run configuration.

I am trying to set .Checked status of test case but not able to do it using code. I have used below code.

// Get current active test cases from configuration
IList<TestCase> testCaseList = TestSuite.Current.SelectedRunConfig.GetActiveTestCases();
foreach(TestCase tc1 in testCaseList)
{
Report.Info("Test case checked "+tc1.Checked.ToString());
Report.Info("Name of checked Test case "+tc1.Name.ToString());
tc1.Checked= false;
}

Is there any way to select and rerun failed test cases from rxtst using code?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to select test cases in current configuration using code

Post by Support Team » Tue Jul 14, 2015 9:27 am

Hi ujjainkarh,

I’m afraid your intention is inconvertible since re-running the test during the test itself can cause an infinite loop.

But there is already a feature request in our internal bug tracking system and if you want to raise a vote for this feature please send an email to [email protected] since we want to avoid misunderstandings and want to handle each feature request with care.
Thank you for your understanding.

Kind regards,
Markus (S)