Main Content

sltest.testmanager.TestSuite Class

Namespace: sltest.testmanager

Create or modify test suite

Description

Instances of sltest.testmanager.TestSuite can contain other test suites and test cases. For MATLAB®-based Simulink® tests, test suites are implemented using class and method parameters. See Test Models Using MATLAB-Based Simulink Tests for more information.

The sltest.testmanager.TestSuite class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

Description

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

example

Properties

expand all

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

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types:

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

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types:

Test suite description text, specified as a character vector.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: char

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

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: logical

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.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: char

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

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: struct

Tags to use for categorizing, specified as a character vector or string array.

Attributes:

GetAccess
public
SetAccess
public
Dependent
true
NonCopyable
true

Data Types: char | string

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

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: object

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

Attributes:

GetAccess
public
SetAccess
private
Dependent
true
NonCopyable
true

Data Types: char

Methods

expand all

Examples

collapse 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

Version History

Introduced in R2015b