Documentation

sltest.testmanager.getpref

Get Test Manager preferences

Syntax

settings = sltest.testmanager.getpref(group)
settings = sltest.testmanager.getpref(group,preferences)

Description

settings = sltest.testmanager.getpref(group) returns Test Manager preference settings in group.

settings = sltest.testmanager.getpref(group,preferences) returns Test Manager preferences for one or more preferences. Use settings = sltest.testmanager.getpref(group) to get valid preferences for group.

Examples

collapse all

Get the preferences for the sections that appear in test suites.

Get preferences for test suite display. A value of 1 means the section appears.

settings = sltest.testmanager.getpref('TestSuiteDisplay')
settings = 

  struct with fields:

        TestTag: 1
    Description: 1
    Requirement: 1
       Callback: 1
       Coverage: 1

Get the settings for Description and Requirement preferences.

settings = sltest.testmanager.getpref('TestSuiteDisplay',{'Description','Requirement'})
settings = 

  struct with fields:

    Description: 1
    Requirement: 1

Get a list of MATLAB® releases available in Test Manager.

Get the list of MATLAB release preferences.

settings = sltest.testmanager.getpref('MATLABReleases')
ans = 

  1×2 struct array with fields:

    Name
    MATLABRoot
    IsDefault
    Selected

Get the Name value.

settings.Name
ans =

    '14a'


ans =

    'R2017b'

Input Arguments

collapse all

Preference group name, specified as one of these values:

  • 'TestFileDisplay' — File preferences and their display status

  • 'TestSuiteDisplay' — Test suite preferences and their display status

  • 'TestCaseDisplay' — Test case preferences and their display status

  • 'MATLABReleases' — Releases available for testing

Preference name, specified as a character vector or a cell array of character vectors. Use settings = sltest.testmanager.getpref(group) to get valid preferences for each group.

Example: 'Description'

Example: {'TestTag','Description'}

Output Arguments

collapse all

Preference settings, returned as a struct.

Introduced in R2017a

Was this topic helpful?