serenity-bdd / serenity-cucumber-starter

A skeleton project for Serenity BDD and Cucumber JVM
Apache License 2.0
180 stars 285 forks source link

Serenity System Properties and Configuration #49

Closed punkratz312 closed 3 years ago

punkratz312 commented 3 years ago

I want to execute all features in one brower instance for debug reasons, or at least one after another. By default serenity starts an browser instance for every feature file. This leads to problems.

Thankfully some switches are already implemented like (restart.browser.each.scenario):

https://serenity-bdd.github.io/theserenitybook/latest/serenity-system-properties.html#_restart_browser_each_scenario

The documentations need to be updated and maybe the implementation too its not working at all. setting the switch to true and false does not change one thing.

Doc says default falue is false and it gets activated by false altho that sounds strange to me.

image

I altho wanted to use serenity.use.unique.browser but it seems not to work or make and change eather:

Without headless i see browser instances for ever feature:

image

heres my configuration:

image

wakaleo commented 3 years ago

Running all the features in a single browser is not possible because of the way Cucumber lifecycle events work.

punkratz312 commented 3 years ago

What about at least one feature after another ?Putting them all in one file in fact does the trick maybe it’s slow but steady and it works.

Thanks. I really appreciate the tool it’s really the best imho and gives a lot of pleasure.

Sent from my iPhone

On 23. Apr 2021, at 15:49, John Ferguson Smart @.***> wrote:

 Running all the features in a single browser is not possible because of the way Cucumber lifecycle events work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wakaleo commented 3 years ago

serenity.restart.browser.for.each = feature

punkratz312 commented 3 years ago

my bad im sorry i fixed the issue by removing multithreading:

image

now one feature runs after each other just how i expected it and know it was the behaviour back in thucydides days.

image

maybe its questionable why its necessary to run all features at the same time by default.

thanks