You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.
I am a beginner to ExtentReport. While executing my test project, I got NullPointerException while initializing the ExtentReports object.
I am using Maven and Ant in my project. While executing the project from Ant, I am getting this exception, but while executing the source file directly, I am not getting any exception. ExtentReportTest.zip
Hi gitissuepost / anshooarora ,
I am newbie to ExtentReports, I am constantly getting following error when I try to execute the sample java code for ExtentReports
Exception in thread "main" java.lang.NullPointerException
at com.relevantcodes.extentreports.Report.(Report.java:606)
at com.relevantcodes.extentreports.ExtentReports.(ExtentReports.java:72)
at com.relevantcodes.extentreports.ExtentReports.(ExtentReports.java:418)
at com.test.ETREports.main(ETREports.java:14)
My code sample is here
public class ETREports {
public static ExtentReports extent;
public static void main(String[] args) {
extent = new ExtentReports("C:\SampleReports\Report.html"); //This is line number 14 where I get error
I am using extentreports-java-2.41.0.jar , am missing something basic here ?
@anshooarora - It's working fine when I am running the code directly. But when I am running from Ant build.xml, it's throwing error. In both the case, I am using Maven
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello Anshoo,
I am a beginner to ExtentReport. While executing my test project, I got NullPointerException while initializing the ExtentReports object.
I am using Maven and Ant in my project. While executing the project from Ant, I am getting this exception, but while executing the source file directly, I am not getting any exception.
ExtentReportTest.zip
OutPut :
Ant Script Result.txt
Thanks.
The text was updated successfully, but these errors were encountered: