Documentation

sltest.harness.move

Move test harness from linked instance to library block or to a different harness owner

Syntax

sltest.harness.move(HarnessOwner,HarnessName)
sltest.harness.move(HarnessOwner,HarnessName,NewPath)
sltest.harness.move(HarnessOwner,HarnessName,Name,Value)

Description

sltest.harness.move(HarnessOwner,HarnessName) moves the test harness HarnessName associated with the block HarnessOwner from the linked instance to its reference library block. Moving the test harness removes it from the linked instance. This command results in an error if HarnessName is not a linked instance.

sltest.harness.move(HarnessOwner,HarnessName,NewPath) moves the test harness harnessName associated with the block HarnessOwner to the destination path specified by NewPath.

sltest.harness.move(HarnessOwner,HarnessName,Name,Value) moves the test harness HarnessName associated with HarnessOwner using additional options specified by one or more Name, Value pairs.

Examples

collapse all

Move the test harness Baseline_controller_tests from the linked instance of the Controller subsystem to the library subsystem.

% Open the model 
open_system sltestHeatpumpLibraryLinkExample
% Move the test harness
sltest.harness.move('sltestHeatpumpLibraryLinkExample/Controller',...
'Baseline_controller_tests')

Move the test harness Requirements_Tests from the linked instance of the Controller subsystem to the Plant subsystem and save it as Requirements_Tests_Moved.

sltest.harness.move('sltestHeatpumpLibraryLinkExample/Controller',...
'Requirements_Tests','DestinationOwner','sltestHeatpumpLibraryLinkExample/Plant',...
'Name','Requirements_Tests_Moved')

Input Arguments

collapse all

Model or component handle or path, specified as a character vector or a double.

Example: 1.9500e+03

Example: 'model_name'

Example: 'model_name/Subsystem'

The name of the harness, specified as a character vector.

Example: 'harness_name'

The destination path of the moved test harness, specified as a character vector.

Example: 'model_name/Subsystem2'

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 single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'DestinationOwner','model3/Controller3','Name','newMovedHarness'

collapse all

Owner block to which the test harness is moved, specified as the comma-separated pair consisting of 'DestinationOwner' and a character vector.

Example: 'DestinationOwner','model3/Controller3'

The name of the moved test harness, specified as the comma-separated pair consisting of 'Name' and a character vector. If a value is not specified for Name, the name of the test harness is used by default.

Example: 'Name','newMovedHarness'

Introduced in R2016a

Was this topic helpful?