[Solved] How to know status of a previous test case?

Ask general questions here.
Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

[Solved] How to know status of a previous test case?

Post by Florian » Tue Feb 05, 2013 6:25 pm

Hi,

I am running a TestSuite in which there are many test cases. At the end, I put a code module which will send email if one of the test cases failed. But how can I know that?
I attach a screenshot of my TestSuite.

As you can see, in the code module "Alerte" I would like to check the status of the module "CheckPaiementRuntime" inside the testcase "SeConnecter". is it possible to do that?

The workaround I tried is to use one global parameter called for example paramError.
The "CheckPaiementRuntime" module is only one User Code Action inside a try/catch. Inside the catch, I wrote:

Code: Select all

catch (Exception e)
{
	Report.Error(e.ToString());
	TestSuite.Current.Parameters["paramError"]="yes";
}
But for example, if Ranorex doesn't find an element, it doesn't go inside the catch ... :(

How can you help me?
Attachments
ranorex.PNG
TestSuite
ranorex.PNG (29.61 KiB) Viewed 736 times
Last edited by Florian on Wed Feb 06, 2013 11:31 am, edited 1 time in total.

Florian
Posts: 75
Joined: Fri Jul 27, 2012 12:57 pm
Location: France (Lyon)
Contact:

Re: How to know status of a previous test case?

Post by Florian » Wed Feb 06, 2013 11:31 am

I know where is my issue!

Actually I use a simple Data Table for the "TestCase" test case. I wanted to change the global parameter using the current row of the current test case. But the thing is, when I try to do this, I am in a child test case. This last one doesn't have the simple data table. Thus I put a module variable linked to the parent test case and use this variable ...

It is so simple that I didn't see the mistake!

And by the way, the program does go inside the "catch" ;)