Main Content

sltest.testsequence.useScenario

R2026b

Convert Test Sequence block to scenario mode

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.

Open the model. Double-click the Test Sequence block to view it before you change it to use scenarios.

openExample('sltestRollRefTestExample');

Test scenario block before switching to scenarios

Change the Test Sequence block to use scenarios and name the first scenario Scenario_1.

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

Test scenario block showing scenario 1

Close the model without saving it.

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