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持续交付
282
11
功能性测试:正确和接受度
ID
。在这种情况下,使用
mock
不仅是为了方便,而且是必需的。
芝加哥学派与伦敦学派
尽管这些术语可能并不常见,但是这些方法的另一种表述是,使用芝加哥(或者
有时是底特律)学派来指代交互型单元测试,而使用伦敦学派指代独立型单元测试。
事实上,独立型(伦敦学派)单元测试在很大程度上依赖于使用
mock
框架,
Java
中许多流行的
mock
框架(例如,
Mockito
jMock
或者
WireMock
)在伦敦(
United
Kingdom
)都扎根很深。如果你对这些方法及其名称的历史感兴趣,请参考
Martin
Fowler
编写的
Mocks Arent Stubs
http://bit.ly/2kuR98s
),
Jason Gorman
编写
Classic TDD or
London School
”?等文章(
http://bit.ly/2OdRWwF
)。
处理不可预知的测试
随着外部依赖数量的增加,出错的可能性也会增加。有时会让大范围的测试变得无法预
知,没有任何明显导致失败的原因,也没有任何补救的恢复措施。而且影响的范围越大,
无法预知结果的可能性越大。这其实比听上去更危险,因为它会慢慢让开发人员不再认
真对待失败的测试,很快就会养成在调查失败原因之前,先重复运行几次测试的习惯,
从而推迟了问题的解决。
事实是,虽然使用的技术和遇到的问题不同,但是这类脆弱性问题的大多数都可以通过
正确的方式来解决。虽然这些内容足够再写一本书,但是我们可以在这里讨论一些常见
的方法。 ...
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