No, you don't duplicate the method. You need to implement some logic in
the same method to catch a known exception (based on the logic
implemented in your pages) and rethrow a RestartingScenarioFailure,
where appropriate.
Implementing a retry logic is possible, but not trivial. It involves
persisting the results of the previous run which is not easy to do
without taking into account the interaction with the embedding system.
Feel free to raise a JIRA issue, it may get some ideas flowing.
Cheers
On 10/08/2013 16:29, Selenium Learner 2013 wrote:
Hmm..
So if I have a step defined as for an example:
@Given("user is on Home page")
public void userIsOnHomePage(){
pages.home().open();
}
and I want to run this step again if it fails while running it through
Jenkins Job then do I need to include something like
@Given("user is on Home page")
public void userIsOnHomePage() Throwable
RestartingScenarioFailure("Failed scenario")
)
{
pages.home().open();
}
in the code so that it can re-run again? Pls advise.
Please let me know if you have any questions.
PS: I think if Jbehave can include retry logic feature then it would
be great as we can do it in TestNG which takes automation framework to
the next level..Do I need to raise Jira if you permit?
On Sat, Aug 10, 2013 at 8:07 PM, Mauro Talevi
<mauro.tal...@aquilonia.org <mailto:mauro.tal...@aquilonia.org>> wrote:
No, there is no such feature currently.
What is possible is to implement some logic in your step to verify
failure/success according to your criteria and, if failed, you can
throw a RestartingScenarioFailure exception which will tell the
runner to restart the scenario, i.e. re-execute the scenario steps.
On 09/08/2013 14:49, Selenium Learner 2013 wrote:
Hi All,
Is it possible in Jbehave to run failed scenarios once again
after finishes jenkins job like kind of Retry logic? Please
advise .If possible then any documentation available in Jbehave?
Regards,
Selenium-777
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email