Contenido principal

Simulation, Tests, and Coverage with Variants

R2026b
Simulate, test, and collect coverage for variant models using named variant configurations

After you define variant configurations for a model, you can systematically verify each configuration by simulating the model, running tests, and collecting coverage. Named configurations reduce the need to manually reconfigure variant choices between runs. To simulate, specify a variant configuration as input to the Simulink.SimulationInput object and use sim or parsim to run single or multiple simulations in parallel. To run tests, specify variant configurations for test cases or test iterations in Simulink® Test™ Manager. To measure testing completeness, use Simulink Coverage™ to collect coverage data during simulations or tests that use variant configurations.

To understand licensing requirements for Simulink Variant Manager™ workflows, see License Requirements for Simulink Variant Manager.

Apps

Variant ManagerManage, configure, and analyze system variants (Since R2026b)

Tools

Simulink Test ManagerTesting models and code in different execution environments, manage test suites, and analyze and report results

Functions

setVariantConfigurationSet variant configuration for simulation using SimulationInput object (Since R2024a)
getVariantConfigurationGet name of variant configuration from SimulationInput object (Since R2024a)

Topics