Main Content

sltest.testsequence.useScenario

Convert Test Sequence block to scenario mode

Description

example

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.

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.

Model = 'sltestRollRefTestExample';
load_system(Model);

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.

Example: 'FanSpeedTestHarness/Test Sequence'

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

Example: 'Name','Scenario_1'

Introduced in R2020b