Ok Mauro..since it's sometimes useful to re-run the failed stories rather than failed scenarios as stories contain scenarios.. Can you please raise the Jira for retry logic ? Pls advise.I tried every option to log into jira but failed every time including trying the link suggested by you..
On Thu, Aug 15, 2013 at 2:29 AM, Mauro Talevi <mauro.tal...@aquilonia.org>wrote: > The point that Gabor is making is a valid one and I tend to agree. > > BDD is primarily intended to be used in a CI env, where you want to catch > regressions. By definition to catch regressions one has to run all > stories and scenarios. > > But it may be sometimes useful to re-run just the failed stories. > > > On 13/08/2013 17:01, Selenium Learner 2013 wrote: > > Ok Gábor.No issues, thanks for replying to the thread. > > Collect failing tests with a script and run them selectively. > For above one, I already suggested, creating flat file with all scenarios > inside it and then creating the story on the fly and run it but as per > Mauro, its not possible with 3.8 stable release version.Currently I am > finding difficult to log jira as cant log into jira application.If you've > an access , can you please log a jira so that feature can be available in > future release. > Another solution I have is creating custom annotation for retry like > we've given stories,named and if we can somehow put on step method then if > scenario fails then it can re-run it after first execution cycle but don't > how I can do it and whether it's feasible or not... > > Please let me know if you've any questions.. > > > On Tue, Aug 13, 2013 at 3:54 AM, Czigola Gábor <czig...@gmail.com> wrote: > >> I'd not include such logic in a test as a test should either fail or >> pass. Retry logic is prone to flaws. (Resources, transactions, >> pre-conditions could be dangling.) >> >> Why do you need to retry? I guess your tests could be >> unstable/undeterministic and you would prefer to try again before reporting >> a failure? Solutions: >> >> - Fix your environment, mocks, stubs, drivers and system-under-test to >> get stable deterministic results. >> >> - Collect failing tests with a script and run them selectively. >> >> Sorry that I can't help you further but it seems to me that there is an >> underlying problem that retriyng would not fix. >> >> >> On Tue, Aug 13, 2013 at 12:10 AM, Mauro Talevi < >> mauro.tal...@aquilonia.org> wrote: >> >>> No, the issue JBEHAVE-755 address a different concern: that of >>> retrying in the same execution run, not in a subsequent one, which is what >>> you seem to be after (if I understood correctly). >>> >>> If you want to use the RestartingScenarioFailure, then as already said >>> you need to implement yourself the logic for when it's thrown, by catching >>> a known exception: >>> >>> >>> @Given("user is on Home page") >>> public void userIsOnHomePage() { >>> try { >>> pages.home().open(); >>> } catch ( YourException e ) { >>> throw new RestartingScenarioFailure(e); >>> } >>> } >>> >>> Implementing the full retry logic is not trivial, as already said, and >>> touches the internals of the runner. I don't think it's possible to >>> implement with the current low-level 3.8 API. >>> >>> If you have problems accessing JIRA, please raise an issue at >>> https://jira.codehaus.org/browse/HAUS. >>> >>> >>> On 12/08/2013 15:28, Selenium Learner 2013 wrote: >>> >>> 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 >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> > >