Skip to content
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

Clover configuration modifies the test files included in a test type task even with testIncludes #122

Open
freshcodemonger opened this issue Nov 1, 2018 · 2 comments
Assignees

Comments

@freshcodemonger
Copy link

I have a Test type that I have defined.

task mytest(type: Test) {
include "/mypackage/"
}

and I've told clover to only include the mypackage tests.

clover {
testIncludes = ['/mypackage//*Test.java']
//excludeTasks = ["mytest"]
}

when clover runs it properly detects 89 classes for clover reporting but it causes the mytest task to execute ~500 tests instead of the 89 that normally execute when clover is disabled.

How can I prevent clover from modifying the tests that are included in my "mytest" task? For now I've just decided that I'll have clover exclude mytest task from being a part of clover so that I only run the 89 tests as I had intended.

Thank you !

@Alex-Vol-SV
Copy link
Collaborator

From your description I assume that the source set you used has more tests and you are narrowing down the active ones using the include pattern. I believe this is a known current limitation of the way we integrate Clover into the Test tasks. We do not carry over the Test task filter in the processing actions and this results in the behavior you experience.

@freshcodemonger
Copy link
Author

Your assumption is correct. I also use the eclipse open clover plugin which allows you to run the coverage for only a portion of your junit tests. On a large project is nice to be able to run only a portion of the test.

Thank you for all the work on the plugin !

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

No branches or pull requests

2 participants