protractor-flake icon indicating copy to clipboard operation
protractor-flake copied to clipboard

Failing Cucumber Scenarios causing entire feature files to re-run

Open Phonesis opened this issue 5 years ago • 4 comments

This is probably not so much a bug as a feature request perhaps but is it a known limitation that when you try to re-run failing Cucumber Scenarios with flakes it will instead run the entire feature file the failing scenarios(s) reside in?

It would be fantastic if flakes was able to just re-run the failed Scenarios as opposed to the entire feature file. Is this possible?

Phonesis avatar Jun 26 '19 13:06 Phonesis

This would be great but I think there are a few pieces:

  1. I think it would require some changes in the core (which would be beneficial to all) that would allow a parser to provide different params/options for the next protractor run:

     // WARNING: PSEUDOCODE
     function cucumberParser (output) {
       const matchingScenarios = /Scenario Failed: (.*)/.match(output)
    
       return {
         // we may need to include both the files _and_ the scenario names
         // I don't know about how cucumber is actually configured
         failedSpecs: [],
         protractorOptions: ['--cucumber.scenarios', matchingScenarios.join(',')]
       }
     }
     // WARNING: PSEUDOCODE
    
  2. I'm not sure how the cucumber configuration would need to look for protractor (since I don't use cucumber myself)

I'm still in year one of a new job and about to welcome a second child into my life so I don't have much bandwidth at the moment. So I would appreciate a PR on either front 😄

NickTomlin avatar Jun 27 '19 21:06 NickTomlin

Thanks Nick, sadly I would have no idea where to start with this being more a C# and Java guy. Be amazing if someone was able to pick this up though

Phonesis avatar Jul 03 '19 11:07 Phonesis

i am facing the same issue. @Phonesis did you resolve this problem?

abubakarafzal avatar Sep 25 '19 13:09 abubakarafzal

i am facing the same issue. @Phonesis did you resolve this problem?

No sadly not.

Phonesis avatar Sep 25 '19 22:09 Phonesis