6

043: Refactoring Unit Tests during Test Driven Development - Sometime we delete...

 2 years ago
source link: https://www.youtube.com/watch?v=9NePBQTG2Fo
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

043: Refactoring Unit Tests during Test Driven Development - Sometime we delete Test (Golang)

This video was inspired by a Tweet (https://twitter.com/braddle/status/15...) responding to the PragmaticProgrammers question "What is the most overlooked piece of actionable advice about unit tests that everyone forgets to mention?"

"It ok to delete tests that cover the same behaviour."

Often when we think about refactoring tests we look at - improving the name of the tests or variables to ensure the intent is clear - Reducing duplicated code by moving things to SetUp functions

But we very rarely think about deleting test that cover duplicate behaviour. Often when we are test driving the implementation of a small unit of behaviour we create test that cover duplicate behaviour.

During this video we look at removing unit tests during the Bowling Game Kata in Golang that where later tests have duplicated the coverage of some behaviour as we extend our understanding of the expected behaviour.

The code produced during this episode can be found on GitHub: https://github.com/testingallthething...

You can follow me on twitter: https://twitter.com/braddle

** Please Rate, Review, Subscribe and Share these videos **

Show lessShow more


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK