With a structure as follows:
- Test Case One
- - Recording Module 1
- - Recording Module 2
How can the test be set up, to run "Recording Module 2", in the event that "Recording Module 1" fails?
If all the action steps in "Recording Module 1" are set to "Enable Continue on Fail", "Recording Module 2" will run after "Recording Module 1" fails, but I don't want those action steps to be "Enable Continue on Fail".
Thanks!
How to run the next module when a module fails?
Re: How to run the next module when a module fails?
Hi,
I think the only way to achieve what you want is to add each recording to a separate Test Case and then you will have to set Error behavior of the one holding "Recording Module 1" as Continue with Sibling.
So the test structure should look like this:
- Test Case One
- - SubTestCase 1 <------set error behavior as Continue with Sibling
- - - - Recording Module 1
- - SubTestCase 2
- - - - Recording Module 2
For more details check this user guide paragraph:
http://www.ranorex.com/support/user-gui ... html#c3028
I think the only way to achieve what you want is to add each recording to a separate Test Case and then you will have to set Error behavior of the one holding "Recording Module 1" as Continue with Sibling.
So the test structure should look like this:
- Test Case One
- - SubTestCase 1 <------set error behavior as Continue with Sibling
- - - - Recording Module 1
- - SubTestCase 2
- - - - Recording Module 2
For more details check this user guide paragraph:
http://www.ranorex.com/support/user-gui ... html#c3028
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: How to run the next module when a module fails?
Thank you odklizec. Yes, I can do it the way you suggest. However, I want to keep the modules in the same TC, if possible.
Re: How to run the next module when a module fails?
I'm afraid, you will either have to use "Enable Continue on Fail" in Recording1 or you will have to use suggested sub-test cases. I think the second one is the easiest and cleanest solution of your problem.
Yet another possibility could be adding some custom code to the Teardown section of Test Case One, where you evaluate the success/failure status of Recording1 and if failed, start the Recording2 from code like this: Recording2.Start();
Yet another possibility could be adding some custom code to the Teardown section of Test Case One, where you evaluate the success/failure status of Recording1 and if failed, start the Recording2 from code like this: Recording2.Start();
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: How to run the next module when a module fails?
Thanks very much for your help odklizec, I appreciate it and will use one of those three options when required.
Re: How to run the next module when a module fails?
Hi i heave another question how run next TestCase using the code ?
suppose I have a situation that I get a mistake at the beginning of the test casa and I want to start the next one but I have to reset all previously made actions, popupwatcher looks after the error window but I would like to add shares to the next test case
suppose I have a situation that I get a mistake at the beginning of the test casa and I want to start the next one but I have to reset all previously made actions, popupwatcher looks after the error window but I would like to add shares to the next test case
Re: How to run the next module when a module fails?
Hi,
As far as I know, there is currently no way to start a TC from code. And there is definitely no way to use popupwatcher to control the test suite flow. The problem with popup watcher is, that it runs in a separate thread and there is currently no way to pause/stop the main test thread from it. So if you hoped to use popup watcher to control the test flow, you should forget about it
The best you can probably do is to create a condition in each test case (following the first one), which would check a presence of string in given global parameter. The global parameter should be then filled from first (any) test case preceding the one with condition. And if the condition in subsequent TC does not find or match the expected string, the TC should start (or not). Hope this helps?
As far as I know, there is currently no way to start a TC from code. And there is definitely no way to use popupwatcher to control the test suite flow. The problem with popup watcher is, that it runs in a separate thread and there is currently no way to pause/stop the main test thread from it. So if you hoped to use popup watcher to control the test flow, you should forget about it

The best you can probably do is to create a condition in each test case (following the first one), which would check a presence of string in given global parameter. The global parameter should be then filled from first (any) test case preceding the one with condition. And if the condition in subsequent TC does not find or match the expected string, the TC should start (or not). Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration