- Mockito Essentials
- Sujoy Acharya
- 152字
- 2021-08-05 17:41:21
Chapter 1. Exploring Test Doubles
"I never make stupid mistakes. Only very, very clever ones."
–John Peel
It is very difficult to find stupid mistakes, but it's even more daunting when you are trying to figure out the clever ones. Debugging an application to know how to fix a problem is very expensive and time-consuming. Automated unit tests provide an extremely effective mechanism for catching regressions, especially when combined with test-driven development; it creates a test safety net for the developers.
This chapter covers the concepts of unit testing, quality of unit tests, external dependencies, and test doubles.
The Working with unit tests section introduces you to test automation and describes the characteristics of a good unit test.
The Understanding test doubles section explores the concept of external dependency and provides examples of test doubles. The following test doubles are explored:
- Dummy objects
- Stubs
- Spies
- Mock objects
- Fake objects
- R語言游戲數(shù)據(jù)分析與挖掘
- 我的第一本算法書
- 云原生Spring實(shí)戰(zhàn)
- Web全棧工程師的自我修養(yǎng)
- 單片機(jī)應(yīng)用技術(shù)
- Android開發(fā):從0到1 (清華開發(fā)者書庫)
- Mastering Business Intelligence with MicroStrategy
- SSM開發(fā)實(shí)戰(zhàn)教程(Spring+Spring MVC+MyBatis)
- 精通MySQL 8(視頻教學(xué)版)
- Learning JavaScript Data Structures and Algorithms(Second Edition)
- Greenplum構(gòu)建實(shí)時(shí)數(shù)據(jù)倉庫實(shí)踐
- Visual C#(學(xué)習(xí)筆記)
- INSTANT EaselJS Starter
- 分布式系統(tǒng)架構(gòu)與開發(fā):技術(shù)原理與面試題解析
- 青少年編程魔法課堂:Python圖形化創(chuàng)意編程