Main Content

sltest.testsequence.useScenario

Convert Test Sequence block to scenario mode

Since R2020b

Description

sltest.testsequence.useScenario(blockPath,scenarioName) converts the Test Sequence block, specified by blockPath, to use scenarios. Scenarios are tabs in the Test Sequence editor that enable you to define and run separate test sequences in a single Test Sequence block. After conversion, all existing steps in the block are moved to a scenario tab named scenarioName. If you convert a Test Sequence block to use scenarios, you cannot revert the block to non-scenario mode, even if it contains only one scenario.

example

Examples

collapse all

Change the Test Sequence block in the sltestRollRefTestModel to use scenarios and name the first scenario Scenario_1. Then, close the model without saving it.

openExample('sltestRollRefTestExample');

sltest.testsequence.useScenario...
   ('sltestRollRefTestExample/Test Sequence',...
   'Scenario_1');

close_system(Model,0)

Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a string or character vector. Instead of the block path, you can use a block handle.

Example: 'FanSpeedTestHarness/Test Sequence'

Name of the scenario, specified as a string or character vector.

Example: 'Name','Scenario_1'

Version History

Introduced in R2020b