Closed kamit78 closed 7 years ago
Anyone to help on it .... ?
How have you configured your test runner classes?
There will be one browser per test runner class. Also, if you are running tests in parallel, there will be one browser per thread.
Hi , Following is the test runner class. Two features are exist in separate files I want same browser session for both features
@RunWith(CucumberWithSerenity.class) @CucumberOptions( monochrome = true, features = "src/test/resources/glofeatures", //glue = "com.learn.cucumber.glo.features.steps", glue = "com.serenity.features.featuresteps", format = {"pretty", "html:target/cucumber-reports", "json:target/cucumber-reports/cucumber.json"} ) public class TestRunner {}
That configuration looks correct, there must be something else at play. Could you post your Serenity properties/config file?
Following are content of serenity properties file
jira.url=https://velocity-staging.globallogic.com/jira jira.project=VA jira.username= jira.password= jira.custom.field.1=Acceptance criteria serenity.take.screenshots=AFTER_EACH_STEP webdriver.timeouts.implicitlywait = 5000 serenity.restart.browser.for.each = NEVER webdriver.driver = provided webdriver.provided.type = mydriver webdriver.provided.mydriver = com.serenity.features.runner.DriveRunner serenity.driver.capabilities = mydriver serenity.use.unique.browser = true
Could you try without the custom driver?
Hi ,
Problem remains the same without custom driver. I have removed following properties from file
webdriver.driver = provided webdriver.provided.type = mydriver webdriver.provided.mydriver = com.serenity.features.runner.DriveRunner serenity.driver.capabilities = mydriver
and add webdriver.driver=chrome
running using mvn verify
but still browser session restart after each feature.
Let me know in case of any more details
Following are serenity related depencies in pom.xml file
<dependency>
<artifactId>serenity-cucumber</artifactId>
<version>1.1.23</version>
</dependency>
<dependency>
<artifactId>serenity-junit</artifactId>
<version>1.2.3-rc.3</version>
</dependency>
<dependency>
<artifactId>serenity-jira-plugin</artifactId>
<version>1.1.3-rc.2</version>
</dependency>
I can't reproduce this issue here. Could you provide a sample project that reproduces the issue?
Hi,
I have attached sample project in which I'm facing this problem.
Hi,
did you get chance to look into it
is it a bug in serenity ?
Hi.
You seem to value quick turn-around time for issues raised here. As this is an open source project, there is no SLA on issues raised (unless you fix them yourself ;-) ). If you need a consistently fast turn-around time, perhaps you would be interested in one of our support contracts?
Hi,
I'm sorry for hurry .... but I need help because I'm working on some initiative ....
Please take your time
Thank you very much
Hi,
It would be great help if I get your guidance to resolve it :)
Thanks
This is hard to fix at this stage; cucumber appears to run a feature in a new thread, and when the NEVER option will close the browser when the thread terminates. So this may not be solvable.
You answered to me in #72 to look for #73 and to use serenity.restart.browser.for.each option, and here I see that cucumber does not care about it. So I don't understand : is it possible to avoid closing browser on each scenario ? I would like to close it after each feature, so i tried serenity.restart.browser.for.each=feature but it does not work.
Hi,
I'm using serenity with cucumber but currently serenity start new browser session after each feature
To avoid this behavior, I put serenity.restart.browser.for.each = NEVER in serenity.properties file but still browser restart after each feature.
Please help on it.