I am planning to create a test plan where I first build out sources, deploy the artefacts to a server and then run tests on that server.
Since our set-up is already using 3 stages to do this, I would like to keep it that way when I make the step to use Clover.
Reading the documentation it is suggested to do this:
with.clover your.test.target clover.report
How does this factor in with Bamboo Stages?
Do I need to repeat the with.clover for each stage or will that confuse clover?
thanks
Assuming that you use Bamboo with Ant build and have following three stages:
I would recommend use of Clover tasks inside your own targets, instead of high-level Clover predefined targets. In such case:
ad 1. Add <clover-setup/> or <clover-instr/> to your build target.
ad 2. Deploy instrumented code and clover.jar to your server.
ad 3. Add <clover-report/> task to your test target, providing license key and clover.initstring as well.
Thanks (just noticed your post), I'll sure give that approach a try!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Allright, almost there! I got the instrumentation and tests running as they should, now I am proceeding to get the report generated to be displayed in bamboo.
I added another stage to my plan which will take care of the report generation, very similar to what is configured here http://blogs.atlassian.com/2012/07/bamboo-maven-clover-aggregated-code-coverage.
However, it doesn't seem to be triggered because some of the jobs in the test stage are failing (due to failed tests). Do I understand correctly that I can only have the last stage executed when all previous stages have completed successfully?
This would be quite a restriction since we always have one or two test failing ...
Could I get by this in some way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How about quarantining the failed tests? (Quarantining the tests is a feature we had added in 4.0 or 4.1)... Shall I find you a relevant documentation for it (I'm not sure if you know what am I talking about)...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Quarantining is a very good idea. Alternatively, you could use a single stage with a job in which the Clover reporting task is put on the list of "Final Tasks" (they are always executed at the end of the build, no matter whether previous tasks has failed or not).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah I know that feature, pretty cool actually. It would be a workaround indeed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah that's even better! Didn't know that one! Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Allright, the clover.xml is produced nicely and sizes around 80MB.
It seems that the Clover plugin is chocking on the size though, it is giving a 'Failed to execute plugin 'Clover Results Collector' with error: GC overhead limit exceeded' line in the build log.
Should I just be generating an HTML report and adding that as artefact? I can imagine that the cheer amount of data might slow down the UI even if it gets processed properly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bad news, having the final stage with a final task doesn't seem to work. It is still not executing the stage because a previous stage has failed ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jan,
I think the idea with using "Final Task" is to - somehow - put the Job that take care of the report generation into the failing stage, not into some additional Final Stage. Not sure if this is feasible at all - it depends on your plan structure (how many 'casual' jobs do you have in the failing stage? more than one?)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Yeah we have 4 jobs in the 'test' stage - some of them also need to run on remote agents. The amount of time spent in total would also become too long, we need them split up to be able to run async.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.