I have a Java & Springboot application for running Selenium tests. I declare the webDriver as mentioned below with a ScenarioScope annotation.
@Bean(destroyMethod= "quit")
@ScenarioScope
public RemoteWebDriver chromeWebDriver() {
...
}
My feature files have a series of scenarios that I would want always to run sequentially. Currently I use ‘Background’ in my feature files that logs in users to a CRM site. As that step runs every single time, the tests take a long time. I want to somehow run the login step only once for all the features, or maybe once per feature file. Is this possible?
I tried changing @ScenarioScope to @Scope(“singleton”) but that runs all the scenarios within each feature files in parallel, that I don’t want to do. No error message
Any tips would be useful
Thanks