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持续交付
验收测试
261
的行为、需要很长时间执行,并且失败概率较高,因此如果测试套件以端到端
为主,必然会导致测试覆盖率差、执行时间慢和效果不确定的结果。
验收测试
如我们之前所述,
验收测试
和端到端测试只是范围不同,验收测试不包括测试依赖的第
三方服务。例如,如果你开发了一个使用外部
Payments
服务的
Company Accounts
统,并且打算为其编写验收测试,那么你可以使用最新的
Company Accounts
代码和一
Payments
服务的
Stub
你可以像编写其他测试一样来编写验收测试,在测试前加入一些自动操作,以及在测试
后进行一些断言。但是,因为验收测试所处的位置不同,所以对待方式也略有不同。验
收测试是自动化测试的最高形式,测试过程中的一切都在你的完全控制之下,例如,你
可以创建和删除数据、启动或停止服务、检查服务的内部状态等。这意味着你可以在验
收测试中重新编写业务需求,直到非技术人员也可以轻松地检查测试结果。
行为驱动开发(
BDD
)正是采用了这个想法,几乎已经成为验收测试的代名词。在本节
的其余部分中,我们假设你会使用
BDD
来编写验收测试,因此会以此为基础介绍相关
的实践经验和主要工具。
行为驱动开发
行为驱动开发(
BDD
)是一种开发系统的技术,是比
TDD
更大的概念。它的核心思想是,
对于每个用例或者场景,你需要列出用户使用系统时感知的行为,然后将这些行为表示
为一系列的步骤,再将这些步骤转换为可执行的操作。随后,我们可以在系统上执行这
些操作,如果所有操作都成功,那么可以认为系统实现正确 ...
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, Yuxi (Hayden) Liu
Java性能优化实践:JVM调优策略、工具与技巧

Java性能优化实践:JVM调优策略、工具与技巧

Benjamin J. Evans, James Gough, Chris Newland
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787121374425