返回术语表
测试

Integration Testing

Testing that verifies different modules or services work correctly together, typically testing interactions between components rather than individual units.

定义

Integration tests validate that independently developed software modules work together as expected. They sit between unit tests (testing isolated code) and end-to-end tests (testing complete workflows). Common integration test types include: API integration tests, database integration tests, and service-to-service tests. They catch issues that unit tests miss, like incorrect data formats between systems.

为什么重要

Integration tests catch bugs that appear at component boundaries — the most common source of production issues. While slower than unit tests, they provide confidence that your system works as a whole. A balanced test pyramid includes a significant layer of integration tests.

示例

An integration test verifies that when the UserService creates a user, it correctly calls the EmailService to send a welcome email and stores the user in the database with proper relationships.

相关术语

integration testingwhat is integration testingintegration testsAPI testing

使用diffray自动化代码审查

多智能体AI代码审查系统。自动发现bug、安全漏洞和架构问题。