padv.builtin.task.GenerateRequirementsReport Class
Namespace: padv.builtin.task
Superclasses: padv.Task
Task for generating requirements report for each requirement set
Description
This class requires CI/CD Automation for Simulink Check.
The padv.builtin.task.GenerateRequirementsReport
class provides a task that
can generate a requirements report for each requirement set by using Requirements Toolbox™. You can use the report to document your requirements for review. The report can
contain information like links to requirements, requirements change and revision information,
and the Implementation and Verification status summaries.
You can add the task to your process model by using the method addTask
.
After you add the task to your process model, you can run the task from the Process Advisor app or
by using the function runprocess
.
To view the source code for this built-in task, in the MATLAB® Command Window, enter:
open padv.builtin.task.GenerateRequirementsReport
The padv.builtin.task.GenerateRequirementsReport
class is a handle
class.
Creation
Description
task = padv.builtin.task.GenerateRequirementsReport()
creates a
task for generating a requirements report for each loaded requirement set.
task = padv.builtin.task.GenerateRequirementsReport(
sets certain properties using one or more name-value arguments. For example, to create a
task that only generates a requirements report for requirement sets that include
Name=Value
)"SystemReqs"
in their path, you can specify
padv.builtin.task.GenerateRequirementsReport(IterationQuery=padv.builtin.query.FindRequirements(IncludePathRegex="SystemReqs"))
.
You can use this syntax to set property values for InputQueries
,
Name
, IterationQuery
,
InputDependencyQuery
, Licenses
,
LaunchToolAction
, and LaunchToolText
.
The padv.builtin.task.GenerateRequirementsReport
class also has other properties, but you cannot set
those properties during task creation.
Properties
The GenerateRequirementsReport
class inherits properties from padv.Task
. The properties listed in
General Task Properties are padv.Task
properties that the GenerateRequirementsReport
task overrides.
The task also has properties for specifying Report Options that the task uses when
calling the function slreq.generateReport
(Requirements Toolbox).
Name
— Unique identifier for task in process
"padv.builtin.task.GenerateRequirementsReport"
(default) | string
Unique identifier for task in process, specified as a string.
Example: "MyRequirementsReportTask"
Data Types: string
Title
— Human-readable name that appears in Process Advisor app
"Generate requirements report"
(default) | string
Human-readable name that appears in Process Advisor app, specified as a string.
Example: "My Requirements Report Task"
Data Types: string
DescriptionText
— Task description
"This task uses Requirements Toolbox to generate a report
for each requirement set."
(default) | string
Task description, specified as a string.
When you point to a task in Process Advisor and click the information icon, the tooltip shows the task description.
Example: "This task generates requirements
reports."
Data Types: string
DescriptionCSH
— Path to task documentation
path to GenerateRequirementsReport
documentation (default) | string
Path to task documentation, specified as a string.
When you point to a task in Process Advisor, click the ellipsis (...), and click Help, Process Advisor opens the task documentation.
Example: fullfile(pwd,"taskHelpFiles","myTaskDocumentation.pdf")
Data Types: string
RequiredIterationArtifactType
— Artifact type that task can run on
"mwreq_file"
| "sl_req_file"
| ...
Type of artifact, specified as one or more of the values listed in this table. To specify multiple values, use an array.
Category | Artifact Type | Description |
---|---|---|
MATLAB | "m_class" | MATLAB class |
"m_file" | MATLAB file | |
"m_func" | MATLAB function | |
"m_method" | MATLAB class method | |
"m_property" | MATLAB class property | |
Model Advisor | "ma_config_file" | Model Advisor configuration file |
"ma_justification_file" | Model Advisor justification file | |
Process Advisor | "padv_dep_artifacts" | Related artifacts that current artifact depends on |
"padv_output_file" | Process Advisor output file | |
Project | "project" | Current project file |
Requirements | "mwreq_file" | Requirement file (since R2024b) |
"mwreq_item" | Requirement (since R2024b) | |
| Requirement (for R2024a and earlier) | |
"sl_req_file" | Requirement file (for R2024a and earlier) | |
"sl_req_table" | Requirements Table | |
Stateflow® | "sf_chart" | Stateflow chart |
"sf_graphical_fcn" | Stateflow graphical function | |
"sf_group" | Stateflow group | |
"sf_state" | Stateflow state | |
"sf_state_transition_chart" | Stateflow state transition chart | |
"sf_truth_table" | Stateflow truth table | |
Simulink® | "sl_block_diagram" | Block diagram |
"sl_data_dictionary_file" | Data dictionary file | |
"sl_embedded_matlab_fcn" | MATLAB function | |
"sl_block_diagram" | Block diagram | |
"sl_library_file" | Library file | |
"sl_model_file" | Simulink model file | |
"sl_protected_model_file" | Protected Simulink model file | |
"sl_subsystem" | Subsystem | |
"sl_subsystem_file" | Subsystem file | |
System Composer™ | "zc_block_diagram" | System Composer architecture |
"zc_component" | System Composer architecture component | |
"zc_file" | System Composer architecture file | |
Tests | "harness_info_file" | Harness info file |
"sl_harness_block_diagram" | Harness block diagram | |
"sl_harness_file" | Test harness file | |
"sl_test_case" | Simulink Test™ case | |
"sl_test_case_result" | Simulink Test case result | |
"sl_test_file" | Simulink Test file | |
"sl_test_iteration" | Simulink Test iteration | |
"sl_test_iteration_result" | Simulink Test iteration result | |
"sl_test_report_file" | Simulink Test result report | |
"sl_test_result_file" | Simulink Test result file | |
"sl_test_resultset" | Simulink Test result set | |
"sl_test_seq" | Test Sequence | |
"sl_test_suite" | Simulink Test suite | |
"sl_test_suite_result" | Simulink Test suite result |
Example: "mwreq_file"
Example: ["mwreq_file" "sl_req_file"]
IterationQuery
— Find artifacts that task iterates over
padv.builtin.query.FindRequirements
(default) | padv.Query
object | name of padv.Query
object
Query that finds the artifacts that the task iterates over, specified as a
padv.Query
object or the name of a padv.Query
object. When you specify IterationQuery
, the task runs one time
for each artifact returned by the query. In the Process
Advisor app, the artifacts returned by IterationQuery
appear under task title.
For more information about task iterations, see Overview of Process Model.
InputDependencyQuery
— Finds artifact dependencies for task inputs
padv.builtin.query.GetDependentArtifacts
(default) | padv.Query
object | name of padv.Query
object
Query that finds artifact dependencies for task inputs, specified as a
padv.Query
object or the name of a padv.Query
object.
The build system runs the query specified by
InputDependencyQuery
to find the dependencies for the task
inputs, since those dependencies can impact if task results are up-to-date.
For more information about task inputs, see Overview of Process Model.
Example: padv.builtin.query.GetDependentArtifacts
LaunchToolAction
— Function that launches tool
@launchToolAction
(default) | function handle
Function that launches a tool, specified as the function handle.
When you point to a task in the Process Advisor app, you can click the ellipsis (...) to see more options. For built-in tasks, you have the option to launch a tool associated with the task.
For the task GenerateRequirementsReport
, you can open the
Requirements Editor app.
Data Types: function_handle
LaunchToolText
— Description of action that LaunchToolAction
property performs
"Open Requirements Editor"
(default) | string
Description of the action that the LaunchToolAction
property
performs, specified as a string.
Data Types: string
InputQueries
— Inputs to task
padv.Query
object | name of padv.Query
object | array of padv.Query
objects
Inputs to the task, specified as:
a
padv.Query
objectthe name of
padv.Query
objectan array of
padv.Query
objectsan array of names of
padv.Query
objects
By default, the task GenerateRequirementsReport
gets the current
requirement set that the task is iterating over by using the built-in query
padv.builtin.query.GetIterationArtifact
.
OutputDirectory
— Location for standard task outputs
fullfile('$DEFAULTOUTPUTDIR$',
'$ITERATIONARTIFACT$','report')
(default) | string
Location for standard task outputs, specified as a string.
The built-in tasks use tokens, like $DEFAULTOUTPUTDIR$
, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Data Types: string
ReportFormat
— Output format for generated report
"html"
(default) | "pdf"
| "docx"
Output format for the generated requirements report, specified as either:
"html"
— HTML format"pdf"
— PDF format"docx"
— Microsoft® Word document format
Example: "pdf"
ReportName
— Name of generated requirements report
"$ITERATIONARTIFACT$_Requirements_Report"
(default) | string
Name of generated requirements report, specified as a string.
The built-in tasks use tokens, like $ITERATIONARTIFACT$
, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Example: "$ITERATIONARTIFACT$_My_Requirements_Report"
Data Types: string
ReportPath
— Path to generated requirements report
fullfile('$DEFAULTOUTPUTDIR$', '$ITERATIONARTIFACT$',
'report')
(default) | string
Path to generated requirements report, specified as a string.
The built-in tasks use tokens, like $DEFAULTOUTPUTDIR$
, as
placeholders for dynamic path resolution during run-time. For more information, see
Dynamically Resolve Paths with Tokens.
Example: fullfile('$DEFAULTOUTPUTDIR$', '$ITERATIONARTIFACT$',
'RequirementsReport')
Data Types: string
ReportTitle
— Report title
""
(default) | string
Report title, specified as a string.
By default, when ReportTitle
is empty, the task sets the report
title as the name of the requirements set.
Example: "My Requirements Report"
Data Types: string
Authors
— Report authors
string.empty
(default) | string
Report authors, specified as a string.
Example: "My Name"
Data Types: string
OpenReport
— Open report automatically after generation
false
(0
) (default) | true
(1
)
Open report automatically after generation, specified as a numeric or logical
false
(0
) or true
(1
).
Example: true
Data Types: logical
IncludeTOC
— Include table of contents in generated report
true
(1
) (default) | false
(0
)
Include table of contents in generated report, specified as a numeric or logical
false
(0
) or true
(1
).
Example: false
Data Types: logical
IncludeLinks
— Include requirements links in generated report
true
(1
) (default) | false
(0
)
Include requirements links in generated report, specified as a numeric or logical
false
(0
) or true
(1
).
Example: false
Data Types: logical
IncludeRationale
— Include requirements rationale in generated report
true
(1
) (default) | false
(0
)
Include requirements rationale in generated report, specified as a numeric or
logical false
(0
) or true
(1
).
Example: false
Data Types: logical
IncludeCustomAttributes
— Include requirement set custom attributes in generated report
true
(1
) (default) | false
(0
)
Include requirement set custom attributes in generated report, specified as a
numeric or logical false
(0
) or
true
(1
).
Example: false
Data Types: logical
IncludeComments
— Include requirement comments in generated report
true
(1
) (default) | false
(0
)
Include requirement comments in generated report, specified as a numeric or logical
false
(0
) or true
(1
).
Example: false
Data Types: logical
IncludeImplementationStatus
— Include requirement implementation status data in generated report
true
(1
) (default) | false
(0
)
Include requirement implementation status data in generated report, specified as a
numeric or logical false
(0
) or
true
(1
).
Example: false
Data Types: logical
IncludeVerificationStatus
— Include requirement verification status data in generated report
true
(1
) (default) | false
(0
)
Include requirement verification status data in generated report, specified as a
numeric or logical false
(0
) or
true
(1
).
Example: false
Data Types: logical
IncludeKeywords
— Include keywords in generated report
true
(1
) (default) | false
(0
)
Include keywords in generated report, specified as a numeric or logical
false
(0
) or true
(1
).
Example: false
Data Types: logical
IncludeEmptySections
— Include empty sections in generated report
false
(0
) (default) | true
(1
)
Include empty sections in generated report, specified as a numeric or logical
false
(0
) or true
(1
).
Example: true
Data Types: logical
IncludeRevision
— Include requirement revision information in generated report
true
(1
) (default) | false
(0
)
Include requirement revision information in generated report, specified as a numeric
or logical false
(0
) or true
(1
).
Example: false
Data Types: logical
LoadArtifacts
— Load linked models, test cases, and test results
true
(1
) (default) | false
(0
)
Load linked models, test cases, and test results, specified as a numeric or logical
false
(0
) or true
(1
).
Example: false
Data Types: logical
Methods
Specialized Public Methods
This class overrides the following inherited methods.
run | Generate a requirements report by using Requirements Toolbox Note You do not need to manually invoke this method. When you run a task using
the Process
Advisor app or the
The function taskResult = run(obj, input) ... end |
dryRun |
Dry run the task to validate task inputs and generate
representative task outputs without actually running the task. The function taskResult = dryRun(obj, input) ... end |
launchToolAction | Open the Requirements Editor (Requirements Toolbox) app. Process Advisor uses this method when you open the tool associated with a task. |
Examples
Generate Requirements Report as Part of Process
Add a task that can generate a requirements report for the loaded requirement sets.
Open the process model for your project. If you do not have a process model, open the Process Advisor app to automatically create a process model.
In the process model file, add the GenerateRequirementsReport
task to
your process model by using the addTask
method.
reqReportTask = pm.addTask(padv.builtin.task.GenerateRequirementsReport);
You can reconfigure the task behavior by using the task properties. For example, you
can use the ReportFormat
property of the task object to change the
report format to a Microsoft Word
document.
reqReportTask.ReportFormat = "docx";
You can run the task by using the Process Advisor
app or the runprocess
function.
See Also
addTask
| padv.ProcessModel
| Process Advisor | Requirements
Editor (Requirements Toolbox) | runprocess
| slreq.generateReport
(Requirements Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)