Ok, I tried for some time after having off on Sunday and found that I can't
log in to Jira for some strange reasons even though I have an account on
Xircles ..
Nevertheless , I found one jira which is being opened since last year(
https://jira.codehaus.org/browse/JBEHAVE-755)which talks about retry logic
, so can I put this comments in the same jira? pls advise..
IF we need to implement the retry logic in Jbehave, would that be API level
change which has to be released properly?
I have one solution as creating a flat file with failed scenarios and
creating a story on the fly..is this possible with current Jbehave 3.8
stable release version? Pls advise.
Sorry for asking too many questions:(..
Also , I had mistake in the code snippet in my previous mail..the correct
code snippet can be given as
@Given("user is on Home page")
    public void userIsOnHomePage() throws  RestartingScenarioFailure

{
        pages.home().open();
    }

but this is not enabling to run the failed scenario re-run again? Any more
coding I'm missing?Pls advise.

Awaiting the reply..



On Sat, Aug 10, 2013 at 10:50 PM, Mauro Talevi
<mauro.tal...@aquilonia.org>wrote:

>  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>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
>>
>>
>>
>
>

Reply via email to