Main Content

remove

Class: sltest.testmanager.SpecifiedFault
Namespace: sltest.testmanager

Remove fault from fault set

Since R2024a

Syntax

remove(specifiedFault)

Description

remove(specifiedFault) removes the specified fault from the fault set in a test case. You must have Simulink® Fault Analyzer™ to use this method.

Input Arguments

expand all

Fault in the fault set, specified as a sltest.testmanager.SpecifiedFault object.

Examples

expand all

Suppose you have a test file named myTestFile that contains a test suite, test case, and a fault set. The test uses the model myModel as the model under test. The model has a fault named sineFault on the output port of a Sine Wave block. Add the fault to the fault set.

tf = sltest.testmanager.TestFile("myTestFile.mldatx");
ts = getTestSuite(tf);
tc = getTestCase(ts);
myFaultSet = getFaultSets(tc);
sltest.testmanager.refreshFaults("myModel")
myFault = addSpecifiedFault(myFaultSet,...
  "myModel/Sine Wave/Outport/1","sineFault");

Remove the fault from the fault set.

remove(myFault)

Version History

Introduced in R2024a