Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
mock
stub
和服务虚拟化
141
VCR/Betamax
这些工具可以让你记录和重放应用程序的网络流量。当你无法访问外部服务(因此
只能观察接收的响应),或者当服务返回大量数据(来自某个外部“磁带式存储”),
或者在调用服务受到限制或者成本昂贵的时候,这些工具特别有用。
Hoverfly
这是一种新的服务虚拟化工具,可以提供
WireMock
VCR
以外的配置选项、模拟
遗留系统复杂的响应,以及支持许多服务相互依赖的微服务架构。你还可以在对第
三方服务压测的时候使用
Hoverfly
,例如在关键路径上依赖外部某个
SaaS
服务的测
试沙箱,出于性能考虑无法增加对它的测试压力。
Hoverfly
是用
Go
编写的,这意
味着它是轻量级和高性能的,在小型的
AWS EC2
节点上运行时,可以轻松达到每
秒数千个请求和响应。
服务虚拟化对许多
Java
开发人员来说并不常见,因此接下来我们会更多地介绍一下它的
使用和配置。
使用
Hoverfly
虚拟化服务
在本节中,你会了解到如何使用
Hoverfly API
仿真工具来虚拟化本地开发环境中的服务。
安装
Hoverfly
你可以通过
macOS
brew
包管理器来安装
Hoverfly
,也可以按照
Hoverfly
网站上的说
明(
http://bit.ly/2Q8dhVC
),下载
Windows
Linux
系统的安装包进行安装。
你还可以下载一个基于
Spring Boot
的航班服务
API
,我们将使用它来演示服务虚拟化。
使用
Hoverfly
捕获并模仿一个请求
首先,我们按照示例
8-3
所示,启用一个 ...
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

写给系统管理员的Python脚本编程指南

写给系统管理员的Python脚本编程指南

Posts & Telecom Press, Ganesh Sanjiv Naik
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
解密金融数据

解密金融数据

Justin Pauley
Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787121374425