Skip to main content

Add a Test Suite

Test Suites are logical containers that group related test cases from different tables, letting you set a single alert for test case failures. In the UI, this kind of test suite is called a Bundle Suite. Before you begin, make sure you have permission to create a test suite in OpenMetadata.
  1. In the left navigation bar, select Observability > Data Quality. Access data quality
  2. Click the Test Suites tab. Test Suites tab
  3. Click Add a Bundle Suite. Click Add a Bundle Suite
  4. Fill in the following details:
    • Enter a unique descriptive Name.
    • Optional: Enter a Description.
    • Search and select the test cases. In OpenMetadata 2.0.3 and later, Select All adds only the test cases matching the active filters.
    Test Suite details
  5. Click Create.
After creating a suite, use the search field in its details view to find a test case. Test cases are identified by their fully qualified names, which include the table or column they test. The same short test-case name can appear under different entities.

Data Quality

Adding Data Quality Test Cases from yaml config

When creating a JSON config for a test workflow the source configuration is very simple.
The only sections you need to modify here are the serviceName (this name needs to be unique) and entityFullyQualifiedName (the entity for which we’ll be executing tests against) keys. Once you have defined your source configuration you’ll need to define te processor configuration.
The processor type should be set to "orm-test-runner". For accepted test definition names and parameter value names refer to the tests page.
Note that while you can define tests directly in this YAML configuration, running the workflow will execute ALL THE TESTS present in the table, regardless of what you are defining in the YAML.This makes it easy for any user to contribute tests via the UI, while maintaining the test execution external.
You can keep your YAML config as simple as follows if the table already has tests.

Key reference:

  • forceUpdate: if the test case exists (base on the test case name) for the entity, implements the strategy to follow when running the test (i.e. whether or not to update parameters)
  • testCases: list of test cases to add to the entity referenced. Note that we will execute all the tests present in the Table.
  • name: test case name
  • testDefinitionName: test definition
  • columnName: only applies to column test. The name of the column to run the test against
  • parameterValues: parameter values of the test
The sink and workflowConfig will have the same settings as the ingestion and profiler workflow.

Full yaml config example

How to Run Tests

To run the tests from the CLI execute the following command