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

Is there a supported way to extract the source-file-to-relevant tests mapping from a Clover snapshot file?

I would like to use this information to decide which tests to run manually before checking in a given changelist.

1 answer

1 accepted

0 votes
Answer accepted

There's no API for this, however you could use our internal SnapshotPrinter tool:

java -cp clover.jar com.cenqua.clover.test.optimization.SnapshotPrinter clover.snapshot.file

In the "All files:" section you'll find which tests are related with given source file.

Regards
Marek

Great. It works. This is exactly what I wanted.

Can I generate a snapshot file and get mappings using a merged clover database (generated as explained in https://community.atlassian.com/t5/Clover-questions/How-do-I-get-functional-test-to-product-code-coverage-mapping/qaq-p/742178#M1674) ?

My aim is to get a mapping of source code<->test code so that I run only those tests when a given source code file changes.

Yes, I was able to generate the mapping file for a merged database using the same command.

Suggest an answer

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

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

102 views 0 3
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