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

How can Clover be configured, via maven build running in Bamboo, to instrument and report on only changed files?

I'm working in a large, legacy project that does not have good code coverage, but I want to require the development team to have a certain level of code coverage for any classes that they touch or create. How can maven/clover/bamboo be used to report percent code covered only on classes changed since the last successful build, and fail the build if the code coverage goal is not acheived?

Currently using Bamboo 3, Maven 2

1 answer

1 accepted

0 votes
Answer accepted

Unfortunately such feature is not available. One of the reasons is that Bamboo can run builds using multiple agents, each of them checking out/updating source code when necessary - and you never know which agent will be used for build and thus how many files will be updated. Another reason is that our experience shows that such kind of report is not very reliable, because number of executed test classes and number of business classes in scope and thus coverage threshold varies very much from one commit to another. It's much better to have relatively stable set of classes in scope.

Instead of this, I recommend using the historical report feature, which will report about new classes since the last Clover run, show classes for which coverage has changed as well as present general trends in coverage on graphs.

Alternatively, you might consider limiting set of files for instrumentation to those being under active development. A Maven clover2:setup goal with includes/excludes options can be used for this purpose. See clover2:setup mojo reference. A list of files can be prepared manually or based on svn log, for example.

Suggest an answer

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

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

106 views 1 4
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