Hi Rene,
Am 17.10.2010 um 04:16 schrieb Rene Groeschke:
Hi Matthias,
I've shared my emma usage in a script plugin at
http://github.com/breskeby/gradleplugins/blob/master/emmaPlugin/emma.gradle
.
The implementation of this emma plugin doesn't support recording cross
project calls in multiproject build.
yes, I have already tried this and will try to use it as a starting
point.
The problem is, that you have to instrument the class files of
subprojectB in the in the test section of subprojectB. Furthermore the
source files of subprojectB must be added to the report section in
emma.
I'm not sure how to reference the source and class folders of other
subproject in a gradle multiproject build to achieve this.
How about these snippets, you can use them in the root project:
1) Find all source files:
subprojects.collect { project -> project.sourceSets.main.allJava }
2) Find all class files:
files(subprojects.collect {project ->
project.sourceSets.main.compileClasspath })
By the way. I don't think that it is good practice to test a
subprojectA
in the tests of subprojectB. References to subprojectA should be
mocked
in tests of subprojectB, shouldn't they?
One of our subprojects contains classes that are used as base classes
for tests in more than one other subproject. The target of all those
tests is yet another subproject, tested from several perspectives
(e.g. stand-alone business logic versus integration with the web
layer). So what we need is coverage from all perspectives accumulated
on the same target classes.
So, would it be possible to instrument all subproject classes, looking
from the root project? Then, run the tests in each subproject.
Finally, generate the report from the root project, again.
Cheers
Matthias
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email