Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

replaceexisting variable, when set to false throws below error. Pls let me know how to resolve this #611

Closed
Swathi-123 opened this issue Sep 1, 2016 · 11 comments

Comments

@Swathi-123
Copy link

ExtentReports version: 2.41.1

Failure Trace:
java.lang.NullPointerException
at com.relevantcodes.extentreports.converters.TestConverter.createTestList(TestConverter.java:81)
at com.relevantcodes.extentreports.ExtentReports.(ExtentReports.java:92)
at com.relevantcodes.extentreports.ExtentReports.(ExtentReports.java:374)
at allTests.Optiwise2.(Optiwise2.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters.createTestUsingConstructorInjection(BlockJUnit4ClassRunnerWithParameters.java:43)
at org.junit.runners.parameterized.BlockJUnit4ClassRunnerWithParameters.createTest(BlockJUnit4ClassRunnerWithParameters.java:38)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

@anshooarora
Copy link
Owner

I believe you have run into one of the bugs that [https://github.com//pull/538](this PR) had fixed. It will be available in the next version, but if you have 0 tests in the report, it can run into such issues. You can use replaceExisting=true in such scenarios.

@Swathi-123
Copy link
Author

Hi,

I do have tests. But I'm facing this issue only when i set replaceExisting to false. Similar to issue #589 . I tried moving the test class to a different package as well. It is not working. Thanks.

@anshooarora anshooarora reopened this Sep 8, 2016
@anshooarora
Copy link
Owner

Can you share a sample of the report? I will append a few tests to your report to see if I can reproduce.

PS. This can also happen if your tests are not being ended by calling of endTest method.

@Swathi-123
Copy link
Author

Hi Anshoo,

I have attached a sample report and the code as well for your reference.
Also, I do have 'endTest' method in my @after.

Test1.txt
Report.zip

Thanks

@Swathi-123
Copy link
Author

Swathi-123 commented Sep 17, 2016

Also, the captured screenshot in the report looks very narrow in size. Could you please provide your inputs on this as well.

@girishschavan
Copy link

I'm also facing same issue.
Please let me know if I need to get latest maven dependency with this fix.

@alexkates
Copy link

Any update on a fix for this?

anshooarora added a commit that referenced this issue Oct 20, 2016
@anshooarora
Copy link
Owner

I was able to repro. Fixed issue on 2.41.2 branch: 35d30f1.

Will release this version hopefully tonight or tomorrow.

@anshooarora
Copy link
Owner

Release 2.41.2 now available. Please check.

@alexkates
Copy link

That worked @anshooarora Thanks for the speedy release.

@Swathi-123
Copy link
Author

Hi Anshoo,

Thanks. I'm facing one more issue. When I set the replaceExisting Variable as 'True' its working fine. However when set to False, 'UnParseable Date' Exception is thrown but the script is getting executed.
Attached the err msg. Could you pls let me know on this.

StackTrace_Nov30.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants