Sanity test

Sanity test

Overview

Sanity test lets you use a few test cases to quickly pinpoint logic errors of a workflow version.

You can run a sanity test on a workflow version regardless of its deployment status. It’s a best practice to run sanity tests before running BacktestingBacktesting and ExperimentsExperiments .

Test data

When you enter the sanity test, the input features are already filled with zero values.

Sanity test of a loan application workflow
Sanity test of a loan application workflow

You can also mock data source responses:

  • For data sources using pre-built connectors, you can mock the mapped features (e.g. ca_searches.match_aml_types).
  • For data sources using HTTP connectors, you can mock the response body and status code (e.g. ca_searches_http.response.body and ca_searches_http.response.status_code ).
Sanity test with mocked data sources
Sanity test with mocked data sources

Test cases

You can create test cases to reuse test data later on. You can load a test case into the editor to make further updates.

image

Run sanity test

You can switch between workflow versions and also refresh the workflow versions to reuse the test data.

image

In the test results, you can see the decision, output features, and rule outputs of the workflow. Note that rules with a rollout percentage may not show up in rule outputs if they are not selected to be run.