Open saikiran40cs opened 8 years ago
Is this Java or .NET?
Please provide more details, the information you have provided is not sufficient for me to better understand what is going on. You can:
@anshooarora SampleReport.zip Please find the below required details
Attached the test report for your reference
Steps to reproduce
Please let me know if you need more information. And from the past few days i am trying to use the attached java file for instantiating the extent reports
I am calling the ExtentManager class instance in the main test method of another class in the different package. Attached are the class files ExtentManager.zip
From the attached file . Check the extent manager class where the variable replaceExisting=false is set then below is the stack trace occurs otherwise if the variable replaceExisting=true then there are NO issues. [TestNG] Running: C:\Temp\testng-eclipse--348817943\testng-customsuite.xml
Got Inside FAILED CONFIGURATION: @AfterTest tearDown java.lang.NullPointerException at com.google.regression.SampleTest.tearDown(SampleTest.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138) at org.testng.TestRunner.afterRun(TestRunner.java:1023) at org.testng.TestRunner.run(TestRunner.java:628) at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) at org.testng.SuiteRunner.run(SuiteRunner.java:261) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) at org.testng.TestNG.run(TestNG.java:1048) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
FAILED: TC001 java.lang.NullPointerException at com.google.utilities.ExtentManager.getInstance(ExtentManager.java:21) at com.google.regression.SampleTest.TC001(SampleTest.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) at org.testng.TestRunner.privateRun(TestRunner.java:774) at org.testng.TestRunner.run(TestRunner.java:624) at org.testng.SuiteRunner.runTest(SuiteRunner.java:359) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312) at org.testng.SuiteRunner.run(SuiteRunner.java:261) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215) at org.testng.TestNG.runSuitesLocally(TestNG.java:1140) at org.testng.TestNG.run(TestNG.java:1048) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Default test
Tests run: 1, Failures: 1, Skips: 0
Configuration Failures: 1, Skips: 0
Default suite Total tests run: 1, Failures: 1, Skips: 0
[TestNG] Time taken by org.testng.reporters.jq.Main@5fdef03a: 86 ms [TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 6 ms [TestNG] Time taken by org.testng.reporters.XMLReporter@77556fd: 18 ms [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@14899482: 5 ms [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@16b3fc9e: 77 ms [TestNG] Time taken by org.testng.reporters.EmailableReporter2@ed17bee: 7 ms extent-config.zip
Could you please help on this issue @anshooarora. Also added the config xml for reference
Thanks. I was able to reproduce this.
The 2nd one is sulimilar to #445
Can you try with the latest beta (beta-4) to see if the issue exists?
With current build downloaded yesterday I am getting a related bug.
Are you using the TestNG listener class or executing as a normal logger with annotation support?
Still the issue exists in extent reports v2.41
Hi Anshoo,
I have the same problem in the test ended time. Actually I am getting the correct time in console by getTime(result.getEndMillis()), same as the result xml. But, the setEndedTime method is giving the end time of the complete test, not each method. I am using Extent Report as the Listener in TestNG test. The version is 2.41.0. Attaching the screenshot of the console and the report.
@anshooarora The issue is there must be an extra variable which holds the value of earlier suits runtimes in report.java where currentSuiteRunDuration is calculated based on getSuiteStartTimestamp method where if the report was generated 2 days ago with report appending as true ,then the suite start time is considered as 2 days back which leads to calculation issue.
Could you please fix this issue.
There are actually 2 BUGS in this.
Could you please look into these issues. Also i am unable to print any exceptions in the exception tab even though it is thrown.