Code covered by the BSD License  

Highlights from
Coverage Report Generator

Be the first to rate this file! 6 Downloads (last 30 days) File Size: 21.85 KB File ID: #33972

Coverage Report Generator

by Jonathan Karr

 

28 Nov 2011 (Updated 05 Dec 2011)

Generates Cobertura-style XML coverage report

| Watch this File

File Information
Description

This packages uses the profiler to generate a Cobertura-style XML coverage report. We use this report in conjunction with Hudson/Jenkins to track test coverage. The code sample below illustrates how to use the code. See example.m for details.

%add source code to path
addpath('src');

%import classses, functions
import edu.stanford.covert.test.Coverage;

%turn profiler on
profile('on', '-nohistory');

%run code
...

%turn profiler off
profile('off');

%generate coverage report
report = Coverage('src', '..');
report.exportXML(<output file name>);

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
mlcovr Package, absolutepath.m, absolutepath

Required Products Control System Toolbox
MATLAB release MATLAB 7.11 (2010b)
Other requirements - MATLAB >= 2008a - includes strjoin function from Peter Acklam (http://home.online.no/~pjacklam/matlab/software/util/) - includes absolutepath function inspired by Jochen Lenz (http://www.mathworks.com/matlabcentral/fileexchange/3857-absolutepath-m)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
05 Dec 2011

Including missing code

Tag Activity for this File
Tag Applied By Date/Time
coverage report Jonathan Karr 29 Nov 2011 13:23:50
cobertura Jonathan Karr 29 Nov 2011 13:23:50
xunit Jonathan Karr 29 Nov 2011 13:23:51
jenkins Jonathan Karr 29 Nov 2011 13:23:51
hudson Jonathan Karr 29 Nov 2011 13:23:51
junit Jonathan Karr 29 Nov 2011 13:23:51
testing Jonathan Karr 29 Nov 2011 13:23:51
unit test Jonathan Karr 29 Nov 2011 13:23:51

Contact us at files@mathworks.com