I have one Hooks Class which have @Before annotation that initializes the browser and loads the URL. while running single test reports are showing properly to the stepDefinition but running in parallel reports are not being printed to the stepDefinition JVM report. I'm running 3 features file at the same time using maven-surefire plugin.
Thanks.
Code
//Hooks.java
Hooks.java
@Before(order = 0)
public void getProperty(Scenario scenario) {
Hooks.scenario=scenario;
this.scenario = scenario;
log.info("****LAUNCH BROWSER****");
log.info("------------------------------------------------------------");
log.info(""+Hooks.scenario.getName()+Thread.currentThread().getId()+"");
log.info("------------------------------------------------------------");
configReader = new ConfigReader();
prop = configReader.init_prop();
}//end of getProperty function
/**
* <b>Method:</b> to launch the Browser
* @return LandingPage
* @throws InterruptedException
* @throws MalformedURLException
*/
public LandingPage launch_Master() throws InterruptedException, MalformedURLException {
String browserName = prop.getProperty("browser");
driverFactory = new DriverFactory();
this.driver = driverFactory.init_driver(browserName);
driverFactory.getDriver().get(prop.getProperty("URL_Master"));
Hooks.scenario.write("Initilizing Browser..............");
return new LandingPage(driver);
}//end of launchBrowser_Master function