Main Content

Examine Test Failures and Modify Baselines

After you run a baseline test in the Test Manager, you can update the baseline. For example:

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.

  1. Open the test file that contains the baseline test case you want to run.

  2. Select the test case and run it.

  3. 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 .2.

    Failing test results hierarchy and plotted signals with tolerance limits.

  4. 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.

    Plotted signals with comparison values.

  5. 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:

  1. Open the test file that contains the baseline you want to edit.

  2. Select the test case.

  3. Under Baseline Criteria, select the baseline whose signal data you want to edit. Click Edit.

  4. The Signal Editor opens. In the Scenarios and Signals pane, expand the data node.

  5. Select the check box next to the signal whose data you want to edit.

    Baseline plot and corresponding data points.

    Tip

    To see the time and data for points, display a data cursor and drag it along the signal.

  6. Edit the signal data in the table, and then click Apply.

  7. To update the baseline with the new expected output data, click Save.

To update baseline signal data in an Excel file:

  1. Open the Excel file that contains the baseline you want to edit.

  2. Go to the sheet that contains the baseline. The sheet name corresponds to the baseline source name in the Test Manager Baseline Criteria section.

  3. Edit the signal data in the sheet, and then save the Excel file.

Related Topics