Closed cristian-m-vasile closed 8 years ago
Hi Cristian! The --retry
flag is a new feature, so this is could be a bug. Could you give us some more information? It'd be helpful to know the Cucumber version you're using, as well as any other options, if any, such as --format
, etc.
Any other context you can give us would also be great, such as any code you're testing and any tests expected to be flaky. Thanks for reporting!
You are right, #992 is also needed to make the retry functionality working.
Oh, has that not been merged yet?
No it hasn't @danascheider. I think it would help to do #999 first actually.
Hi @danascheider, my cucumber version is 2.4.0
and the command i'm using is bundle exec cucumber --retry 1 --tags=@this
. I'm afraid I can't send you any examples of flaky tests, but I can tell you that they sometimes throw Selenium::WebDriver::Error::StaleElementReferenceError
or even RSpec::Expectations::ExpectationNotMetError
when the javascript executes too slowly
Thank you @cristian-m-vasile! It looks like we have some changes we need to merge to make this functionality work, so it is Cucumber, not you. I'm going to review those changes right now.
Hi there. I'm running this as an experimental feature through Jenkins. Before I copy and paste a load of code into here so you can see what I'm doing at my company, can I confirm that this "should" be working currently? Or are there additional items required first?
P.S. Many thanks on this functionality, we currently use the Raketasks, which are a bit more confusing as we then need to setup our profiles
Luke
Hi @luke-hill, right now this functionality is not expected to work. This is our oversight and we're working on getting some other PRs merged that will fix it!
@luke-hill this should be fixed on the master branch. Can you give it a try?
@luke-hill I've released version 3.0.0.pre.1
just now. Try that and see if you get any improvement.
@mattwynne I'm not sure. I ran a set of tests which I know are problematic based off which environment and got the following report in Jenkins.
38 scenarios (16 failed, 22 passed)
Now the 2 features that were ran contained a total of (14+12) - 26 scenarios / outlines.
Something about the report that is output also doesn't sit well with me. (Not sure whether I should paste screenshots here). But one of the failures that is shown to me has passing steps at every juncture (Maybe it failed first time??)
The way we currently re-run tests we can see what happened at each re-run. So we get something like this.
Run1: 26 scenarios: 11 pass, 15 fail. Run2: 15 scenarios: 9 pass, 6 fail Run3: 6 scenarios: 6 fail.
Hope this makes sense, apologies if not
Hey -- if a test fails on the first run but passes on a subsequent run, then should the exit code not be 0? Right now, it exiting with a non-zero status code.
The summary looks like this:
16:28:34 22 scenarios (1 failed, 21 passed)
16:28:34 321 steps (1 failed, 4 skipped, 316 passed)
@rishi-freshbooks you're right, the I think the exit code should be zero if the scenario passed after retry (unless maybe you were in strict mode). Could you raise a new ticket about that please?
@luke-hill right now it's going to just count and output all the test cases that were run - the totals printing bit doesn't know anything about retries, so it treats two runs of the same scenario as two test cases.
I'd like some help getting a spec for what the totals output should look like. Could you create a ticket and help us write a spec for it?
@mattwynne Sure thing. We've a fairly comprehensive set of functions we use for our retries. Combining Rakes and the cucumber.YML file. As I'm a git newcomer, where do you want me to start documenting this. Under issues? Or somewhere else (Sorry)
Luke
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
cucumber --help
specifies this:--retry ATTEMPTS Specify the number of times to retry failing tests (default: 0)
However, when trying to runcucumber --retry 5
, nothing seemed to have changed from a normal run. Is this feature working anymore?