serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
714 stars 513 forks source link

restart.browser.for.each = never restart browser anyways #3455

Open zetadot opened 2 months ago

zetadot commented 2 months ago

What happened?

I have cloned the sample project https://github.com/serenity-bdd/serenity-cucumber-starter so i added the restart.browser.for.each = never property to the serenity.conf, but the browser keeps being closed when the test finish.

I've seen this issue on my personal project thinking i have something wrong but now i have tried with the example you have and it happens anyways. Any guess?

Im using java openjdk 11.0.22

What did you expect to happen?

No response

Serenity BDD version

4.1.6

JDK version

11.0.22

Execution environment

Windows 10

How to reproduce the bug.

  1. clone https://github.com/serenity-bdd/serenity-cucumber-starter
  2. add restart.browser.for.each = never to serenity.conf
  3. run the test

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

wakaleo commented 2 months ago

I don't think this is supported for Cucumber in Serenity 4 because of the way the new Cucumber events and parallel execution works, but you are certainly welcome to propose a PR or request some commercial support to implement this feature for Cucumber 7.

zetadot commented 2 months ago

I don't think this is supported for Cucumber in Serenity 4 because of the way the new Cucumber events and parallel execution works, but you are certainly welcome to propose a PR or request some commercial support to implement this feature for Cucumber 7.

Thank you for your response, @wakaleo. If I find the time, I'll attempt to investigate further. Do you think this could also be related to another issue I'm experiencing, where the Chrome process persists in the background despite the browser being closed when a test fails? This behavior results in numerous Chrome processes running in the background and subsequent resource consumption.

wakaleo commented 1 month ago

I don't think this is supported for Cucumber in Serenity 4 because of the way the new Cucumber events and parallel execution works, but you are certainly welcome to propose a PR or request some commercial support to implement this feature for Cucumber 7.

Thank you for your response, @wakaleo. If I find the time, I'll attempt to investigate further. Do you think this could also be related to another issue I'm experiencing, where the Chrome process persists in the background despite the browser being closed when a test fails? This behavior results in numerous Chrome processes running in the background and subsequent resource consumption.

I have seen that happen sometimes despite the quit() method being called on the driver - I think in that case it came down to a Chromedriver bug.