Closed jjathman closed 10 years ago
Can you provide a simplistic example project on GitHub that reproduces the issue?
Sure, let me put something together for you. Thanks.
Check out this project I put together, you should be able to pull it down and run cloverAggregateReports, open up the HTML reports, and see the issue. You can see that the "Dog" class isn't covered at all even though the DogService class is covered and that class calls Dog.Speak.
https://github.com/jjathman/clover-multi-project-bug
I'm more than happy to help with a fix if you can get me started in the right direction.
I spent yesterday working on a way to solve this problem, but I've come to decide that this is more an issue with how clover works than anything with the plugin. It doesn't seem like clover really supports having one subproject contribute code coverage to another subproject. I'm just going to close this issue since it really isn't a problem with this plugin.
@jjathman Great, thanks for looking into this. Maybe you can raise an issue on their end.
@bmuschko Good idea, I asked a question in the Atlassian forums to see if what I'm trying to do is really even possible/supported or not. https://answers.atlassian.com/questions/311974/clover-reporting-for-multi-project-builds
@bmuschko someone from Atlassian responded and it looks like the root of this issue is the same as issue #33 here. Basically if we could generate Jar's that are instrumented then the reporting would work correctly. Looks like that issue hasn't been updated in a while, I may take a look at it myself. Maybe just add a configuration option to create jars from instrumented sources?
Did you ever get this working?
@jjathman @bmuschko have you found any workaround this thing or do you have to create your own clover.gradle version or hack the plugin?
No sorry I haven't spent any more time on it to get it working. Really the key is my last comment which is how we need to generate instrumented jars instead of what currently happens where only the project being tested is instrumented at runtime.
Thanks, I am trying to work out how to do that.
The pending milestone release of 2.1.1 will address this issue.
I'm not sure if I have something configured incorrectly, or if this is really a bug, any help would be appreciated.
I have a multi-project build. Let's say I have a class in projectA. There is also a test class in projectB. After the cloverAggregateReports task, the coverage report will show that the class will have 0% coverage, but the test will still show that it is run. It seems like coverage information isn't getting recorded when the test is run.
Is this something that is supposed to be supported? Thanks.