Kevlin Henney — What we talk about when we talk about unit testing

preview_player
Показать описание
Ближайшая конференция — Heisenbug 2024 Autumn, 10 октября (Online), 17—18 октября (Санкт-Петербург + трансляция).
— Ближайшая конференция: Heisenbug 2023 Autumn — 10–11 октября (online), 15–16 октября (offline)
— — —
. . Developers seem to spend almost as much time debating what defines a "unit test" as they do define unit tests. The term "unit test" dates back to the 1960s, but has meant different things to different people from then until now. In the absence of a fixed definition, we should look for useful definitions: definitions that help us understand the code structure of the system, our relationship to the code, and the claims we can make about it.

The purpose and style of unit testing are just as often discussed, and ranges from treating it as an activity that developers should not do to one that is intimately tied to their other activities, from merely checking code to understanding and defining it, from something that should be left until late to one that is interleaved with the act of writing production code.

This talk will explore the unit-testing landscape, highlighting the role of unit tests, which makes for a good unit test, the lifecycle of unit tests, and the role of developers.
Рекомендации по теме
Комментарии
Автор

A great talk, and I'll certainly have to borrow some quotes such as the car brake one!

VerhoevenSimon
Автор

Hello, Mr. Henney! Thank you very much for this new (to me) perspective.

aMulliganStew
Автор

Always a pleasure to hear you talk about testing!

BoodskiBro
Автор

41:53 It is the "make Sonar STFU" kind of code coverage.

lucasterable
Автор

He is also wrong about 100% test coverage. Just few minutes ago he was talking about code that is not unit testable so this means some code shouldn't have a unit test or even integration test. You can find this kind of code in the GUI layer or code that is not exact - gives random results or code that needs visual evaluation like graphics...

tongobong
Автор

He and most of community is wrong about writing unit tests. Unit testing will change dramatically in the future. Those that complain writing unit tests slows them down are right. There is something fundamentally wrong with that like it was something fundamentally wrong with the waterfall model. You will see.

tongobong