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

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

Jed Crosby October 8, 2012

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
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2012

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

Jed Crosby December 3, 2012

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

kvallish June 24, 2018

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.

kvallish June 24, 2018

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
AUG Leaders

Atlassian Community Events