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.readStep

Find Test Sequence blocks

Syntax

stepInfo = sltest.testsequence.readStep(blockPath,stepPath)
stepInfo = sltest.testsequence.readStep(blockPath,stepPath,Property)

Description

stepInfo = sltest.testsequence.readStep(blockPath,stepPath) returns a struct stepInfo of properties for the test step stepPath in the Test Sequence block blockPath.

stepInfo = sltest.testsequence.readStep(blockPath,stepPath,Property) returns the value stepInfo of the Property for the test step.

Examples

collapse all

This example reads properties of a test step and a transition in a Test Sequence block.

1. Load the model.

cd(matlabroot)
Model = 'sltestRollRefTestExample';
load_system(fullfile(matlabroot,'examples','simulinktest',Model))

2. Read the properties of the test step SetMedPhi, which is a sub-step of AttitudeLevels.APEngage_MedRoll.

stepInfo = sltest.testsequence.readStep([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi')
stepInfo = struct with fields:
               Name: 'AttitudeLevels.APEngage_MedRoll.SetMedPhi'
             Action: 'Phi = 11.5;...'
         IsWhenStep: 0
      IsWhenSubStep: 0
        Description: ''
              Index: 1
    TransitionCount: 1

3. Read the action of the same step.

stepAction = sltest.testsequence.readStep([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll.SetMedPhi','Action')
stepAction = 
    'Phi = 11.5;
     APEng = false;'

4. Read the transition properties for the parent step.

xInfo = sltest.testsequence.readTransition([Model,'/Test Sequence'],...
    'AttitudeLevels.APEngage_MedRoll',1)
xInfo = struct with fields:
         Step: 'AttitudeLevels.APEngage_MedRoll'
        Index: 1
    Condition: 'duration(DD_PhiRef == 0,sec) >= DurationLimit'
     NextStep: 'AttitudeLevels.APEngage_HighRoll'

5. Close the model.

close_system(Model,0)

Input Arguments

collapse all

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

Example: 'FanSpeedTestHarness/Test Sequence'

Path of the step in the Test Sequence block, specified as a character vector. The path includes the step location in the Test Sequence hierarchy, using . to separate hierarchy levels.

Example: 'SystemHeatingTest.InitializeHeating'

Property of the test step, specified as a character vector.

Example: 'TransitionCount'

Output Arguments

collapse all

Properties of the test step.

Example: struct

Introduced in R2017a