A governance lead is explaining the difference between unit testing and integration testing as applied to a multi-component AI system in which a data-cleaning step feeds a feature-engineering step, which in turn feeds the trained model. Which statement correctly characterises what integration testing adds beyond unit testing in this setting?
- AIntegration testing checks that the components behave correctly when wired together, catching interface and data-handoff defects that unit tests on each component in isolation cannot surface. Correct
- BIntegration testing replaces unit testing by exercising the whole pipeline at once, so once integration tests pass the separate unit tests on each component become unnecessary.
- CIntegration testing measures the trained model's accuracy on a held-out test partition, which is the only assurance activity that examines more than one component together.
- DIntegration testing verifies that each function returns the right output for a fixed input, which is precisely the guarantee a unit test on the feature-engineering step already provides.
Why A is correct: Each component can pass its own unit test yet still mismatch on the data contract between steps, such as an unexpected column type or null handling, and integration testing is the level that exercises those handoffs end to end.
Why B is wrong: It is tempting to treat the broader test as a superset, but integration testing cannot localise a fault to a single component the way a unit test can, so the two are complementary rather than substitutes.
Why C is wrong: Measuring held-out accuracy is model validation, not integration testing, so this conflates two distinct activities even though both come later in the testing hierarchy.
Why D is wrong: Checking one function against a fixed input is the definition of a unit test, so this describes the wrong level and offers nothing beyond what unit testing already covers.