Integration Test

What is an integration test?

An integration test is an automated test that verifies multiple pieces of code work together properly as a combined system. After engineers unit test individual components to ensure each works correctly in isolation, integration tests validate that these components function correctly when integrated with each other.

In AI product development, integration tests serve a similar role: they validate that different AI components—such as multiple LLM calls, workflows, or tools—work together as expected to accomplish larger tasks.

How do integration tests differ from unit tests?

Unit tests focus on individual functions or components, testing the logic of each piece in isolation. A single component might have a dozen unit tests thoroughly validating that the code works as expected.

Integration tests operate at a higher level, testing how these individually-validated pieces work together. While a unit test might verify that a single LLM call returns valid JSON, an integration test would verify that downstream components can successfully parse and use that JSON output in a multi-step workflow.

Why do integration tests matter for AI products?

Integration tests run in CI/CD pipelines before teams push code to production, providing confidence that products work as expected. For AI products, this becomes particularly important because AI systems often involve multiple components working in sequence: retrieving context, making LLM calls, parsing outputs, and triggering subsequent actions.

In the AI context, evals function analogously to integration tests—they give teams confidence that AI applications are doing what they expect, just as integration tests do for traditional deterministic code.

Learn more:

Related terms:

← Back to Ai Glossary