Run a test case and inspect differences

Run a configured test case in AnalyticsCreator, compare the actual output with the expected data, and inspect the details of any differences.

Applicability

Use this guide when a test case already contains input data, expected data and an execution script prepared for your test environment.

The example uses IMP.Categories as input and STAR.DIM_Categories as the expected output table. Use the tables configured in your own test case.

Prerequisites

  • A Data Warehouse (DWH) project connected to a dedicated test environment whose data can be replaced.
  • A configured test case with reviewed input data, expected data and a test script ready to execute.
  • A clear expectation of the rows and values the processing should produce.

Use a dedicated test environment. Test execution can delete data. Review Delete all data before start, Delete all data after finish and the generated script before running a test. Do not run a cleanup-enabled test against data you need to retain.

Steps

  1. Open the test case

    Expand Test cases in the navigation tree and open the configured test you want to run. Its Input data, Expected data and Logs entries provide access to the test's data and run records.

  2. Review the input data

    Under Input data, open the table definition used by the test. Review its Definition or Tabular definition, then click Preview to inspect the sample rows.

    For the Categories example, the preview contains five rows with CategoryID values 1–5. Check the values your own test needs; five rows are an example, not a required size.

  3. Review the expected output

    Under Expected data, open the target table definition. Check that its expected rows and values describe the intended result of processing the input.

    In the example, the input belongs to IMP.Categories and the expected result belongs to STAR.DIM_Categories. The input and expected definitions serve different purposes: one supplies the test data; the other describes the result to compare against.

  4. Review the script and run the test

    In the Test cases tree, open the test itself to return to its editor. Review Test script together with the two data-deletion options. Confirm that the script is prepared for the intended test environment, then click Run test.

    The editor also contains Create in DWH, Update script and Save. A saved definition or a selected Compiled indicator does not establish that a test has passed.

  5. Inspect comparison differences

    Review the result for the target table. When a comparison result tab is present, use Comparison Status and the displayed columns to identify the rows or values that need investigation.

    The Categories demonstration shows Actual only for a row with SATZ_ID = 0. Investigate why that row exists and whether it belongs in the intended result before changing the expected data.

    Other demonstrated comparison rows use Mismatch / Expected and Mismatch / Actual. Review both sides of a difference rather than treating a selected row or checkbox as a success indicator.

  6. Inspect the run log

    Expand the test's Logs entry and open the log for the run you are reviewing. Inspect Status and the available error or table-result details.

    If a difference is unexpected, review the input, the expected result and the processing logic to locate its cause. After the correction has been incorporated into the prepared test, run it again and inspect the new result.

Expected Results

You have run the selected test and inspected its outcome. You can identify reported comparison differences and review the associated log instead of relying on the test's saved or compiled state.

A difference calls for investigation. Change expected data only when the intended result justifies the change.

Run selected tests

To work with the test list, right-click Test cases and select List/Run tests. Select the required rows using the Run column, then click Run tests. A checked Run box selects a test for execution; it is not a pass indicator.