I am using JaCoCo with Gradle. Is there any way to exclude some unit tests from code coverage analysis of tested code? (Note that I do not mean hiding unit tests or some classes from the coverage report, which was discussed in, e.g., Filter JaCoCo coverage reports with Gradle).
I have some test which is for a kind of consistency check of a necessary condition, in other words, the test is weak; the test is expected to most likely pass in any way. If it fails the tested code definitely has a certain type of a bug, but even if it passes it can't guarantee that the code is completely right (this should be checked by another stronger test, which is taken into account for code coverage). So surely I would like to run this unit test in gradle test, but do not like to include it for code coverage analysis of the tested code.
