Open jflefebvre06 opened 10 years ago
Currently JaCoCo can only merge probes (exec files) which depend on the exact class version (i.e. class id). This merge is performed before the coverage is analyzed.
Another option would be to merge coverage of already analyzed coverage. The question is how the merging algorithm would look like: For example one could calculate the maximum total number of instructions/branches per line or method and the maximum numbers of covered items respectively.
@jflefebvre06 A possible workaround for your setup could be to use offline instrumentation for the it tests.
Thanks a lot for your response I don't understand why mixing agent for ut and offline instrumentation for it will solve the problem
I miss to mention that my it tests are based on gwt compilation
For the it you class files seems to be modified by some gtw magic before JaCoCo agent sees them for on-the-fly transformation. Otherwise using classdumpdir would not be required.
The trick with offline instrumentation is that the original classes gets instrumented before any other framework cuts in, so the classids remain the same and no need to use classdumpdir any more,
GWT not modify the original classes (target/classes) but create new classes with it's own compilation
So I don not understand what the problem with class ids is. If you get separate classes in your it, why can't you you simply create an report on both, your compiled classes and the gwt classes?
It is what I do. But I would like an aggregated report of UT tests an IT tests.
So what prevents you to create the aggregated report with both class file sets, from target/classes and classdumpdir destination?
I try with the 2 filesets into
If you get an duplicate class exception this means you have classes with the same name but in different versions. So something in your it setup does modify classes.
It is exactly that. UT case uses target/classes : simple junit tests without GWT compilation IT cases (GWTTestCases) uses GWT compiled classes
I think I'm running into a case where I want something like this. I've fully outlined it in https://groups.google.com/forum/#!msg/jacoco/-zTg9Bt5964/dUliK8OsAwAJ , but the gist is "coverage for source code that is compiled at runtime but is compiled multiple times"
Could you please add a way to skip classes's ids check ?
I have a gwt project, with ut and it tests. My first report show ut tests (I use target/classes to generate report) My second report show it tests (I use classdumpdir to generate report) My third report is an aggregate of ut and it tests. If I use target/classes my it coverage is not showed. If i use classdumpdir my ut coverage is not showed).
Is there a way to generate my aggregated report with ut and it coverage ?