Documentation

sltest.testsequence.addSymbol

Add symbol to test sequence

Syntax

sltest.testsequence.addSymbol(blockPath,name,kind,scope)

Description

sltest.testsequence.addSymbol(blockPath,name,kind,scope) adds a symbol name with properties specified by scope and kind to a Test Sequence block specified by blockPath. The new symbol appears in the Symbols sidebar of the Test Sequence Editor. Symbols include data, messages, function calls, and triggers.

Examples

collapse all

This example creates a parameter theta in the test sequence block.

Set paths and open the model.

filePath = fullfile(matlabroot,'toolbox','simulinktest','simulinktestdemos');
rollModel = 'RollAutopilotMdlRef';
testHarness = 'RollReference_Requirement1_3';
open_system(fullfile(filePath,rollModel));

Open the test harness.

sltest.harness.open([rollModel '/Roll Reference'],testHarness)

Add a parameter.

sltest.testsequence.addSymbol('RollReference_Requirement1_3/Test Sequence',...
'theta','Data','Parameter')

Input Arguments

collapse all

Path to a Test Sequence block, including the block name, specified as a character vector.

Example: 'FanSpeedTestHarness/Test Sequence'

Name of the new symbol, specified as a character vector. The symbol must not already exist in the Test Sequence block.

Example: 'theta'

Symbol type, specified as a character vector.

Example: 'Data'

Symbol scope, specified as a character vector.

Example: 'Parameter'

Introduced in R2016a

Was this topic helpful?