Main Content

sltest.testsequence.findStep

R2026b

Find test sequence steps

Description

steps = sltest.testsequence.findStep(blockPath,Name=Value) returns a cell array steps listing Test Sequence steps that match properties specified by Name=Value pairs.

Examples

collapse all

This example finds a test step in a Test Sequence block.

1. Load the model.

Model = 'sltestRollRefTestExample';
load_system(Model)

2. Find test sequence steps that contain the case-insensitive string apeng.

steps = sltest.testsequence.findStep('sltestRollRefTestExample/Test Sequence',...
    Name='[Aa][Pp][Ee]ng',RegExp="on")
steps = 1×10 cell
    {'AttitudeLevels.APEngage_LowRoll'}    {'AttitudeLevels.APEngage_LowRoll.SetLowPhi'}    {'AttitudeLevels.APEngage_LowRoll.EngageAP_Low'}    {'AttitudeLevels.APEngage_MedRoll'}    {'AttitudeLevels.APEngage_MedRoll.SetMedPhi'}    {'AttitudeLevels.APEngage_MedRoll.EngageAP_Med'}    {'AttitudeLevels.APEngage_HighRoll'}    {'AttitudeLevels.APEngage_HighRoll.SetHighPhi'}    {'AttitudeLevels.APEngage_HighRoll.EngageAP_High'}    {'AttitudeLevels.APEngagement_End'}

steps(3)
ans = 1×1 cell array
    {'AttitudeLevels.APEngage_LowRoll.EngageAP_Low'}

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-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: Name='[Aa][Pp][Ee]ng',RegExp="on"

The name of the test steps to search.

Example: Name='Engage'

Example: Name='[Aa][Pp][Ee]ng'

Specifies case.

Example: CaseSensitive="on"

Specify whether to search the step names using Name as a regular expression.

Example: RegExp="on"

Output Arguments

collapse all

Cell array of test steps matching search criteria.

Example: 1×10 cell array

Version History

Introduced in R2017a