|
Vincent Massol made changes - 16/Jul/04 02:49 PM
Vincent Massol made changes - 09/Feb/05 03:02 PM
It's been some time since I posted this but from memory I thought that once the clover report was registered, all compilations had the effect of instrumenting the code. Are suggesting that code actually gets completely recompiled on the second (clover) run of the tests? If this is true then with just a fairly comprehensive test suite on a medium sized application, my build is simply doing too much stuff. On a larger application it becomes impractical to use Maven to get my build metrics using continuous integration. On an XP/Agile project I regularly allocate time to refactor/optimise my test suite in order to decrease the execution time and therefore encourage regular runs of the tests. The impact of running the suite multiple times can be huge. General considerations: I've always found this to be an issue with Maven reports: they not only create a report but they do also perform the logic to create the report data. Thus if you build your project and then generate the site you'll have run twice the build logic that creates the report data. For your problem: The only solution I can think of is to have an execute.during.report flag (as you mentioned) so that instrumentation would only happen if this flag is set. If not, the report will take whatever data has already been generated in the Clover database file (which could amount to nothing). Now in term of sharing the compilation with the junit report, it will be possible by doing the following:
Would that be ok with you? Yep, that would solve my immediate (well, immediate 7 months ago) problems. I agree with you completely on your general consideration point. For the kind of projects that I'm generally involved with, Maven simply will not scale sufficiently to support continuous integration. I find myself slipping back to nightly builds for more and more of the goals as the codebase grows. Done. Added new maven.clover.execute.during.report (defaults to true).
Vincent Massol made changes - 11/Feb/05 10:52 AM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hi Matt,
Yes, the tests are executed twice but not in the same condition. One time it is without clovering on (i.e. the source code is not instrumented) and the second time clovering is on, the code is instrumented and the tests are generating clover data which are then used by the clover report to produce some HTML file.
I'm probably missing something though...