Test Case "Error Behavior" summary?

Ask general questions here.
ajw
Posts: 12
Joined: Wed Sep 26, 2012 8:28 am

Test Case "Error Behavior" summary?

Post by ajw » Thu Feb 20, 2014 4:27 pm

Hello,

Is there anywhere within the Ranorex Studio where I can find a summary of the Error Behavior settings for all of the test cases? For example:

Suppose my test suite contains 50 test cases - 30 are set to "Continue with Sibling", 10 are set to "Stop" and 10 are set to "Continue with Iteration". Is there any way for me to easily see which are the 10 cases set to "Stop", without having to individually click each of the 50 cases?

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

Re: Test Case "Error Behavior" summary?

Post by Support Team » Fri Feb 21, 2014 2:43 pm

Hi ajw,
Unfortunately there is no global summary of the “Error Behavior”-settings. As a workaround you can add following code to your project which will output every TestCase plus “Error Behavior” within your TestSuite.

Please note that undocumented API methods are used. It is not recommended and we do not guarantee for any side effects.
var TS = (TestSuite) TestSuite.Current;
			IList<TestSuiteEntry> entryList = TS.GetAllTestSuiteEntries();
			
			
			foreach(TestSuiteEntry entry in entryList){

				if(entry.GetType().FullName == "Ranorex.Core.Testing.TestCase"){
					
					var TC = (TestCase)entry;

					Report.Info("Entry Name: "+entry.Name + " Error Behavior: " +TC.ErrorBehavior.ToString());
				}
			}
Note: The internal interpretation of the „Error Behavior“ differs from the „Error Behavior“-setting:
• Continue with iteration : ContinueNextIteration
• Continue with sibling : ContinueParentIteration
• Stop : Stop
• Continue with parent : ContinueParent

Kind regards,
Robert

User avatar
Florent
Posts: 67
Joined: Wed Jul 04, 2012 3:31 pm
Location: Amiens / France

Re: Test Case "Error Behavior" summary?

Post by Florent » Mon Mar 02, 2015 4:59 pm

Hi,
Thank you for this answer.
Is there a workaround solution to globally modify the behavior on error ?
i mean a workarround solution more global than this one :
http://www.ranorex.com/forum/error-beha ... t2693.html

Into the rxst file, the tag "errorbehavior" contains the value that defined what we want to change.

With the right keywords (ContinueNextIteration, ContinueParentIteration, Stop and ContinueParent) can we apply a "search and replace" with knowledge of consequences ?

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

Re: Test Case "Error Behavior" summary?

Post by Support Team » Tue Mar 03, 2015 6:40 pm

Hi Florent,

There is currently no global setting to change all error behaviors at once.

Modifying the XML of the TestSuite is not recommended and not supported.
Besides that, you could do it anyway on your own, but please also note that there is no "errorbehavior" attribute in the XML in case the error behavior is "Continue with Sibling", which is the standard setting.
The names of the different error behaviors in the XML of the TestSuite in Ranorex 5.3 are: ContinueNextIteration, <Nothing for Continue with Sibling>, ContinueParent and Stop.

Regards,
Markus

ngaruko
Certified Professional
Certified Professional
Posts: 4
Joined: Thu Apr 21, 2016 1:03 am

Re: Test Case "Error Behavior" summary?

Post by ngaruko » Sun May 22, 2016 9:34 pm

Hi Support,

I have just started using Ranorex in my new role. We have a legacy solution that needs a lot of maintenance. During testing, we do a lot of "Stop" on Error Behavior just to be able to see what happened and eventually re-record our modules. The problems is, we are a couple of testers working on the project and often, we forget to switch back to "Continue" for our tests to run overnight. At the moment, it is even hard to know where these breakpoints are since it is a lot of test cases.
I am just checking if this may have been added as a feature or if there is such a plan in the future. I mean, it would be really good to be able to view at once all test cases that have a Stop on them...and possibly to set an error behavior for all test cases at once!
Thank you.

Bede

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

Re: Test Case "Error Behavior" summary?

Post by Support Team » Tue May 24, 2016 3:19 pm

Hi ngaruko,

Unfortunately, there is currently no such a feature to change the error behavior of all TestCases at the same time.

If you want to submit a feature request, I would like to ask you if you could send us an email with a detailed description of your intention to [email protected].

I'm looking forward to your email.

Kind regards,
Matthias