padv.builtin.task.RunTestsPerTestCase Class
Namespace: padv.builtin.task
Superclasses: padv.Task
Task for running each test case using Simulink Test
Description
The padv.builtin.task.RunTestsPerTestCase
class provides a task that can
run each test case using Simulink®
Test™.
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
. The task runs each test case individually and certain tests
can generate code. You can control whether Simulink
Test or the MATLAB® Unit Test framework executes the test cases by using the task property
UseMATLABUnitTest
.
The Process Advisor app shows the names of both the test cases and the
associated models under Run Tests in the Tasks
column. If you only want to see the model names, use the
padv.builtin.task.RunTestsPerModel
task
instead.
To generate a consolidated test results report and a merged coverage report for your
model, you can use the built-in task
padv.builtin.task.MergeTestResults
.
To view the source code for this built-in task, in the MATLAB Command Window, enter:
open padv.builtin.task.RunTestsPerTestCase
The padv.builtin.task.RunTestsPerTestCase
class is a handle
class.
Note
Since this task runs each test case individually, the task only executes test-case level callbacks. The task does not execute test-file level callbacks or test-suite level callbacks.
Creation
Description
creates a task for running test cases using Simulink
Test.task
= padv.builtin.task.RunTestsPerTestCase()
sets certain properties using one or more name-value arguments. For example, task
= padv.builtin.task.RunTestsPerTestCase(Name=Value
)task
= padv.builtin.task.RunTestsPerTestCase(Name = "MyRunTestsTask")
creates a
task with the specified name.
You can use this syntax to set property values for Name
,
InputQueries
, IterationQuery
,
InputDependencyQuery
, Licenses
,
LaunchToolAction
, and LaunchToolText
.
The padv.builtin.task.RunTestsPerTestCase
class also has other properties, but you cannot set
those properties during task creation.