Main Content

matlab.unittest.Scope Class

Namespace: matlab.unittest

Enumeration class for test scope

Description

The matlab.unittest.Scope enumeration class represents the scope of test execution. For example, a DiagnosticRecord object has a property that represents the scope where an event originated as a matlab.unittest.Scope enumeration object.

For more information about test scope, see Class-Based Unit Tests and Write Plugins to Extend TestRunner.

Enumeration Members

Enumeration Member NameDescription
TestMethod

Scope of TestMethodSetup, Test, and TestMethodTeardown methods

TestClass

Scope of TestClassSetup and TestClassTeardown methods

SharedTestFixture

Scope of shared-test-fixture setup and teardown methods

Examples

collapse all

Create a matlab.unittest.Scope enumeration object that corresponds to class-level setup and teardown methods.

s = matlab.unittest.Scope.TestClass
s = 

  Scope enumeration

    TestClass

Display information about the variable that represents the enumeration.

whos s
  Name      Size            Bytes  Class                    Attributes

  s         1x1                 0  matlab.unittest.Scope              

Version History

Introduced in R2017a