Why does "Record coverage for system under test" alters the test results in "Simulink Test Manager" in MATLAB R2024b?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 19 Nov 2024 à 0:00
Réponse apportée : MathWorks Support Team
il y a environ 8 heures
For my model shown below, I have two test cases in my Test Suite. Both the test cases are identical except,
Test Case 1 has "Record coverage for system under test" option turned OFF under "Coverage Settings".
Test Case 2 has "Record coverage for system under test" option turned ON under "Coverage Settings".
When the tests are run,
Test Case 1 passes
Test Case 2 fails and the following error is observed in the report:
Division by zero in 'example/Divide'
Here's an example model, "example.slx":
Test harness:
Réponse acceptée
MathWorks Support Team
le 19 Nov 2024 à 0:00
If "Block Reduction" is ON and "Force Block Reduction Off" is enabled, block reduction becomes inactive when coverage is on. This alters the test results when "Record coverage for system under test" is enabled.
To have same results for both the test cases, disable "Force Block Reduction Off". This will pass both the test cases, and no error will be encountered.
Block Reduction reduces the number of blocks in the model that execute during simulation by collapsing groups of blocks into a single, more efficient block or eliminates unnecessary blocks from the execution list. If "Force Block Reduction Off" parameter is selected, the coverage analysis overrides the value of the Block reduction Simulink parameter.
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!