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

Per test coverage of unit tests

Hey,

As part of my research, I would like to get coverage measurements per unit test (which is equal to run a single test and check how it covers the whole system)

I followed the guides and I get the coverage in the .html format

I would like to get the different coverage metrics per method in an XML format or a text file which will help me to automate the process of data.

Is there a way to do that?

 

Many thanks!

1 answer

0 votes

This is not available out of the box, I'm afraid. But you can read the Clover's database and coverage recording files to extract the data you need. See:

http://openclover.org/doc/manual/latest/developer-guide--database-structure.html

Thanks for your response!

I'm trying to use the given API but it seems like the only thing I can get is the total number of statements\branches covered by in a single method. What I really look for is the number of statements covered in the whole projects by a single test method (in order to measure the effectiveness of the specific test method).

Does the API allows such a thing or do you know any other reasonable way to do so without running the test suite multiple times with a single test active each time?

 

Many thanks!

I'm not sure what do you want to achieve exactly. 

But please have a look at per-test coverage files - they track code coverage generated by each test separately (in addition to the global coverage file created).

Suggest an answer

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

Keep your team in the loop with Team @mentions in Jira Software!

Hi everyone! My name is Jenny, a Product Manager at Atlassian. After launching Team @mentions in Confluence, we heard a lot of positive feedback from customers that they love how easy it is to @men...

265 views 4 12
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