当我尝试使用 Cucumber 最新版本 4.7.1 ie,'io.cucumber'时,Extent report 3.0 没有生成报告。我在范围报告中尝试了不同的版本,但仍然正确生成了输出。
我尝试在 Cucumber 和 Extent Report 之间使用不同的组合版本,但仍然没有输出。有人可以在这里照亮以调出输出。
代码:
/**
* @Author: PriyadarsiniMuthuvel
* @Created date: 19-08-2019
* @Project Description: CucumberGradleProject
**/
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import org.junit.AfterClass;
import org.junit.runner.RunWith;
import managers.FileReaderManager;
import java.io.File;
@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/resources/SmokeSuite",
glue= {"stepDef"},
// plugin = { "pretty","html:target/cucumber-reports"},
// plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html"},
// plugin = { "com.vimalselvam.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html"},
plugin = { "com.aventstack.extentreportscucumber.adapter.ExtentCucumberAdapter:target/cucumber-reports/report.html"},
monochrome = true
)
public class testrunner {
@AfterClass
public static void writeExtentReport() {
Reporter.loadXMLConfig(new File(FileReaderManager.getInstance().getConfigReader().getReportConfigPath()));
Reporter.setSystemInfo("User Name", System.getProperty("user.name"));
Reporter.setSystemInfo("Time Zone", System.getProperty("user.timezone"));
Reporter.setSystemInfo("Machine", System.getProperty ("os.name"));
Reporter.setSystemInfo("Java Version", System.getProperty ("java.version"));
}
}
缥缈止盈
相关分类