I would like to run all 3 scenarios at once - I mean I want my computer to open 3 chrome browsers at the same time. Now the code opens 1 browser for one scenario, executes scenario, closes browser and then opens another browser for second scenario and so on.
How should I configure POM.xml file to achieve this ? Is this called parallel execution or do I misunderstand this expression ?
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features="src/test/java/features",
plugin = {"pretty", "json:target/jsonReports/cucumber-report.json",
"html:target/jsonReports/cucumber-report.html"},
glue= {"stepDefs"}
)
public class TestRunner {
}
Feature file looks like this:
Feature: test of a webpage
@desktop
Scenario: Test landing page one
Given Customer clicks something one
When Customer clicks something two
Then Customer clicks something three
@desktop
Scenario: Test landing page two
Given Customer clicks something one
When Customer clicks something two
Then Customer clicks something three
@desktop
Scenario: Test landing page three
Given Customer clicks something one
When Customer clicks something two
Then Customer clicks something three
I have defined remote webdriver on my localhost
java -jar selenium-server-4.9.1.jar hub
java -jar selenium-server-4.9.1.jar node --hub http://localhost:4444/grid/register:5555
webDriver = new RemoteWebDriver(new URL(hubURL), chromeOptions);
Thank you