Main Content


Class: sltest.testmanager.TestSuite
Package: sltest.testmanager

Create test case


tc = createTestCase(ts,type,name,runOnTarget)


tc = createTestCase(ts,type,name,runOnTarget) creates a new test case within the test suite. You can specify the test case name and type: baseline, equivalence, and simulation. Also, if you are using the test case for real-time testing, you can specify this using the runOnTarget argument.

Input Arguments

expand all

Test suite that you want to add a test case to, specified as an sltest.testmanager.TestSuite object.

Test case type, specified as:

  • "baseline"

  • "equivalence"

  • "simulation"

Test case name, specified as a string scalar or character vector. If this input argument is empty, then the Test Manager gives the test case a unique name.

Specify if you want to run the test case simulation on a target, specified as a cell array of Booleans. This is an optional argument. For more information on real-time testing, see Test Models in Real Time.

Output Arguments

expand all

Test case, returned as an sltest.testmanager.TestCase object.


expand all

% Create test file
tf = sltest.testmanager.TestFile("test_file");

% Create test suite
ts = sltest.testmanager.TestSuite(tf,"My Test Suite");

% Create test case
tc = createTestCase(ts,"baseline","My Baseline Test")

Version History

Introduced in R2015b