# slreportgen.report.TestSequence class

Package: slreportgen.report
Superclasses: `slreportgen.report.Reporter`

Test Sequence block reporter

## Description

Use an object of the `slreportgen.report.TestSequence` class to report on a Simulink® Test Sequence block. Using a Test Sequence block in a Simulink model requires Simulink Test™.

By default, a `TestSequence` reporter generates:

• Property tables for all of the symbols — input, output, local, constant, parameter, and data store memory

• A nested list for the step hierarchy

• Details for each step including the step description, `When` condition, action statements, and a table of transition conditions and next steps

If the Test Sequence block uses scenarios, the `TestSequence` reporter includes the scenario parameter in the parameters table and a list for each scenario in the step hierarchy. In the report, scenarios are identified by the scenario icon. The active scenario is also identified by the word `Active` followed by the active scenario icon. For example:

The reporter adds a note to the report when the active scenario is controlled in the workspace. In this case, the active scenario is not identified in the report.

Use the `TestSequence` reporter properties to filter the content and customize the content formatting.

Note

To use an `slreportgen.report.TestSequence` reporter in a report, you must create the report using the `slreportgen.report.Report` class or subclass.

The `slreportgen.report.TestSequence` class is a `handle` class.

### Class Attributes

 `HandleCompatible` `true`

For information on class attributes, see Class Attributes.

## Creation

### Description

````reporter = slreportgen.report.TestSequence()` creates an empty `TestSequence` reporter object based on the default template. You must specify a Test Sequence block to report by setting the Object property. Use other properties to specify report options.```

example

````reporter = slreportgen.report.TestSequence(testSeqObject)` creates a `TestSequence` reporter and sets the Object property to the specified Test Sequence block.```
````reporter = slreportgen.report.TestSequence(Name=Value)` sets the reporter properties using name-value pairs. You can specify multiple name-value pair arguments in any order.```

## Properties

expand all

Test Sequence block to report, specified as one of these types of values:

• Character vector or string scalar containing the path of the block

• Handle to the block

Whether to include symbols in the report, specified as `true` or `false`. If `IncludeSymbols` is `true`, the report includes property tables for the symbols. In the input and output symbol property tables, the symbols are sorted by the port number. In the local, constant, parameter, and data store memory tables, the symbols are sorted by the symbol name.

If the model was compiled before report generation, the values in the property tables are the values after compilation. Otherwise, the property values are the values before compilation and a note at the end of the Symbols section states that the model was not compiled. By default, models are compiled during report generation. You can control whether a model is compiled during report generation by setting the `CompileModelBeforeReporting` property of the `slreportgen.report.Report` object that includes this reporter.

Data Types: `logical`

Whether to include the step hierarchy, specified as `true` or `false`. If `IncludeStepHierarchy` is `true`, the report includes the step hierarchy as a nested list. The step name in the list links to the corresponding step content in the report.

Data Types: `logical`

Whether to include step content, specified as `true` or `false`. If `IncludeStepContent` is `true`, the report includes the content for each step. In the reported step content, the step name links to the step hierarchy in the report. You can filter the reported step content by using the IncludeStepDescription, IncludeStepWhenCondition, IncludeStepAction, IncludeStepTransitions, and IncludeStepRequirements properties.

Data Types: `logical`

Whether to include the step description in the content reported for a step, specified as `true` or `false`.

Data Types: `logical`

Whether to include the step `When` condition in the content reported for a step, specified as `true` or `false`. The `When` condition is the condition that activates a `When` decomposition child step.

Data Types: `logical`

Whether to include the step actions in the content reported for a step, specified as `true` or `false`.

Data Types: `logical`

Whether to include the step transitions table in the content reported for a step, specified as `true` or `false`. The step transitions table contains the transition conditions and the next steps.

Data Types: `logical`

Whether to include a link to the step requirements in the content reported for a step, specified as `true` or `false`. Linking to the step requirements requires Requirements Toolbox™.

Data Types: `logical`

Table formatter for tables generated by this reporter, specified as an `mlreportgen.report.BaseTable` object. The default value of this property is a `BaseTable` object with the `TableStyleName` property set to the `TestSequenceTable` style, which is defined in the default template for a `TestSequence` reporter. To customize the appearance of the table, modify the properties of the default `BaseTable` object or replace it with your own `BaseTable` object. If you add content to the `Title` property of the `BaseTable` object, the content appears in front of the table title in the generated report.

Formatter for the step hierarchy list, specified as an `mlreportgen.dom.UnorderedList` object or `mlreportgen.dom.OrderedList` object. The `UnorderedList` or `OrderedList` object must not contain list items.

The default value of this property is an `UnorderedList` object with the `StyleName` property set to the `TestSequenceList` style, which is defined in the default template for a `TestSequence` reporter. To customize the appearance of the list, modify the properties of the default `UnorderedList` object or replace the object with your own `UnorderedList` or `OrderedList` object.

Source of the template for this reporter, specified as one of these options:

• Character vector or string scalar that specifies the path of the file that contains the template for this reporter

• Reporter or report whose template is used for this reporter or whose template library contains the template for this reporter

• DOM document or document part whose template is used for this reporter or whose template library contains the template for this reporter

The specified template must be the same type as the report to which this reporter is appended. For example, for a Microsoft® Word report, `TemplateSrc` must be a Word reporter template. If the `TemplateSrc` property is empty, this reporter uses the default reporter template for the output type of the report.

Name of template for this reporter, specified as a character vector or string scalar. The template for this reporter must be in the template library of the template source (`TemplateSrc`) for this reporter.

Hyperlink target for this reporter, specified as a character vector or string scalar that specifies the link target ID or as an `mlreportgen.dom.LinkTarget` object. A character vector or string scalar value is converted to a `LinkTarget` object. The link target immediately precedes the content of this reporter in the output report.

expand all

## Examples

collapse all

This example shows how to use an `slreportgen.report.TestSequence` object to report on a Test Sequence block.

Import these packages so that you do not have to use long, fully qualified class names.

```import mlreportgen.report.* import slreportgen.report.*```

Create a Simulink${}^{®}$ Report Generator report of type PDF.

`rpt = slreportgen.report.Report("myTestSequenceReport","pdf");`

Load a model that has a test sequence.

```model_name = "slrgex_sltestTestSequenceDebouncerExample"; load_system(model_name); testSeqObj = strcat(model_name,"/Debouncer_Test");```

Create a chapter for the Test Sequence block.

`chapter = Chapter(testSeqObj);`

Create a reporter for the Test Sequence block.

`rptr = TestSequence(testSeqObj);`

Append the reporter to the chapter and the chapter to the report.

```append(chapter,rptr); append(rpt,chapter);```

Close the report and model and view the report.

```close(rpt); close_system(model_name); rptview(rpt);```

## Version History

Introduced in R2020b