A Story of Testing

13 Sep 2022

Growing as a community and sharing valuable knowledge to spread best practices that help raise the level of the software industry is part of our mission as a company. Therefore, we invited Julio César Pérez Arques, Engineering Manager and Scrum Master, to lead a session from our meetup in which we sought to shed light on Testing and how to implement it effectively in a team. Through his experience, he told us the journey he made to transform a demotivated team with failed deliveries into one that provided real value to their customers and was proud of their work. 

Julio's story begins when he was working as the head of a development team in a consultancy. The team had a waterfall system, with very defined entry and exit phases and a hierarchical system in which each role was dedicated to a specific task. It soon became clear that this approach did not bring value to the team or to the customers, as this way of working resulted in untested deliverables that subsequently had multiple problems that needed to be corrected. In reality, the team was living in a constant cycle of pain: they would make failed deliveries, then resolve certain bugs and re-deliver, but then other bugs would appear that needed to be corrected again, and so on.As a result, the team was experiencing a lot of stress because they lacked confidence in their capabilities and were used to just "filling in the gaps". In return, customers lost confidence in their deliverables and were unhappy with the projects.

In this context, Julio proposed the beginning of a new path with 3 key points:

  • Being able to build a working software: one that functions and provides value.
  • Develop in an iterative and incremental way, with smaller steps and more feedback to provide real value to users.
  • Implement automated testing.

Julio was very clear that a cultural change was needed, it was essential to create an environment in which responsibility, collaboration and technical excellence were an intrinsic part of the team so that developers could feel proud of their code and their work. The path was long and, at times, there was resistance to change, but the key was the adoption of good technical practices that helped to transform processes and the team's mentality. 

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

In this transition process, automated testing was key to making software that worked and to implementing iterative and incremental development, as it was necessary to be able to test all deliverables quickly, easily and at low cost. Without testing or without enough testing, deliverables, even small releases, were going to have bugs or errors that would cause a return to the pain cycle.

According to Julio, the first step to implement automated tests was to learn how to design testable software, with high cohesion and low coupling, and in this line to know about clean code, solid and dependency injection. It was also necessary to have a clear understanding of the theory, knowing what a good test was and learning about mocking and testing frameworks.  

"A good design is also a testable design."
- Julio César Pérez Arques

Of course, as we mentioned earlier, the change was not easy and several problems arose along the way. Julio mentioned some of them and how to overcome them:

  • Resistance from team members. At first it is difficult to overcome this stage, but the benefits of using good practices quickly come to light, as the code that is generated works and is of higher quality. In turn, team stress is reduced and the sense of pride is strengthened.
  • The false belief that testing slows down the software development process. At this point, the manager explains that speed in software development is about really getting the software to work without bugs and that users can actually use it.
  • What to test with testing? You can't test 100%, you have to decide based on the confidence you will gain by testing versus the cost of testing.
  • Tests break down. You have to learn to make good tests and be aware of anti-patterns which are 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.

Julio talked briefly about Test Driven Development and mentioned that it should be clear that it is not a testing technique, it is a development 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. 

In conclusion, thanks to the change that was generated in the team, both in culture and in the use of technical best practices, they were able to start building working software with the following benefits: 

  • Early detection of errors
  • Confidence in the code, not 100%, but a significant increase.
  • Better software designs
  • Increased team productivity
  • Real code documentation
  • Iterative and incremental development

Ultimately, the team began to take pride in their work and their level of motivation increased, which also allowed them to bond with their clients and create a better working environment. 

We thank 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 review more content about technical practices and team management you can do it in our insights page.