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.

Component 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

Escaping the boilerplate trap: how AI is helping Nine Engineers focus on problem-solving

Every engineer at Nine knows the scenario: a beautiful design is handed over, and the next few days are spent on the repetitive, low-value work of translating that design into code. We write Application Programming Interface (API) specifications, set up server entry points, create configuration files, and build the initial UI skeleton - all before solving the first real business problem.

From ‘vibe coding’ to rigorous design: our journey with AI

At Nine, we're not just reporting the news; we're building the future of digital experience. When powerful generative AI tools first emerged, the excitement was electric. Like many tech teams, we dove straight in. Everyone was experimenting - designers generating wild concepts, engineers spinning up boilerplate code in seconds.

Where AI meets engineering excellence: what we’re learning at Nine

After two years of using AI coding assistants, Nine has learned that these tools amplify existing engineering practices. Teams with strong release processes, automated testing and collaborative code review extract maximum value from AI, while outlier teams require targeted interventions.