Component Testing and Test Driven Development with Jack Donaldson
Meet Jack Donaldson, one of our Software Engineers at Nine. Jack shares some insights on testing.
Cheaper than user interface functional & End to End tests, Component Testing throws away mocked data and performs real operations on our services. Component testing focuses on closely related classes, combining them together to test as one group. Whether it checks if queries are functioning appropriately or whether events are correctly processed, the component testing framework is fundamental to our testing pyramid.
At Nine tech, once we had the framework established for component testing, we retroactively applied the component testing framework to our much-beloved services.
However, retroactively adding Component Tests to our repositories is easier said than done.
1. For starters, the fact that we decided to begin with our most critical service has meant that we have had to be more careful in our approach.
2. Whilst the services would receive the biggest benefit from this form of testing, its size, age and the variety of teams actively contributing have proved to be an interesting challenge.
3. We often observed that we had a huge opportunity to improve the testability of our services. This meant that some cases were not possible to test without altering the code itself. For example, if a function inserting a record with a date field automatically sets it to Now(), we can’t retroactively test that the field’s value is set properly because we can’t easily work out what time the insertion operation was run.
Test Driven Development
However, if Test Driven Development practices are followed (that is, test cases written up prior to feature development), it enables a developer to pick up this issue much earlier on as part of the development and fix the inaccuracies accordingly, allowing us to much more easily and comprehensively test the service.
Whilst Test-Driven Development (TDD) may seem like yet another long scary acronym, it is a valuable practice that our tech teams are adopting, emphasising our team members’ focus on thinking about QUALITY FIRST and making it easier than ever to catch bugs EARLY!
Read our Content
Q&A with Maddy Callender: Senior Producer – Wide World of Sports
A unique Nine story, working on the National Rugby League, championing the Beanie for Brain Cancer round with the Mark Hughes Foundation and many other magic moments with the WWOS team.
Q&A with Gabi Richardson: Content Partnerships Executive – Sport / Powered
Gabi works with the program production teams (e.g. WWOS) and the sales teams to find commercial opportunities that compliment our sports coverage. She is responsible for implementing in-program integration within our tennis broadcast.
Q&A with Scott Spits, The Age Reporter
Scott is a sports reporter and producer with many years of experience, involving a range of tasks including liaising with other reporters, quality control and presentation of our journalism.
Guide to Interviewing at Nine
While interviews can be incredibly nerve-wracking, this is the occasion to show what your resume does not. It is...
End the war with flaky tests with Gunjan Arora
Meet Gunjan Arora, our Principal Quality Engineer at Nine. She shares her tips on beating flaky tests.
Make Your Resume Stand Out at Nine
It's essential to make your resume stand out from the rest. Here are some key strategies to help you achieve just that.