serenity-bdd / serenity-cucumber4

Other
13 stars 10 forks source link

Serenity Cucumber Restart Browser Not Working As Expected #24

Closed billyjulius closed 4 years ago

billyjulius commented 4 years ago

Hi, I'm currently have 2 separate .feature, and in serenity.properties I already set serenity.restart.for.each = feature as per in https://serenity-bdd.github.io/theserenitybook/latest/cucumber.html.

Let's say :

file1.feature --- Scenario A
file2.feature --- Scenario B, Scenario C

But when I run mvn verify,

  1. scenario A run - finish - close browser
  2. scenario B run - finish - close browser
  3. scenario C run - finish - close browser

As far I understand, the expected result should be:

  1. scenario A run - finish - close browser
  2. scenario B run - finish - browser not closed
  3. scenario C run - finish - close browser

When scenario B run finished, it should not closing the browser because I set it to restart browser for each FEATURE, as scenario B and scenario C is within same .feature file it should using same browser meaning after scenario B finish it won't closing the browser

Is this bug? Or maybe I'm misunderstood this behaviour?

2.1.4 2.1.2 4.8.0
billyjulius commented 4 years ago

Discussion moved to https://github.com/serenity-bdd/serenity-core/issues/1954