This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

sltest.testsequence.findStep

Find test sequence steps

Syntax

steps = sltest.testsequence.findStep(Name,Value)

Description

steps = sltest.testsequence.findStep(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.

cd(matlabroot)
Model = 'sltestRollRefTestExample';
load_system(fullfile(matlabroot,'examples','simulinktest',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 = 1x10 cell array
  Columns 1 through 3

    {'AttitudeLevels...'}    {'AttitudeLevels...'}    {'AttitudeLevels...'}

  Columns 4 through 6

    {'AttitudeLevels...'}    {'AttitudeLevels...'}    {'AttitudeLevels...'}

  Columns 7 through 9

    {'AttitudeLevels...'}    {'AttitudeLevels...'}    {'AttitudeLevels...'}

  Column 10

    {'AttitudeLevels...'}

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

3. Close the model.

close_system(Model,0)

Input Arguments

collapse all

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

Introduced in R2017a