PM Articles > Alan S. Koch > Agile Testing - Technical Excellence, Part 4 of a Series

Agile Testing - Technical Excellence, Part 4 of a Series

by Alan S. Koch, PMP

Continuous attention to technical excellence and good design enhances agility.
– 9th of the 12 Agile Principles

This column is the fourth in a series.

Part 1 What Is Agile Testing?

Part 2 Agile Testing: No Mini-Waterfalls!

Part 3 Agile Testing - Pair Testing

Part 4 Agile Testing - Technical Excellence
In the previous installment of this series, we delved into Pair Testing and discussed an active collaboration of the developers in testing activities. In many organizations, the idea of developers spending significant time doing things other than designing and writing code seems ludicrous. Coders code and testers test. Not only does this division of activity make sense, but people expect that this division of responsibility will result in better quality software.

But will it?

The 9th of the 12 Agile Principles points us in a different direction. So let's do some exploring to understand the implications of "continuous attention to technical excellence."

They Understated Their Case

Excellence "enhances" Agility? Enhances?! That's like saying that breathing might be a good idea.

The founders of the Agile movement didn't get everything right. I believe they severely understated their case on Agile Principle #9. Excellence "enhances" Agility? Enhances?!?! That is like saying that breathing might be a good idea!

If I had been sitting at the table with Beck, Cockburn, Schwaber and the others as they were formulating the 12 Agile Principles at the Snowbird resort in Utah in February 2001, the statement about Technical Excellence would have been much stronger. How about "enables agility"? Or "underpins" it? Or "Continuous attention to technical excellence and good design is so absolutely indispensable to agility that you had better not even THINK you can be agile WITHOUT IT."

I don't think you can overstate the importance of Technical Excellence, especially if you want to be Agile.

Why Technical Excellence Is So Important

One of the defining features of agility is incremental development in which the software is written layer upon layer upon layer. You might say that an Agile team builds their software by accretion, much as a clam builds its shell. And as with a clamshell, the integrity of the later layers of software is totally dependent upon the soundness of the earlier ones.

A failure mode I have observed among teams that are trying to be Agile is when they try to write as much code as they can during each Sprint, but invest little or no effort in ensuring its excellence. In their early Sprints they may appear to be making good time. But as their technical debt grows, it slows their progress until they find themselves spending so much time fixing bugs and reworking their earlier mistakes that they have little time to write anything new.

Some teams fall into this mode because they mistakenly believe that their job is to write code, so they reason that the more code they write, the better. But the very first of the 12 Agile Principles makes clear the need to not just write code, but to write the right code. It says, "Our highest priority is to satisfy the customer through early and continuous delivery of valuable software." Yes, we must deliver software, but in order to satisfy the customer, that software must be "valuable"! Buggy code that doesn't do the right things isn't valuable to anyone.

Other teams fall into this failure mode because they have one or more testers among them. They reason that the tester's job is to ensure the quality of the code that the developers crank out. At first, the testers fall behind as the backlog of code waiting to be tested grows. But then the bug backlog begins to grow, and the developers find themselves falling behind as well. These Agile teams prove yet again what traditional development teams have been proving for decades:

"You can't test quality in; it must be built in."

How to Pay "Continuous Attention"

In successful Agile teams, the developers are focused on a lot more than merely writing code.

In successful Agile teams, the developers are focused on a lot more than merely writing code. Every activity they engage in has customer satisfaction as a central focus. Many of those activities are outwardly focused (on the customer and the business needs), but those are other topics for another day. In this article, we will discuss the activities that are inwardly focused (on the quality if the work the team is doing).

We will discuss how successful Agile teams pay "continuous attention to technical excellence" by addressing each of the technical activities they undertake; designing the valuable software they will deliver, coding it, and testing it.

Designing Technically Excellent Software

There is no Design Phase on an Agile project, but the 9th Agile Principle explicitly adds "and good design" to the concept of "technical excellence" to emphasize the importance of software design. The team as a whole and every developer on it must be actively engaged in designing software that will indeed satisfy the customer.

Every Sprint should begin with a full-team discussion of the high-level (or architectural) design of the product. In this team-wide collaboration, each member brings his or her experience and knowledge to bear to work out a technically excellent design. Of course, we don't expect an Agile team to write a traditional design specification, but they will want to capture their ideas and agreements in the form of diagrams and other notes.

In the early Sprints, this understanding of the structure of the product and the interfaces among its parts will evolve and grow. In later Sprints, the discussion may do little more than confirm that the stories that will be written in the Sprint will fit nicely into the existing structure, or require only modest structural tweaks.

But there will be times when the team discovers that early architectural decisions no longer serve the technical needs of the product. It is at these points when they must invest in technical excellence by spending the effort required to figure out a more appropriate high-level design, then deciding how and when to refactor the code that has already been tested and accepted.

This is a tipping point in the project. If they do not invest in refactoring, they will spend increasing amounts of effort coding around their design error, causing system complexity to grow, making mistakes that cause defects, and making testing more problematic. If they make the investment in refactoring, the short-term hit to progress pays huge dividends in longer-term productivity.

Coding Technically Excellent Software

Agile teams employ many different tactics to achieve technically excellent code. We will explore several of them here, but this is not an exhaustive list.

Pair Programming is defined as a practice in Extreme Programming, and has been adopted by many Agile teams. Having two programmers sit in front of one computer doing one programming task might seem wasteful, but these teams consider it an investment in technical excellence. They say that it pays dividends in the form of better detail-level designs that are easier to maintain and enhance, and better code that has fewer bugs to fix.

Refactoring at the component level is often appropriate when implementing a User Story requires changes to existing code. Extreme Programming encourages developers not to just force-fit changes to components, but to consider how the component might be restructured to make implementing the new User Story easier and result in less complexity. When Agile teams adopt this practice, their code base remains simpler and easier to build upon.

Some Agile teams adopt Coding Standards for themselves. These standards are usually aimed at making code more readable and maintainable, and avoiding complex implementations.

Peer Code Reviews are common on Agile teams. They often take the form of one individual reviewing another's code (as opposed to holding review meetings). Developers can often identify coding defects in each other's code that would be difficult to find or diagnose in testing. And when coupled with Coding Standards, peer reviews can be instrumental in keeping code maintainable.

Automated Unit Testing enables developers to do consistently better testing. First, automated scripts can be the subject of Peer Code Reviews or Pair Programming, and that collaboration increases the effectiveness of the tests. Second, with automated unit tests, it is easy for developers to do regular and continuous regression testing so they catch defects that would have escaped and caused problems later.

Test-Driven Development (also called "Test First") increases code quality by ensuring that developers focus on the need to verify the quality of everything they do. The rule that Extreme Programming defines is that before a developer writes a line of code he or she must ensure that a test exists to verify it. If not, he/she should stop and write the test, then continue coding.

Testing Technically Excellent Software

A number of the tactics listed above for coding technically excellent software involve testing. And indeed, testing is an activity that developers need to spend a lot of time doing. But developers' investment in testing does not end with unit testing. Every member of the Agile team (including the programmers) must be actively involved in testing throughout the project.

If "our highest priority is to satisfy the customer..." (the 1st Agile Principle), then it stands to reason that every member of the team should be actively involved in verifying that the software will do precisely that. That means that testers, developers, the Product Owner ... everyone on the team needs to engage in both functional and non-functional testing of the software before the team can declare "Done."

Every specialist (including tester, coder, database designer, UI designer, and any other specialist on the project) will address the testing task differently, and will do it with the issues that are obvious to his/her specialty in mind. Yes, a tester mindset and expertise in test design is valuable. (It may be appropriate for your tester to lead the team when User Stories are being tested.) But a tester testing alone will not ensure the technical excellence of the software. A whole-team approach to testing yields the best results.

For more on the value and approaches for collaborative testing, see the previous article in this series.

Continuous Attention to Technical Excellence

Continuous attention to technical excellence is indeed indispensable to the Agile approach. Without it, progress will eventually slow and the team will be anything but Agile. With it, every member of the Agile team contributes to the technical excellence of the product they build by engaging in excellence-enhancing activities.

And they stay focused on the whole point of the matter: Not technical excellence for its own sake, but because that is how we are able to satisfy our customer. And that is our highest priority.

Not all comments are posted. Posted comments are subject to editing for clarity and length.

The comments to this entry are closed.

©Copyright 2000-2017 Emprend, Inc. All Rights Reserved.
About us   Site Map   View current sponsorship opportunities (PDF)
Contact us for more information or e-mail
Terms of Service and Privacy Policy

Stay Connected
Get our latest content delivered to your inbox, every other week. New case studies, articles, templates, online courses, and more. Check out our Newsletter Archive for past issues. Sign Up Now

Got a Question?
Drop us an email or call us toll free:
7am-5pm Pacific
Monday - Friday
We'd love to talk to you.

Learn more about ProjectConnections and who writes our content. Want to learn more? Compare our membership levels.