I have gone through my code several times but still not sure what's is the issue. Getting build success but my tests are getting ignored and shown as passed in build log. I am using custom WebDriver. Not sure what is the issue but got a feeling something is wrong with webdriver. it seems like it is not intialized.
Please find the below code snippet for my custom WebDriver:
`public class localDriver implements DriverSource {
@Override
public WebDriver newDriver() {
System.setProperty("webdriver.chrome.driver", "src/test/resources/drivers/chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("test-type");
options.addArguments("disable-infobars");
WebDriver _driver = new ChromeDriver(options);
System.out.println("Driver has been initialized");
return _driver;
}
@Override
public boolean takesScreenshots() {
return true;
}
} serenity.properties: webdriver.driver=provided
webdriver.provided.type = mydriver
webdriver.provided.mydriver = automatedAuthorTests.localDriver
thucydides.driver.capabilities = mydriver
`
Another issue is with serenity.properties file. I have defined the WebDriver specific properties but it's showing me the properties as unused. I am struck with my POC. Please help me to resolve the given issues.
Thanks in advance!!
I have gone through my code several times but still not sure what's is the issue. Getting build success but my tests are getting ignored and shown as passed in build log. I am using custom WebDriver. Not sure what is the issue but got a feeling something is wrong with webdriver. it seems like it is not intialized.
Please find the below code snippet for my custom WebDriver:
`public class localDriver implements DriverSource {
}
My pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">hooks file:
public class hooks { String testName;}
Test runner:
@RunWith(CucumberWithSerenity.class) @CucumberOptions( features = {"src/test/resources/features/"}, glue = {"automatedAuthorTests.support.hooks","automatedAuthorTests.step_definitions" }, tags = {"@test"}) public class testRunner{
}
serenity.properties:
webdriver.driver=provided webdriver.provided.type = mydriver webdriver.provided.mydriver = automatedAuthorTests.localDriver thucydides.driver.capabilities = mydriver ` Another issue is with serenity.properties file. I have defined the WebDriver specific properties but it's showing me the properties as unused. I am struck with my POC. Please help me to resolve the given issues. Thanks in advance!!