sltest.TestCase Class
Namespace: sltest
Description
The sltest.TestCase
class enables authoring MATLAB®-based Simulink® tests. You define a MATLAB-based Simulink test in a MATLAB code .m
file that inherits from
sltest.TestCase
. The types of MATLAB-based Simulink tests include MATLAB unit testing framework tests and ASAM® XIL framework tests. For the unit testing framework
tests, you can use matlab.unittest.TestCase
methods. For ASAM XIL, you must install the Simulink
Test™ Support Package for ASAM XIL Standard and use the methods of sltest.xil.framework.Framework
and its associated
FrameworkConfiguration
, TestVariable
,
Stimulation
, and Acquisition
classes.
The sltest.TestCase
class is a handle
class.
Creation
To create a MATLAB unit testing framework test that you can load, run, and analyze its
results in the Test Manager, or an ASAM XIL framework test to run tests on a test bench,
create a class definition file that inherits from sltest.TestCase
. The file
contains methods that define the test case.
For debugging a MATLAB unit testing framework test at the command line without having to
run an sltest.TestCase
test, use the forInteractiveUse
static
method to create a TestCase
.
Methods
Examples
Version History
Introduced in R2020b
See Also
matlab.unittest.TestCase
| sltest.plugins.ModelCoveragePlugin
| sltest.plugins.MATLABTestCaseIntegrationPlugin
| sltest.plugins.ToTestManagerLog
| sltest.xil.framework.Framework
| sltest.xil.framework.FrameworkConfiguration
| sltest.xil.framework.Acquisition
| sltest.xil.framework.Stimulation
| sltest.xil.framework.TestVariable
Topics
- Test Models Using MATLAB-Based Simulink Tests
- Using MATLAB-Based Simulink Tests in the Test Manager
- Collect Coverage Using MATLAB-Based Simulink Tests
- Install and Set Up the Simulink Test Support Package for ASAM XIL Standard
- Create and Run Tests Using the ASAM XIL Standard
- Create Tests That Use Third-Party Test Benches