Hello,
could somebody advice how (during project execution) to stop execution of current test case and continue execution with next test case in same test suite.
Thank you!
How to switch to next test case during execution?
-
- Posts: 2
- Joined: Wed Apr 29, 2015 2:30 pm
How to switch to next test case during execution?
Last edited by Ivan Irbis on Fri Apr 08, 2016 2:59 pm, edited 3 times in total.
Re: How to switch to next recording module?
Hi,
I'm not quite sure what exactly you want to achieve. Could you please add some more details?
I can only assume, that because of some detected (unexpected) state in the middle of recording module, you want to skip the rest of recording and continue with another module?
My suggestion would be to fail the test case (using an exception thrown in recording module) and Continue with Sibling error behavior, as described here:
http://www.ranorex.com/support/user-gui ... html#c3028
Basically, the structure of your solution should look like this:
TestCase1 (Error Behavior: Continue with sibling):
---Module1 <--- make this module to fail => this will skip the rest of steps and jump to Module2
TestCase2
---Module2
I'm not quite sure what exactly you want to achieve. Could you please add some more details?
I can only assume, that because of some detected (unexpected) state in the middle of recording module, you want to skip the rest of recording and continue with another module?
My suggestion would be to fail the test case (using an exception thrown in recording module) and Continue with Sibling error behavior, as described here:
http://www.ranorex.com/support/user-gui ... html#c3028
Basically, the structure of your solution should look like this:
TestCase1 (Error Behavior: Continue with sibling):
---Module1 <--- make this module to fail => this will skip the rest of steps and jump to Module2
TestCase2
---Module2
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
-
- Posts: 2
- Joined: Wed Apr 29, 2015 2:30 pm
Re: How to switch to next test case?
Yes, of course, I will clarify the question:
in the code I want to do:
if (some case)
{
stop execution of current test case, and start execute next test case in current test suite
}
like after I started project execution, if some (my own) validation in some test case didn't passed, the project continue to run from next test case in test suite
..and all this without any errors in report (only warning may be)
in the code I want to do:
if (some case)
{
stop execution of current test case, and start execute next test case in current test suite
}
like after I started project execution, if some (my own) validation in some test case didn't passed, the project continue to run from next test case in test suite
..and all this without any errors in report (only warning may be)
Re: How to switch to next test case during execution?
Maybe try to group your user actions and methods into an if-statement.
So if case is matched it will run the required methods only and the other methods will not be reached during the execution.
Code: Select all
if (case1 == true)
{
Method1();
} else {
Method1();
Method2();
Method3();
}