Session

Testing that the code does what the code does

When unit testing goes wrong, what can we do to make it right?

So many tests, doing so little. Every time you want to make a change, even just to refactor the code, there's loads of test failures! You hear yourself cry out "these tests are taking too long to fix". You're wading through treacle. Why is a test failing because a variable was renamed?!

Let's go back to basics. We'll discuss what unit tests are meant to achieve and develop Object-Oriented Design techniques to get out of this hole. We'll use these techniques to learn how to build maintainable tests that empower rather than hinder change. We'll focus on observable outcomes. We'll blur the lines with integration testing as we learn what a 'unit' is. Mocks, stubs, spies, fakes, doubles - we'll learn where they should and shouldn't be used.

You will take away from this thought-provoking session new perspectives on testing and design principles, learning how the two go hand-in-hand, rather than competing against each other.

This is both a testing and OOP-design-heavy talk.

Originally developed for and delivered at NE-RPC. See this in action at https://samhogy.co.uk/talks/testing-that-the-code-does-what-the-code-does.html

Sam Hogarth

Engineering Lead - Tesco Bank

Newcastle upon Tyne, United Kingdom

View Speaker Profile

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top