Published Sep 3, 2019

SE-Radio Episode 283: Alexander Tarlinder on Developer Testing

Alexander Tarlinder delves into the nuances of developer testing, emphasizing specification-based testing, design by contract, and the importance of writing testable code. He discusses balancing test-driven development with practical approaches, while focusing on enhancing software quality through formalized testing responsibilities and methodologies.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Questions from this episode

Episode Highlights

  • TDD Philosophy

    Test Driven Development (TDD) is often seen as a magical solution for achieving code testability and quality, but argues that it's not the only path. He emphasizes that while TDD ensures controllability and observability by requiring tests to be written first, there are other ways to achieve these properties 1. However, TDD can be challenging when working with unfamiliar technologies or systems, as it requires visualizing both the implementation and its tests upfront 2. Alexander advocates for a pragmatic approach to TDD, suggesting that while tests should ideally be written first, flexibility is key to adapting to real-world scenarios 3.

    Writing your tests first will obviously ensure that you reach these goals. I mean, you need to, if you start with a test, you will obviously reach controllability and observability by definition.

    ---

    This pragmatic TDD approach allows for refactoring and adapting tests as understanding of the system evolves.

       

    Testing Roles

    The evolving roles of testers and developers are reshaping the landscape of software testing. and Alexander discuss how the shift towards developer testing is changing the traditional roles, with testers now focusing more on high-value testing rather than repetitive verification tasks 4. The hybrid model, where quality engineers and developers share responsibilities, is gaining traction, promoting a more integrated approach to product development 5. This shift requires testers to be proactive and technologically savvy, understanding the technology stack to effectively contribute to the team's success 6.

    Developer testing is a lot about freeing up testers' time because my experience is that testers are in teams where developers are not very good at testing or don't do any testing at all.

    ---

    This collaborative model enhances both the testing process and the overall quality of the product.

       

    Coverage Debate

    The debate over test coverage highlights its importance and limitations in software development. Alexander explains that while high test coverage is desirable, it doesn't guarantee code correctness; it merely indicates that code is testable and has been exercised 7. He suggests that aiming for a specific coverage number should be done with a clear understanding of its purpose, rather than arbitrarily setting targets 8. Felienne questions whether developers and testers should prioritize coverage, or focus on ensuring the system is well-tested through other means 9.

    Coverage tells you that your code is testable. You are able to write one routine that is able to test another routine. That's a good thing.

    ---

    Ultimately, the goal is to maintain a rising trend in coverage while ensuring it serves the broader objective of software quality.

Related Episodes