A Test of Strength

By Chris Oldwood

When it comes to writing tests we often live in the here-and-now and consequently end up producing "write-only" tests. This session looks at what we need to consider if we want to create tests that our future selves and teammates will find valuable instead of becoming another burden on top of delivering the feature itself.

If there is one place that we find it easy to take shortcuts it’s when writing tests. Whether we’re under the cosh or have an overly-optimistic view of our ability to write self-documenting code, instead of creating tests that support the production code and development process we can find ourselves producing WTFs (Weak Test Functions). The net effect is often a viscious cycle that disparages, instead of encourages us.

In the past I’ve tried many different ways to try and short-circuit the test writing process, but have only come up short every time. This session takes a look at why skimping on elements of the test structure, such as organisation, naming and scope only leads to pain and hardship in the long run. Along the way we’ll uncover the truth behind common folklore, such as only having one assertion per test.

(Sorry about the poor audio - a handheld mic was provided but wasnt used or went unnoticed by the speaker. We put measures in place to prevent this after this occurance.)





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.