I am trying to include extent report library and generate spark report for my project but have been getting this issue.
I even tried creating a simple TestNG class with some basic code to see if it would run. But has been saying the same issue
public class NewTest { ExtentReports extent; ExtentSparkReporter spark; @Test public void f() { System.out.println("hello"); } @BeforeMethod public void beforeMethod() {
extent = new ExtentReports();
spark = new ExtentSparkReporter("target/Spark.html");
extent.attachReporter(spark); System.out.println("process starts");
}
@AfterMethod public void afterMethod() {
// extent.flush(); System.out.println("process ends");
}
}
Below is the error with the code that I’m facing
FAILED CONFIGURATION: @BeforeMethod beforeMethod java.lang.NoSuchFieldError: VERSION_2_3_29
The compiler is tagging the line extent.attachReporter(spark);
As the error causing line
I am using the below import statements
import com.aventstack.extentreports.ExtentReports;
import com.aventstack.extentreports.model.Log;
import com.aventstack.extentreports.reporter.ExtentSparkReporter;
Thanks in advance
Himanchal Warde is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.