I am not able to run in parallel feature files (Java -Maven -Intellij) in browserstack in different browsers. I am able to implement parallel testing in my JUnit framework but do not know how to implement in cucumber Java. Could you please help on this?
Currently, I am able to execute tests on browserstack but only for one browser on time. Please see attached
public class JavaSample {
public static final String USERNAME = "";
public static final String AUTOMATE_KEY = "";
public static final String URL = "https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub-cloud.browserstack.com/wd/hub";
public static void main(String[] args) throws Exception {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("browserName", "iPhone");
caps.setCapability("device", "iPhone 8 Plus");
caps.setCapability("realMobile", "true");
caps.setCapability("os_version", "11");
caps.setCapability("name", "Bstack-[Java] Sample Test");
WebDriver driver = new RemoteWebDriver(new URL(URL), caps);
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("BrowserStack");
element.submit();
System.out.println(driver.getTitle());
driver.quit();
}
}