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.testmanager.moveTests

Move test cases or test suites to a new location

Syntax

objArray = sltest.testmanager.moveTests(srcObjArray,targetObj)

Description

example

objArray = sltest.testmanager.moveTests(srcObjArray,targetObj) moves test cases or test suites to another test file or test suite.

Examples

collapse all

% Create test structure
tf1 = sltest.testmanager.TestFile('Test File 1');
ts = tf1.createTestSuite('Test Suite');

% Create new test file
tf2 = sltest.testmanager.TestFile('Test File 2');

% Move test suite to Test File 2
objArray = sltest.testmanager.moveTests(ts,tf2)
objArray = 

  TestSuite with properties:

           Name: 'Test Suite'
    Description: ''
        Enabled: 1
       TestFile: [1x1 sltest.testmanager.TestFile]
       TestPath: 'Test File 2 > Test Suite'
         Parent: [1x1 sltest.testmanager.TestFile]

Input Arguments

collapse all

Test cases or test suites to move, specified as an array of sltest.testmanager.TestCase or sltest.testmanager.TestSuite objects.

The destination test file or test suite to move to, specified as an sltest.testmanager.TestFile or sltest.testmanager.TestSuite object.

Output Arguments

collapse all

Test cases or test suites at the target destination location, returned as an array of sltest.testmanager.TestCase or sltest.testmanager.TestSuite objects.

Introduced in R2015b