Skip to Content
Google系统架构解密: 构建安全可靠的系统
book

Google系统架构解密: 构建安全可靠的系统

by Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield
September 2021
Beginner to intermediate
392 pages
12h 13m
Chinese
Posts & Telecom Press
Content preview from Google系统架构解密: 构建安全可靠的系统
194
13
数据库或网络服务等。因此,集成测试能覆盖更完整的代码路径。由于必须初始化和配置
这些其他依赖项,集成测试可能会比单元测试更慢、更脆弱。要执行测试,此方法将真实
的变量(如网络延迟)与服务间端到端通信相结合。当测试对象从独立底层代码单元切换
到各单元组合后的交互方式时,最终结果更能使我们确信系统运行符合预期。
由于要处理的依赖项复杂性不同,集成测试的形式也不同。当所需的依赖关系相对简单
时,集成测试可能看起来像基类,并建立了一些共享的依赖关系(如处于预配置状态的数
据库),其他测试也可基于此扩展。集成测试的复杂度可能会随服务复杂性增强,需要监
督系统来协调支持测试依赖项的初始化或配置。
Google
内部有团队专门负责基础架构建
设,为常见的基础架构服务启用标准化的集成测试设置。对于使用持续构建和交付系统
(如
Jenkins
)的组织来说
,集成测试可以与单元测试一起或分开单独运行,具体情况视代
码库规模和项目中可用测试用例数而定。
在构建集成测试时,请牢记第
5
章中讨论的原则:确保测试需要的数据和系
统不会带来安全风险。数据库提供了一系列丰富的真实业务数据,因此很可
能将实际的数据库镜像复制到测试环境中。但应避免使用这种不当的模式,
任何人执行使用这些数据库的测试用例时,都可接触其中可能包含的敏感数
据。这样的实现方式违背了最小特权原则,并可能带来安全风险。相反,可
使用不敏感的测试数据作为系统的种子(
seed
)。使用这种方法后,还能轻松
地将测试环境清空至已知的干净状态,进而降低集成测试的脆弱性。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
Python机器学习基础教程

Python机器学习基础教程

Andreas C. Müller, Sarah Guido
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115569257