integration test(集成测试):软件测试的一种方法,把多个模块/组件(如数据库、API、服务、UI 等)组合在一起运行,验证它们之间的接口与协作是否正常。常用于发现单元测试难以覆盖的“组件之间”的问题。(在不同语境中也可泛指“整合性测试”。)
/ˌɪntɪˈɡreɪʃən tɛst/
We run an integration test after every build.
每次构建之后我们都会运行一次集成测试。
The integration test failed because the payment service couldn’t connect to the database, even though each module passed its unit tests.
集成测试失败了,因为支付服务无法连接数据库,尽管每个模块的单元测试都通过了。
integration 来自拉丁语 integrare,意为“使完整、整合”;test 源自拉丁语 testum/testa(与“检验、试验”相关的词源演变)。合起来的 integration test 在软件工程语境中指“把各部分整合后进行的检验”,强调“组件之间的配合是否可靠”。