Main Content

sltest.testsequence.editScenario

Edit Test Sequence block test scenario properties

Description

example

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.

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';
load_system(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.

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'

Introduced in R2020b