Home > functions > internal > unit-test > dsUnitRun_template.m

dsUnitRun_template

PURPOSE ^

% Run template

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% Run template
 References:
   https://www.mathworks.com/help/matlab/matlab_prog/run-tests-for-various-workflows.html
   https://www.mathworks.com/help/matlab/matlab_prog/create-simple-test-suites.html
   https://www.mathworks.com/help/matlab/matlab_prog/tag-unit-tests.html

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% Run template
0002 % References:
0003 %   https://www.mathworks.com/help/matlab/matlab_prog/run-tests-for-various-workflows.html
0004 %   https://www.mathworks.com/help/matlab/matlab_prog/create-simple-test-suites.html
0005 %   https://www.mathworks.com/help/matlab/matlab_prog/tag-unit-tests.html
0006 
0007 %% Imports
0008 import matlab.unittest.TestSuite
0009 import matlab.unittest.selectors.HasTag
0010 
0011 %% Test Suites
0012 % Examples:
0013 %   fullSuite(1) = TestSuite.fromClass(?test_class);
0014 %   fullSuite = TestSuite.fromFolder(pwd);
0015 %   fullSuite = TestSuite.fromPackage('package');
0016 
0017 %% Run Test Suite
0018 % result = run(fullSuite);
0019 
0020 %% Run Just Tagged Tests
0021 % testNamesCell{fullSuite.Name}';
0022 % results = runtests(testNamesCell,'Tag','Tag1');
0023 %or
0024 % taggedSuite = fullSuite.selectIf(HasTag('Tag1'));
0025 % result = run(taggedSuite);

Generated on Tue 12-Dec-2017 11:32:10 by m2html © 2005