After you run a baseline test in the Test Manager, you can update the baseline. For example:
If you changed your model, you can use the new simulation output as the baseline. You can examine the failures that occurred because of the differences and update the baseline with part or all of the new output. See Examine Test Failure Signals and Update Baseline Test.
If your test plan changed and you expect different outputs, you can manually edit the time points. See Manually Update Signal Data in a Baseline.
Suppose that you run a test against a baseline and the result does not match the baseline, causing test failure. It is possible that the newer simulation better represents your desired test results or that some of the points of failure are your preferred results. You can examine the signal and failures in the data inspector view in Test Manager and decide whether you want to update the baseline or sections of the baseline.
Suppose that your model uses a new solver. When you run the test case, the results do not match, causing the test to fail.
Open the test file that contains the baseline test case you want to run.
Select the test case and run it.
If the test fails, in the Results and Artifacts pane, expand the Baseline Criteria. Select a signal that failed that you want to examine.
When you select the signal, the data inspector view opens. The top graph
is the baseline simulation signal overly. The bottom is the difference
between those signals and the tolerance. You can adjust tolerances in the
pane in the lower-left corner of the Test Manager. This example shows an
absolute tolerance of
To examine each failure, in the toolstrip, click Next Failure or Previous Failure. Each contiguous set of failed signal comparison points makes up one region. Data cursors show the bounds of each region.
You can update the baseline data to use newer simulation results using the Update Baseline menu.
To update the entire signal, select Update Baseline Signal.
To update only the data in the failure region, select Update Selected Signal Region.
To replace all the signal data in the baseline with the new data, select Update All Signals.
If your model changes such that you expect a different simulation output, you can update all or part of the baseline signal data. If the baseline is a MAT-file, you can edit the data in the signal editor. Microsoft® Excel® files open in Excel.
To update signal data in a MAT-file baseline:
Open the test file that contains the baseline you want to edit.
Select the test case.
Under Baseline Criteria, select the baseline whose signal data you want to edit. Click Edit.
The signal editor opens. In the Scenarios and Signals
pane, expand the
Select the check box next to the signal whose data you want to edit.
To see the time and data for points, display a data cursor and drag it along the signal.
Edit the signal data in the table, and then click Apply.
To update the baseline with the new expected output data, click Save.