How testing can transform more than just the code

20 Oct 2022

Transforming a demotivated team into a strong performer can be challenging, but worthwhile.

Julio César Pérez Arques, Engineering Manager at DocPlanner, shared his experiences at a recent Meetup, organised by Codurance, in Spain.

Julio took us through how he worked with a team beset by failed deliveries and low motivation, to provide value to their customers and learn to be proud of their work, again.

Julio’s story began when he was leading a development team, in a consultancy.

The team was using a waterfall approach, with very defined entry and exit phases, as well as a hierarchical system in which each role was dedicated to a specific task.

It quickly became apparent that this approach resulted in untested deliverables and, because they were untested, multiple issues started to emerge and need sorting.

With the team trapped in a constant cycle of firefighting; failed deliveries leading to having to clear bugs, leading to redelivering, followed by more bugs appearing. 

The team lacked confidence in their ability to create and became used to simply fill in the gaps.  Stress levels were rising, motivation was disappearing and the customer had lost faith in the consultancy’s product and were unhappy with the product.

Three simple steps to create change in development practices

So, Julio put forward a new way of delivering the client’s needs.

  1. Create functioning software: one that works and provides value.
  2. Develop in an iterative and incremental way, with smaller steps and more feedback to provide real value to users.
  3. Implement automated testing.

This may seem like a simple solution, but Julio was clear that a cultural change was needed and they needed to create an environment where responsibility, collaboration and technical excellence were intrinsically part of the team.  This would allow the developers to produce code that worked and that they could be proud of.

As with any cultural change, it took time to become embedded and there was some resistance, but as results started to show, it reinforced Julio’s stance that good technical practices do help transform processes and teams.

"I'm not a great programmer. I'm just a good programmer with great habits".

- Kent Beck

By never testing their code, the developers were, in practice, having to build in time, post delivery, to fix bugs that could have been found before the code was delivered to the client.

This was trapping the team in firefighting bugs rather than creating and testing better code.

Throughout this transition process, automated testing was fundamental to providing software that worked and to implementing iterative and incremental development.  All deliverables needed to be tested, automated testing allowed this to happen quickly, easily and kept costs low.

Julio explained that the first step in implementing automated testing was to learn how to design testable software that had high cohesion and low coupling. They needed to know about clean code, solid and dependency injection.  Added to this, was a good understanding of the theory; knowing what a good test looked like and learning about mocking and testing frameworks.

"A good design is also a testable design."

- Julio César Pérez Arques

Overcoming challenges to culture and practice

Change is never straightforward and Julio experienced several challenges along the way, however, he was able to overcome them.

  • Resistance from team members. This can be a great challenge, but in the end, it is the benefits of using good practice which will win people over.  As good code was produced, it generated less bugs, which reduced team stress and they started to regain a sense of pride in their work
  • Testing slows down software development.  This is a common false belief.  To overcome this, it was explained that speed in development is actually about getting software to work without bugs so that users can actually use it.
  • What to test with testing? It isn’t possible to test 100%, so decisions have to be made as to which areas you will test.  This is done by balancing the gain from testing versus the cost of the testing.
  • Test breakdown. Part of the learning process is to understand how to create good tests and to be aware of anti-patterns which create bad practices in testing

A good test is fast, reliable and should not depend on the status of external services. It should be easy to read and modify, and relevant, proving something meaningful and adding value.

Test Driven Development isn’t testing

Julio also briefly touched on Test Driven Development (TDD) and drew attention to the fact that it is development rather than a testing technique that includes designing, programming and testing.  

You are not going to design better, just by doing TDD, but you are going to have some clear moments in your workflow to think about design. 

Benefits of implementing; testing, clean code and TDD

  • Early detection of errors
  • Greater confidence in the code
  • Better software designs
  • Increased team productivity
  • Real code documentation
  • Iterative and incremental development

Yes, these changes brought about more robust code, but the added benefits were that the team was more motivated, had greater confidence in their work and able to bond better with their clients over the quality of their work.

Thanks to Julio Cesar for this session and his contribution to the community. Also to the collaboration of Murcia Software Crafters for participating as facilitators of the meeting. If you want to find out more on technical practices and team management then visit our Insights page.