Examine Test Failures and Modify Baselines
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.
Examine Test Failure Signals and Update Baseline Test
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 clicking Update Baseline .
To update the entire signal, select Replace One Signal in Baseline File from the dropdown.
To update only the data in the failure region, select Replace Signal Segment in Baseline File from the dropdown.
To replace all signal data in the baseline with the new data, select Use All Sim Output Signals as Baseline from the dropdown.
Manually Update Signal Data in a Baseline
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. If the baseline is a Microsoft® Excel® file, you can edit the data 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.
To update baseline signal data in an Excel file:
Open the Excel file that contains the baseline you want to edit.
Go to the sheet that contains the baseline. The sheet name corresponds to the baseline source name in the Test Manager Baseline Criteria section.
Edit the signal data in the sheet, and then save the Excel file.