getVerifyRuns

Class: sltest.testmanager.TestCaseResult
Package: sltest.testmanager

Get test case verify statement

Syntax

dataset = getVerifyRuns(result)

Description

dataset = getVerifyRuns(result) gets the verify statement dataset from a test case result. Verify statements are constructed in the Test Sequence or Test Assessment blocks in the system under test.

Input Arguments

expand all

Test case results to get verify statement dataset from, specified as a sltest.testmanager.TestCaseResult object.

Output Arguments

expand all

Test case verify statement dataset, returned as an array of Simulink.sdi.Run objects.

Examples

expand all

% File paths and model names
filePath = fullfile(matlabroot,'toolbox','simulinktest','simulinktestdemos');
topModel = 'TestAndVerificationAutopilotExample';
reqDoc = 'RollAutopilotRequirements.txt';
rollModel = 'RollAutopilotMdlRef';
testHarness = 'RollReference_Requirement1_3';
testFile = 'AutopilotTestFile.mldatx';
harnessLink = ['http://localhost:31415/matlab/feval/rmiobjnavigate?arguments='...
    '[%22RollAutopilotMdlRef:urn:uuid:523e5d2d-bb86-43b2-a187-43c52a2bc174.'...
    'slx%22,%22GIDa_3fe26a28_ee1e_4aff_b1cd_3303ca12539c%22]'];

% Open the main model
open_system(fullfile(filePath,rollModel));

% Open the test file in the test manager
open(fullfile(filePath,testFile));

% Open the test harness
web(harnessLink)

% Open harness and highlight requirements links
sltest.harness.open([rollModel '/Roll Reference'],testHarness)
rmi('highlightModel','RollReference_Requirement1_3')

% Open test sequence and test assessment blocks
open_system('RollReference_Requirement1_3/Test Sequence')
open_system('RollReference_Requirement1_3/Test Assessment')

% Run the test file
ro = sltest.testmanager.run;

% Gett the test results
tfr = getTestFileResults(ro);
tsr = getTestSuiteResults(tfr);
tcr = getTestCaseResults(tsr);

% Get the verify output
verifyOut = getVerifyRuns(tcr);

Introduced in R2016a