Closed omprakashch closed 5 years ago
@omprakashch : Would it be possible for you to upgrade to the latest version of ExtentReports. We have version 4 out. http://extentreports.com/documentation/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.
This issue has been automatically closed because of inactivity.
Hi,
We are trying to generate extent report using version2 but we are seeing the below error.
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
Caused by: java.lang.ExceptionInInitializerError Caused by: java.lang.NullPointerException at java.io.File.(File.java:277)
com.relevantcodes.extentreports.Report.setFilePath(Report.java:527)
This is an intermittent issue and because of this our job is not running at all.But sometimes we are able to generate the report and there is no difference in code in both the cases.
Below is the code what we are suing for report generation:
import java.io.File;
import org.openqa.selenium.Platform;
import com.relevantcodes.extentreports.ExtentReports;
public class ExtentManager extends TestBase{ private static ExtentReports extent; private static Platform platform; private static String reportFileName = "Test-Automaton-Report.html"; private static String macPath = System.getProperty("user.dir")+ "/TestReport"; private static String windowsPath = System.getProperty("user.dir")+ "/TestReport"; //private static String windowsPath = "./TestReport";
}
import java.io.File; import java.io.IOException;
import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.testng.ITestContext; import org.testng.ITestListener; import org.testng.ITestResult;
/import com.aventstack.extentreports.ExtentReports; import com.aventstack.extentreports.ExtentTest;/ import com.relevantcodes.extentreports.ExtentReports; import com.relevantcodes.extentreports.ExtentTest; import com.relevantcodes.extentreports.LogStatus;
public class TestListener extends TestBase implements ITestListener {
}
And below are the dependancies
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Please help me on this