创建 企业范围的集成测试环境 是一种常见且浪费的做法,会拖慢整个开发流程。这些环境往往成为难以复制的珍贵资源,成为开发的瓶颈。由于不同环境之间不可避免的数据和配置开销差异,它们还会提供一种虚假的安全感。讽刺的是,常见的对替代方案(如临时环境或多个本地测试环境)的反对意见是成本问题。然而,这种观点未能考虑到企业级集成测试环境所造成的延迟成本,因为开发团队往往需要等待其他团队完成任务或等待依赖系统的新版本部署。相反,团队应使用临时环境,最好是开发团队拥有的一系列测试,这些测试可以快速创建和销毁,使用替身(fake stubs)而不是实际的副本。关于支持这种替代方案的其他技术,可以查看 契约测试、将部署和发布解耦、关注平均恢复时间 和在生产环境测试。
When the enterprise-wide quarterly or monthly releases were considered best practice, it was necessary to maintain a complete environment for performing testing cycles prior to deployment to production. These enterprise-wide integration test environments (often referred to as SIT or Staging) are a common bottleneck for continuous delivery today. The environments themselves are fragile and expensive to maintain, often with components that need manual configuration by a separate environment management team. Testing in the staging environment provides unreliable and slow feedback, and testing effort is duplicated with what can be performed on components in isolation. We recommend that organizations incrementally create an independent path to production for key components. Important techniques include contract testing, decoupling deployment from release, focus on mean time to recovery and testing in production.
When the enterprise-wide quarterly or monthly releases were considered best practice, it was necessary to maintain a complete environment for performing testing cycles prior to deployment to production. These enterprise-wide integration test environments (often referred to as SIT or Staging) are a common bottleneck for continuous delivery today. The environments themselves are fragile and expensive to maintain, often with components that need manual configuration by a separate environment management team. Testing in the staging environment provides unreliable and slow feedback, and testing effort is duplicated with what can be performed on components in isolation. We recommend that organizations incrementally create an independent path to production for key components. Important techniques include contract testing, decoupling deployment from release, focus on mean time to recovery and testing in production.