Closed datagitlies closed 4 years ago
I upgraded to 4.1.3 and now I am getting:
java.lang.ClassCastException: com.aventstack.extentreports.reporter.ExtentHtmlReporter cannot be cast to com.aventstack.extentreports.reporter.ExtentSparkReporter at com.aventstack.extentreports.reporter.configuration.ExtentHtmlReporterConfiguration.enableOfflineMode(ExtentHtmlReporterConfiguration.java:31) at com.aventstack.extentreports.reporter.ExtentHtmlReporter.flush(ExtentHtmlReporter.java:49) at com.aventstack.extentreports.ReportObservable.lambda$23(ReportObservable.java:526) at java.util.ArrayList.forEach(Unknown Source) at com.aventstack.extentreports.ReportObservable.notifyReporters(ReportObservable.java:526) at com.aventstack.extentreports.ReportObservable.flush(ReportObservable.java:424) at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:290) at com.home.listener.ExtentITestListenerAdapter.onFinish(ExtentITestListenerAdapter.java:51) at org.testng.TestRunner.fireEvent(TestRunner.java:899) at org.testng.TestRunner.afterRun(TestRunner.java:863) at org.testng.TestRunner.run(TestRunner.java:594) at org.testng.SuiteRunner.runTest(SuiteRunner.java:402) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355) at org.testng.SuiteRunner.run(SuiteRunner.java:304) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180) at org.testng.TestNG.runSuitesLocally(TestNG.java:1102) at org.testng.TestNG.runSuites(TestNG.java:1032) at org.testng.TestNG.run(TestNG.java:1000) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Below is the error / stack trace. This should be a simple fix in
ExtentHtmlReporterConfiguration
to cast to aBasicFileReporter
instead of anExtentSparkReporter
. I'll open a pull request soon unless someone beats me to it.