Why are my temporal assessments returning "untested" while their component tests either pass or fail?

I am running a series of tests using Simulink Test R2021b and my trigger-based tests are consistently returning "untested". When I expand the Expression Tree, I can see that the issue is with the "until-condition" but the component parts of that statement are returning as expected (see image below). Why is the whole condition "untested" if it's parts are passing or failing?

 Accepted Answer

This behavior is caused by a mismatch between the simulation stop time (and therefore the test stop time) and the max-time of the until-condition of the test.
In the until-condition, "until (triggerSignal2 == 1) becomes true (within 10 seconds)", the "10 seconds" indicates that the assessment will be conducted for at most 10 seconds after the until-condition is triggered (triggerSignal2 ==1) becomes true. In the pictured results, this is not true until 8 seconds into simulation. For the assessment to completely test the condition, the test would need to run for 10 seconds after the 8 second trigger. Since the test stop time is set to 15 seconds, the entire assessment is not checked, thereby returning an “untested” result. 
To fix the issue, use any of the following methods:
  1. Extend the model simulation time
  2. Adjust the trigger signal to step earlier in the simulation
  3. Overwrite the stop time in the test manager with the following steps:
    1. In the Test Manager, select the Test Browser to view your tests 
    2. Select the test in which these assessments are failing to run 
    3. Expand the “System Under Test” menu and the “Simulation Settings and Release Overrides” menu 
    4. Check “Stop Time” and set it to long enough for the test to run

More Answers (0)

Products

Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!