from
MATLAB/Simulink Unit Test Framework
by Carl Kritzinger
A unit test framework for matlab and simulink components
|
| run_unit_test_batch(source_root_directory)
|
function run_unit_test_batch(source_root_directory)
% run_unit_test_batch
%
% This function is intended to constitute the basis of a simple unit
% testing framework for simmulink components
% The underlying test strategy is:
% 1) Instantiate a system which connects up the inputs and outputs of each
% component
% 2) iterate through the test cases per component
% 3) Each test case consists of a set of input and a set of output test
% vectors and a comparator.
% 4) Input vectors are compared to the test case output vectors using the
% comparator function
% 5) The result of the unit test is a text file describing the details of
% the tests and results
%
% Inputs:
% source_root_directory - the source root
%
% Example:
% run_unit_test_batch('d:\src\')
%
% Other m-files required: none
%
% See also: unit_test, run_unit_test_batch, make_simulink_unit_test
%
% Author: Carl Kritzinger
% KAT DSP Team
% email address: carl@ska.ac.za
% November 2005
%------------- MAIN --------------
results = unit_test_iterator(source_root_directory);
generate_unit_test_report(results,fullfile(source_root_directory,'unit_test_results.txt'));
|
|
Contact us at files@mathworks.com