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

I want to know which statments are hit by which test cases

Soneya binta Hossain January 18, 2022

For a source file, and all its statements, I want to know which tests covered which lines. I was not able to collect this information in the XML file. Now I am trying to read from the clover database. Any help will be appreciated. So far I have this:

 

CloverDatabase db = CloverDatabase.loadWithCoverage("joda_time/target/clover/clover.db", new CoverageDataSpec());
CoverageData cd= db.getCoverageData();
Map<TestCaseInfo, BitSet> map = cd.mapTestsAndCoverageForFile((FullFileInfo) fileInfo);


But I dont know how to create instace of FullFileInfo

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events