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
AssertFilter does not ignore the assert statement #1378
Comments
I've implemented a solution in a pull request: #1379 |
Cool!!!!!!!!!!!!!!!!!!!!!! |
Hi, I believe that you need to write some tests :) The maintainers told me they only accept fully tested code. |
I'm not sure what else they want. I've modified the existing test expectations. |
I can confirm the same problems with 0.8.8 and a reduced code coverage. |
would love to see progress on this issue |
Steps to reproduce
mvn clean install
the build fails (100% coverage is required) and
the target/site/jacoco/net.gcvs.jacoco/App.java.html report does not indicate full coverage of the assert statements.
Expected behaviour
coverage of assert statement is considered complete, line in coverage report is green.
Code coverage should be considered complete with or without assertions enabled.
Actual behaviour
assert statement contains two branches and "1 of 2 branches missed", line in coverage report is yellow.
Currently the only way to obtain full coverage of an assert statement is by running the tests twice in the same test suite, once with assertions enabled, and again with assertions disabled, so both branches of the assert statement enabled test are visited.
#324 raised the problem of only 50% branch coverage. The AssertFilter introduced in 0.8.8 reduced the problem from a "2 of 4 branches missed" to a "1 of 2 branches missed". This wasn't exactly the intension of the #324 issue, which suggested "They should not be treated as code instructions."
(In case of exceptions provide FULL STACKTRACE)
The text was updated successfully, but these errors were encountered: