Code covered by the BSD License  

Highlights from
mlcovr Package

5.0

5.0 | 2 ratings Rate this file 12 Downloads (last 30 days) File Size: 14.3 KB File ID: #24985

mlcovr Package

by

 

10 Aug 2009 (Updated )

mlcovr provides XML extension to profiling and coverage tools

| Watch this File

File Information
Description

The MLCOVR package provides XML-formatted output that is consistent with the Cobertura Java coverage tool. It uses the MATLAB profile tool along with custom scripts to evaluate lines covered, branches covered, branch types and complexity. It works on a directory and its subdirectories, collecting information as packages for display.

MLCOVR is part of the FAST software. FAST: A Framework for Agile Software Development Copyright (c) 2008-2009 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

MLCOVR subversion repository is maintained at
https://software.sandia.gov/svn/public/fast/matlab/stable/+mlcovr

Acknowledgements

This file inspired Coverage Report Generator.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
10 Apr 2014 Kai Bublitz

I think this is a great piece of work. So far the only working way to add a coverage report for our automated test cases.

While I'm at it: I needed another fix in coveragerptxml.m (line 120) and coveragerpthtml.m (line 162):
Methods.type is no longer a string, but an enumeration type. It can simply be cast to char:
char(myClass.Methods(m).type)

10 Apr 2014 Kai Bublitz  
10 Apr 2014 Kai Bublitz

I think there is a problem when using mlcovr with R2013b (and maybe others).
getmfilelist gives an error on line 170 because the Methods returned by getcallinfo don't include the field calllines. The simple fix is to remove this line, since the callines isn't used anywhere.
A second possibility to fix the issue is to change line 84 to
Methods = getcallinfo(mFiles(n).filename,'-v7.8',code);
which will bring the callines field back, but "This option is only for a multi-release conversion of the output is will be removed in a future version." (internal documentation of getcallinfo on the '-v7.8' option)

Updates
28 Aug 2009

Updated to provide an option for HTML formatted code coverage output.

Contact us