Ниже приведен класс TestRunner.java, где я пытаюсь создать отчет с отметкой времени.Это не работает.Можете ли вы предложить мне правильный путь?
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"src/test/resources/CommonElements/CommonPgDisplay.feature"},// path of the feature file
glue = {"com.endnote.stepDefinition"}, // path of the step definition
format = {"pretty", "json:target/cucumber-report.json", "junit:target/cucumber-junit-report/cuc.xml"},//re sults format
monochrome = true, //display the console output in a proper readable format
strict = true, // it will fail the execution if there are any undefined steps(Step definition) are there
dryRun=false, // to check the mapping between feature file and Step definition file
tags = {"@test"},// for group run.., represent ORed operator and ANDed operator
plugin ={"com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.htm",}// path of the extent report
)
public class TestRunner extends PageInstances {
@AfterClass
public static void writeExtentReport() {
Reporter.loadXMLConfig(new File("extent-config.xml"));
Reporter.setSystemInfo("User Name", System.getProperty("user.name"));
Reporter.setSystemInfo("Time Zone", System.getProperty("user.timezone"));
Reporter.setSystemInfo("Machine", "Windows 7" + " 64 Bit");
Reporter.setSystemInfo("Selenium", "3.13.0");
Reporter.setSystemInfo("Maven", "3.5.4");
Reporter.setSystemInfo("Java Version", "1.8.0_131");
Reporter.addStepLog("Test is end: Browser is closed");
driver.quit();
}
}