Main Content

sltest.testmanager.FaultSet Class

Namespace: sltest.testmanager

Create or modify fault set

Since R2024a

Description

Objects of the sltest.testmanager.FaultSet class are fault sets in test cases. You must have Simulink® Fault Analyzer™ to use this class.

The sltest.testmanager.FaultSet class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

To create sltest.testmanager.FaultSet objects:

  • Use the addFaultSet method.

  • Create a fault set interactively in a test case, then get the associated sltest.testmanager.FaultSet object by using the getFaultSets method.

Properties

expand all

Fault set name, specified as a string scalar or character vector. If you do not specify this property, the fault set uses a predefined name, "Fault Set N", where N is the number of fault sets that use the default name.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: string | char

Whether the fault set is active, specified as a numeric or logical 1 (true) or 0 (false). You can activate only one fault set in a baseline or simulation test case, and you can activate only one fault set in each simulation of an equivalence test case.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: logical

Methods

expand all

Examples

collapse all

Create a test file, test suite, and test case, then add a fault set named myFaultSet.

tf = sltest.testmanager.TestFile("myTestFile.mldatx");
ts = sltest.testmanager.TestSuite(tf,"myTestSuite");
tc = sltest.testmanager.TestCase(ts,"simulation","myTestCase");
faultSet = addFaultSet(tc,Name="myFaultSet");

Version History

Introduced in R2024a