Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using Clover together with Bamboo Stages

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

1 answer

1 accepted

0 votes
Answer accepted

Assuming that you use Bamboo with Ant build and have following three stages:

  1. run build
  2. deploy to server
  3. run tests on server

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.

See Working+with+Distributed+Applications

Thanks (just noticed your post), I'll sure give that approach a try!

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?

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)...

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).

Yeah I know that feature, pretty cool actually. It would be a workaround indeed.

Ah that's even better! Didn't know that one! Thanks.

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?

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 ...

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?)

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.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

165 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you