Justin Crown - 'WHAT IS THIS MESS?' - Writing tests for pre-existing code bases - PyCon 2018

preview_player
Показать описание
Speaker: Justin Crown

Many of us practice test driven development, and pride ourselves in our code coverage. This is relatively easy to do when you begin a new project, but what happens when you take over an existing code base with little to no tests? Where and how do you start writing tests? This task can be very intimidating and frustrating, but can be accomplished!

This talk will run through some common approaches and methodologies for adding test coverage to pre-existing code (that you might not even be familiar with at all). The next time you take over an untested monolith, you will be able to do the right thing and start writing tests instead of hoping for the best!

Рекомендации по теме
Комментарии
Автор

This video literally showed me how to work with my legacy project. Awesome motivation and attitude!

Sousleek
Автор

One of the best talks I've ever seen. Thanks a lot!

tyrisnolam
Автор

Code repository can be found here:


There are two branches, "master" represents the completed codebase (including tests), and "start" represents the code base before any tests are introduced.

justincrown
Автор

Great talk! I wonder if hypothesis would be useful to start building tests for a legacy codebase, what would be sensible approaches to defining strategies (maybe do dynamic type analysis), and what the pitfalls to avoid would be.

sanbalestrini
Автор

Excellent talk on real world issues working with legacy code.

MrTigerstyle