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.

  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.

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

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. Microsoft® Excel® files open 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.

    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.

Related Topics