-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space in expected exception class name causes unit test to be reported as failure in clover report #87
Comments
Thank you for reporting this problem, Dave. Potential places which require a trim() call: com.atlassian.clover.instr.tests.ExpectedExceptionMiner#extractExpectedAttrValue(com.atlassian.clover.registry.entities.MethodSignature, com.atlassian.clover.api.registry.Annotation) com.atlassian.clover.instr.tests.ExpectedExceptionMiner#extractValueAttrValue(com.atlassian.clover.registry.entities.MethodSignature, java.util.Collection<com.atlassian.clover.api.registry.Annotation>) com.atlassian.clover.instr.tests.ExpectedExceptionMiner#stripClassNameFromDotClassExpression and tests: com.atlassian.clover.instr.tests.DefaultTestDetectorTest#testSingleExpectedAnnotations com.atlassian.clover.instr.tests.DefaultTestDetectorTest#testMultipleExpectedAnnotations com.atlassian.clover.instr.tests.DefaultTestDetectorTest#testWeirdExpectedAnnotationStructure |
Original report: https://bitbucket.org/openclover/clover/issues/87 |
Dave Nichols created an issue 2019-01-09
I have noticed that a space in an expected exception class name causes clover and openclover to mark the test as failed even though the test passed in the junit xml file.
Example: Shows as failed: @test(expected=DbUnavailableException .class) Works successfully: @test(expected=DbUnavailableException.class)
I tried searching through the open issues but was unable to find anything matching this.
I created a sample project @ https://github.com/dpn982/TestFailsInCloverReportButNotJunit
I ran the following commands against it:
mvn clover:setup test clover:aggregate mvn -N clover:clover
The unit tests show as passed in the execution, but if you open the clover html report it shows that 1 out of 2 passed.
The text was updated successfully, but these errors were encountered: