How use API to run each test case from an rxtst config?

Class library usage, coding and language questions.
lyn5000
Posts: 50
Joined: Mon Feb 13, 2012 5:52 pm

How use API to run each test case from an rxtst config?

Post by lyn5000 » Thu Nov 01, 2012 1:37 am

I want a setup and teardown per test case, so that setup happens before every case and teardown happens after every case. However I don't want people to have to add setup and teardown sections every time they create a case.

In program.cs the following line runs the tests:
TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);

Instead I would like to get a list of of all the test cases specified in whatever rxtst configuration is passed from the command line and then iterate through each one as follows (below is pseudo code) in program.cs:
foreach (TestCase tc in TestCasesFromSpecifiedConfig)
{
MySetupMethod();
tc.Run();
MyTearDownMethod();
}

How do I use the Ranorex API to do this? Or is there a better way to achieve this?

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 use API to run each test case from an rxtst config?

Post by Support Team » Fri Nov 02, 2012 2:52 pm

Hi,

Unfortunately this is not possible.
There is no build in functionality which allows you to add specific Modules in the setup or tear down section of each test case.
The test case is also not designed to be executed in code, but I forwarded these requests to be discussed internally.

Regards,
Markus