Documentation

sltest.testmanager.TestSuite class

Package: sltest.testmanager
Superclasses:

Create or modify test suite

Description

Instances of sltest.testmanager.TestSuite can contain other test suites and test cases.

Construction

obj = sltest.testmanager.TestSuite(parent,name) creates a sltest.testmanager.TestSuite object as a child of the specified parent. You can use test files or other test suites as the parent.

Input Arguments

expand all

Parent object for the test suite to reside in. The parent object can be a test file or a test suite, specified as an sltest.testmanager.TestFile or sltest.testmanager.TestSuite object.

Name of the test suite, specified as a character vector. If this is empty, a unique name is created.

Example: 'Coverage Test Suite'

Properties

expand all

Name of the test file without the file path and file extension, returned as a character vector.

Test suite description text, specified as a character vector.

Indicates if test cases that are children of the test suite will execute, specified as a logical value true or false.

Description text for why the test suite was disabled, specified as a character vector. This property is visible only when the Enabled property is set to false.

Test file that is the parent of the test suite, returned as a sltest.testmanager.TestFile object.

Test file and test suite hierarchy, returned as a character vector.

Test file or test suite that is the parent of the specified test suite, returned as a sltest.testmanager.TestFile or sltest.testmanager.TestSuite object.

This property is read-only.

Releases available for testing, returned as a string array. Add releases using sltest.testmanager.setpref.

The requirements that are attached at the test-suite level, returned as a structure.

Methods

convertTestTypeConvert test from one type to another
createTestCaseCreate test case
createTestForSubsystemCreate test case for subsystem
createTestSuiteCreate test suite
getCoverageSettingsGet coverage settings
getOptionsGet test file options
getPropertyGet test suite property
getTestCaseByNameGet test case object by name
getTestCasesGet test cases at first level of test suite
getTestSuiteByNameGet test suite object by name
getTestSuitesGet test suites at first level of test suite
removeRemove test suite
runRun test cases in test suite
setPropertySet test suite property

Examples

expand all

% Create test file
testfile = sltest.testmanager.TestFile('C:\MATLAB\test_file.mldatx');

% Create test suite
testsuite = sltest.testmanager.TestSuite(testfile,'My Test Suite')
testsuite = 

  TestSuite with properties:

            Name: 'My Test Suite'
        TestFile: [1x1 sltest.testmanager.TestFile]
        TestPath: 'test_file > My Test Suite'
          Parent: [1x1 sltest.testmanager.TestFile]
    Requirements: [0x1 struct]
     Description: ''
         Enabled: 1

Introduced in R2015b

Was this topic helpful?