Home > Software design >  "The constructor ExtentReports(String, boolean) is undefined"
"The constructor ExtentReports(String, boolean) is undefined"

Time:05-02

I am getting "The constructor ExtentReports(String, boolean) is undefined" message while creating object of extentreport class.

public  ExtentReports reports;
public ExtentTest test;

@BeforeTest
public void setExtend() {
        reports = new ExtentReports(System.getProperty("user.dir") "/test-output/reports.html",true);   
}

CodePudding user response:

I'm not sure what API ExtentReports belongs to, but if is this one:

https://www.extentreports.com/docs/javadoc/com/aventstack/extentreports/ExtentReports.html

It does not indeed include the constructor ExtentReport(String,boolean) you're using, it only has a parameterless constructor.

CodePudding user response:

Update the Extent Report latest version. And please read the documentation care fully they explained very good way. Go through the documentation https://www.extentreports.com/docs/javadoc/com/aventstack/extentreports/ExtentReports.html

  • Related