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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • 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

Link the instrumented code with the tests in the Clover html report

We're running Clover 3.2.0 for Grails (2.2.4) in a Bamboo build. The build is run using Gradle 1.8.


One of the developers thought it would be handy if she could determine from the Clover html report just which tests a particular line of code was called from. Is there a way to have Clover show this in the reports?


2 answers

1 accepted

0 votes
Answer accepted

Yes, it's possible. In case when some source line is covered by test, it has a dark green or a dark yellow stripe. You can click on the left page margin to open a dialog window with a list of tests hitting given line.

You can also click on the 'Select tests to highlight the test coverage' link (it's located between file metrics and source code sections) to open a dialog with a list of tests hitting current source file. In this dialog you can select one or more tests to highlight code covered by them.

Please see the page to learn more about Clover's HTML report.

Thanks for the reply. It looks like we do have this in the reports, just not on all the instrumented files. I will dig into why some files show the tests and others don't.

0 votes

 It looks like we do have this in the reports, just not on all the instrumented files.

1) Please check if you have compiled all your tests with Clover as well as executed all of them. If some test was not instrumented or did not run, you'll simply won't see it in a report. Check if you see given test class(es) in a report and that they have green coverage.

2) Please check if you run test classes and application classes in separate JVMs. For example: a maven-cargo-plugin is used to start container on the fly; an application is being deployed to a test machine; etc. In such case you will need to configure a Distributed Coverage feature in order to track per-test coverage across multiple JVMs.

3) Please check if Clover correctly detected your test classes - they shall be listed on the "Test code" tab in a report. Clover recognizes JUnit, TestNG and Spock. In case you use a different test framework you may have to set up test patterns manually.

4) Please check if you don't see any warnings in a build log, such as "Ignoring coverage recording". See Troubleshooting+Reports for few typical cases.

Suggest an answer

Log in or Sign up to answer
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...

171 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