v2.4.0 | Report Errata
docs development docs development

Each data transformation step in the pipeline requires unit tests that go beyond verifying correct output for a handful of known inputs. Data pipeline tests must validate that the transformation produces the expected output for normal inputs, that edge cases (null values, empty strings, extreme values, malformed records) are handled correctly, that the transformation preserves data types and schemas, and that the transformation’s effect on data distributions is within expected bounds.

Property-based testing with Hypothesis is particularly valuable for data pipelines. The developer defines properties that should hold for any valid input, such as “the output of the normalisation step should have mean approximately 0 and standard deviation approximately 1 for any input distribution.” Hypothesis generates hundreds of random inputs to test the property, catching edge cases that hand-written tests miss: empty datasets, single-row datasets, datasets with all null values, datasets with extreme values.

Great Expectations complements Hypothesis by validating schema contracts and distribution expectations against actual data. Together, these tools provide comprehensive coverage across the spectrum from structural correctness (schema, types) to statistical correctness (distributions, ranges). The test results are retained as Module 5 evidence and referenced in the AISDP’s test strategy documentation.

Key outputs

  • Unit tests covering normal, boundary, and pathological inputs per transformation step
  • Property-based tests (Hypothesis) for distribution-level properties
  • Schema and distribution validation (Great Expectations)
  • Module 5 and Module 2 AISDP evidence
On This Page