Mark iteration as success and skip therest of the recordings
Posted: Tue Jul 12, 2016 4:10 pm
Hello,
I have looked through the forum for some code to solve my issue, but have not found exactly what I want to achieve.
My issue
I have a testcase with 10 recordings. We use a data-driven method to create iterations on this test case.
Most iterations are about the "happy-flow" where you follow all the steps from beginning to end and then you're done. Some iterations however are used to test non-happy flow; these end in a certain results on recording 6 after which the test case is actually successful. At this point there is no need to run recording 7-10 anymore.
Ordinarily I would create a separate testcase for these non-happy flows, but for this project I do not want to do that. The AUT is a Magento-based website with 9 different store views. Most store views are the more or less the same, so I created a testcase for each store view and want to apply data-driven to them. Creating a separate testcase for all 9 store views, would mean that I end up with 18 testcases, rather than 9. This would also mean we need to maintain 18 testcases and maintain 18 data sources. This is something we want to avoid.
In more detail
From the 10 recordings in a testcase, I want to call a specific method by means of an IF-statement and perform some validation checks. When this IF-statement is called and the validation checks are all successful, I need a piece of code that will then:
- Skip the remaining recordings 7-10.
- Mark the iteration as successful.
- Continue with the next iteration.
I have checked several threads already, but none of the below provide me with an answer:
http://www.ranorex.com/forum/how-to-ove ... t6354.html
http://www.ranorex.com/forum/skip-itera ... t7917.html
http://www.ranorex.com/forum/skip-recor ... t6153.html
I have looked through the forum for some code to solve my issue, but have not found exactly what I want to achieve.
My issue
I have a testcase with 10 recordings. We use a data-driven method to create iterations on this test case.
Most iterations are about the "happy-flow" where you follow all the steps from beginning to end and then you're done. Some iterations however are used to test non-happy flow; these end in a certain results on recording 6 after which the test case is actually successful. At this point there is no need to run recording 7-10 anymore.
Ordinarily I would create a separate testcase for these non-happy flows, but for this project I do not want to do that. The AUT is a Magento-based website with 9 different store views. Most store views are the more or less the same, so I created a testcase for each store view and want to apply data-driven to them. Creating a separate testcase for all 9 store views, would mean that I end up with 18 testcases, rather than 9. This would also mean we need to maintain 18 testcases and maintain 18 data sources. This is something we want to avoid.
In more detail
From the 10 recordings in a testcase, I want to call a specific method by means of an IF-statement and perform some validation checks. When this IF-statement is called and the validation checks are all successful, I need a piece of code that will then:
- Skip the remaining recordings 7-10.
- Mark the iteration as successful.
- Continue with the next iteration.
I have checked several threads already, but none of the below provide me with an answer:
http://www.ranorex.com/forum/how-to-ove ... t6354.html
http://www.ranorex.com/forum/skip-itera ... t7917.html
http://www.ranorex.com/forum/skip-recor ... t6153.html