Tests reported as lacking coverage

Hey @ethitter ,

If the test and source directories are not clearly separated at a specific level, that makes it a bit more tricky. We’ll need to play around with exclusions/inclusions to achieve what the error message you’ve gotten indicates: disjoint sets for main and test files.

You can try something like this:

sonar.sources=.
sonar.tests=.

sonar.exclusions=artifacts/**/*,**/tests/**/*
sonar.test.inclusions=**/tests/**/*

This is considering that your tests will always be in some tests sub-directory. In case there are other cases, you might need to add to sonar.exclusions and sonar.test.inclusions (these are comma-separated lists).

Unfortunately not. This post explains very well why and how the above properties work together.

I hope this helps.