Main Content

sltest.testsequence.editScenario

Edit Test Sequence block test scenario properties

Since R2020b

Description

sltest.testsequence.editScenario(blockPath,scenarioName,'Name',newName) changes the name of the scenario specified by scenarioName in the Test Sequence block specified by blockPath to the specified newName. To edit the properties of steps within a scenario, see sltest.testsequence.editStep.

example

Examples

collapse all

Set the Test Sequence block in the sltestRollRefTestExample model to use scenarios. Then, change the name of the scenario named Scenario_1 to FirstScenario.

Model = 'sltestRollRefTestExample';
openExample(Model);

% Set block to use scenarios
sltest.testsequence.useScenario...
   ('sltestRollRefTestExample/Test Sequence',...
   'Scenario_1');

% Rename scenario
sltest.testsequence.editScenario...
   ('sltestRollRefTestExample/Test Sequence',...
   'Scenario_1','Name','FirstScenario');

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'

New name for the scenario, specified as a string or character vector.

Example: 'Name','FirstScenario'

Version History

Introduced in R2020b