sltest.plugins.MATLABTestCaseIntegrationPlugin Class
Namespace: sltest.plugins
Add simulation and test results for MATLAB-based Simulink tests to Test Manager
Since R2020b
Description
The sltest.plugins.MATLABTestCaseIntegrationPlugin
adds simulation and test
results to the Test Manager test case results for MATLAB®-based Simulink® tests. A MATLAB-based Simulink test is a MATLAB code (.m
)
file that is derived from the sltest.TestCase
class. When you add this
plugin to a TestRunner
object and run the simulation, these results are
added to the Test Manager:
Test results are created for each test suite element of an
sltest.TestCase
class when you run the test case at the MATLAB command line.By default, criteria results are added for suite element failures from the
fatalAssertSignalsMatch
,assertSignalsMatch
,assumeSignalsMatch
, andverifySignalsMatch
qualification methods. A comparison run for these failures is added under the corresponding test case result. For passing comparison runs, add thematlab.unittest.plugins.DiagnosticsOutputPlugin
with passing diagnostics enabled to theTestRunner
.In addition to adding
sltest.plugins.MATLABTestCaseIntegrationPlugin
to aTestRunner
, if you addsltest.plugins.ModelCoveragePlugin
, model coverage is collected.
Simulation results, which are created using the simulate
method,
are added to the corresponding test case results.
The sltest.plugins.MATLABTestCaseIntegrationPlugin
class is a handle
class.
Creation
To use the MATLABTestCaseIntegrationPlugin
, add it to the
TestRunner
object:
import sltest.plugins.MATLABTestCaseIntegrationPlugin testRunner.addPlugin... (sltest.plugins.MATLABTestCaseIntegrationPlugin());
Examples
Version History
Introduced in R2020b