Assembly vs Namespace vs Class coverage

Assembly vs Namespace vs Class coverage

What kind of relation / calculation formula do these have? I noticed that just calculating avarage coverage of all classes in assembly doesn't give the same result as the assembly coverage in the report is. So it must be somehow weighted by lines / statements / etc. I would like to store the results in database on class level, and make a report based on time to show the assembly coverage as function of time. I'm using NCoverExplorer report ModuleClassSummary.


RE: Assembly vs Namespace vs Class coverage

Mika,

I've done a quick check of the calculation code, and both the class coverage % and the module coverage % are a simple sequence points covered / sequence points uncovered calculation. No weighting. Do you have an example that manifests the issue you asked about?

Thank you, Stephen Ward


RE: Assembly vs Namespace vs Class coverage

Thanks a lot, this helps. I had no issue, just wanted to calculate summaries from class level results by my own report. And I didn't know how.

In XML-file: class n="Customer" t="215" fp="215" u="37" c="82.7906952"

Test coverage calculation (1-(u/fp))100: (1-(37/215))100=82,79%

And the attributes are: - n = name - t = ??? - fp = sequence points covered - u = sequence points uncovered

Propably now I am able to calculate name space or assembly summaries from class level results.


RE: Assembly vs Namespace vs Class coverage

n = name t = total number of sequence points (no exclusions, no filtering) fp = total seq. pts. used in the coverage calculation. u = total unvisited seq. pts. c = coverage percent

Stephen