behave2cucumber icon indicating copy to clipboard operation
behave2cucumber copied to clipboard

@autoretry in Behave 1.2.6

Open lawnmowerlatte opened this issue 7 years ago • 2 comments

I've noticed that when using the new @autoretry behavior in Behave 1.2.6, I get duplicate records in the JSON output. For example, if I have a retry count of 3, and the first two attempts fail, when parsing the JSON I get 3 scenarios: [Fail, Fail, Pass] — I'd really like to only have the passing test count. Is there some way this module could strip out those results, or should I ask on the Behave project?

lawnmowerlatte avatar May 26 '17 20:05 lawnmowerlatte

I did more research today and I think this is because JSON is a formatter (unlike JUnit) so the running test is output to the file as it goes. I opened behave/behave!565 but I'm not sure if anything can really be done about it. Would you be open to a PR that offers deduplicating as an option?

lawnmowerlatte avatar May 30 '17 17:05 lawnmowerlatte

Have a look at my fork for an example.

lawnmowerlatte avatar May 30 '17 18:05 lawnmowerlatte