Agile Axiom #5 – Understanding and ahdering to iteration acceptance critieria is critical to the overall quality of a release.

July 13, 2008

One of the key benefits of Agile is the reduction in the difference between the level of quality for which we strive and the level of quality we actually achieve. Realizing this benefit requires careful attention to iteration acceptance criteria. Driven by the fact that most Agile methods rely on “inside the iteration” testing as their primary test cycle, the impact of ambiguous or not followed acceptance criteria can have a devastating impact on the quality of a release. Over the past several years, there has been much discussion around what it means to be “releasable” at the end of an iteration. Often, teams will set fairly ambiguous acceptance criteria for marking a story or requirement as complete. The level of discipline here is directly related to the level of quality of a final release. So what is good acceptance criteria? “Good” acceptance criteria needs to meet the following in order to be effective in ensuring a given story or requirement is ready for its consumers.

  1. Can the user or system consumer of a story or requirement complete the task for which the story is to enable? In other words, does it work? This is fairly binary criteria. If the user or consumer can complete the action, then this one is passed. One should keep in mind that if the result of a given story or requirement cannot be measured with this binary view, the story itself may need revision. “Testability” is one of the key characteristics of a “good” requirement.
  2. Are the scalability aspects of the story defined and met? This point is likely the most critical and least understood. An example of a scalability aspect of a requirement might be the number of objects a given UI needs to be able to manipulate. Scalability is often a separate consideration than “inside the iteration” testing usually provides. One could argue whether or not it should be (a good topic for another post). However, regardless of how the overall scalability of a release is managed and tested, it is critical that the scalability needs are considered at design and construction time, within the iteration. Therefore, the acceptance criteria needs to include the scale levels for which a given story must operate. Without an understanding of the scalability requirements of a given story, there is significant risk of needing to rework code after the end of an iteration.
  3. Are the non-functional requirements for a given story met? Other non-functional requirements include but are not limited to platform support (operating systems etc.), foreign language support, coexistence requirements, compatibility and interaction with third-party software, etc. Understanding how each of these impact a given story and to what level they need to be tested within an iteration will improve the overall quality of the release.
  4. Does the story meet the overall quality objectives of a release? This is more of a general criteria but must be examined. It is possible to be build the code to support a story that passes the criteria above but still causes the product quality to be poor. Lets take a simple example. If there is a story that says “Create a file selection dialog which allows a user to select which files to open for editing”. It could be the dialog exists, works with lots of files, and meets the defined non-functional requirements but does not function properly when the user presses the cancel button. Maybe the user sees a stack trace when pressing cancel. This case may not be captured as a specific acceptance criterion. However, it will likely need to be addressed (or should be). I would suggest there is an ambiguous criterion which requires that products must be at a “reasonable” level of quality beyond the defined acceptance criteria. This notion does not imply a level of quality less than the traditional criteria states, it implies the quality criteria will likely not cover all of the cases which should be tested. Agile helps with this situation as the product is being tested as it is being coded and these issues will be addressed within an iteration before the code is committed or causes other problems. In waterfall methods, these issues would be found much later in the process and would certainly be much more costly to address. In either case, success with this ambiguous level of quality requires a team that establishes a high threshold for quality and simply refuses to deliver code which does not meet the basic quality objectives of a given release.

When teams transition to Agile, the lack of a full testing cycle at the end of the release creates a substantial risk to the overall quality of a release unless the stories and features are tested at the end of the iteration. This is done through the proper defining and testing of acceptance criteria for the stories and requirements that are marked complete for a given iteration. Additionally, stories and features should be at a level of quality which meet the objectives for a given release. For highly successful Agile teams looking to evolve into test driven development, the need and ability to define of detailed acceptance criteria “the tests” is a prerequisite.

Advertisements

Agile Axiom #4 – To be successful with Agile, failure is more than an option, its necessary.

April 8, 2008

I am sure most of you have heard the movie quote “Failure is not an option”. You may have even used it as a motivational technique. With Agile development, I would suggest this statement be modified. It works best like this “Failure from time to time is expected – trying, assessing, and adjusting are not optional“.

Most Agile methodologies call for some type of ongoing assessment of the development process. The assessment is intended to produce explicit process changes that are applied to the next iteration or release. Many Agile teams struggle with this in the beginning – particularly when their roots lie in a traditional waterfall management structure. However, it is one of the most important concepts with “Agile”. It is critical that teams be allowed to fail in the process, bring creative ideas to address problems, and determine how improvements are made. There are two primary reasons for this.

  • The individuals actually working the process are likely to have the best sense of where the problems are and how to address them.
  • People who have influence over how they work are typically more satisfied than those who have a process forced upon them and will demonstrate more passion. This results in an improvement in quality and productivity.

On one of my first Agile projects, the team was struggling with the acceptance rate of their stories at the end of each iteration. For us traditional managers this was of significant concern. It seemed that no matter what we told the team to do, things would not get better. The management team tried measuring the work completed and determine where things were breaking down. This resulted in great debate over the metrics – thats about it.

We even would drive the retrospectives from the management level. If you want to call them retrospectives – these meetings were more like managers listing out what the scrum teams needed to change. Somewhere along the way, we shifted our thinking (with a little influence from Agile thought leaders) to a mindset that allowed us to emphasize the importance of completing and accepting the stories to the teams and then empower them to make adjustments. As managers, we needed to back off and let the teams work the Agile process. The only management directive was that the retrospectives will occur.

Slowly the teams started to increase their story acceptance rate. Each iteration they would make small adjustments to the process. Some would change their iteration plan to accurately reflect the velocity they were able to contribute. Some improved their testing processes to have the Quality Assurance engineer working side by side with developers. The average acceptance rate improved by over 25%.

The challenge with empowering teams to this level is to find the right amount of influence each independent team has on their processes. For example, if there are five teams contributing to a major release of a single product, it would not make sense to allow each team to define its own iteration length. Its important that managers develop a “feel” for how much to control. Managers will likely find themselves in a similar try, assess, and adjust cycle for the how much control they exert over the teams.

My belief is most managers error on the “heavy management” side in the beginning. It is not until they truly understand what is meant by “People over Process” that they begin to see productivity gains on a large level.


Agile Axiom #3 – An automated build system is critical to the success of most Agile software projects.

March 30, 2008

Recently, I was having a discussion about automated build systems with a colleague. Primarily, we were talking about how important they are for Agile projects. As most of us have, I have witnessed varying levels of usage when it comes to automated build processes.

Looking at the software projects I have been involved with one message is clear…. the better and more frequent run the automated build system the higher the quality in the delivered product. Additionally, the risk is a signficantly lower as well.

In this discussion, I will not get into the specifics of a particular automated build system. I will focus on the reasons to have one.

An automated build system, gives the team a consistent daily goal – complete the work you agreed to do in your daily stand-up, get it unit tested with the testers by your side, commit the code, and make sure it does not break the team’s daily build. Perhaps, this does not need to happen every single day, but certainly many times per iteration.

Each engineer typically works on their parts of the product independently. This is almost always done in their own version of the checked out code. Since each engineer does not test the entire product every day. There is a certain amount of work that must be done when integrating the code. The smaller the amount of code to integrate into the main source tree, the easier it is. Its kind of like when you write a few hundred lines of code without compiling and you are presented with thousands of errors with the first compile. Just as compiling more frequently helps developers pinpoint problems faster, building the entire product helps the teams solve problems faster.

One of the most risky and painful parts of a waterfall project is that time when the code is all written, management has been told the code is 90% done (been that way for weeks), the only thing left to do is pull the pieces together and get the product into QA. However, when all of the individual code pieces are integrated together, a severe problem requiring weeks of refactoring is discovered. At this point, both the date and quality have been compromised. It is very difficult to achieve the true benefits of Agile if this same challenge occurs. Code integration must be frequent.

Recently, I heard of a situation where one of the teams was “accepting/completing” stories that were build on developer machines. The problem with this is the code that is “accepted” may not function the same way when combined with the code from other developers’ machines. The risks here are two-fold. First, teams could find themselves slipping dates as they are going through hardening or even worse having “dead on arrival” defects actually reach their consumers.

To me the best possible situation is to have a nightly build system that does the following:

  1. Builds all the target images automatically
  2. Creates an installable image
  3. Runs and automated installation
  4. Automatically conducts some basic tests
  5. Notifies the “entire” team if a problem occurs anywhere along the way.

As I write this, it occurs to me I could go on for days about the benefits of having an automated daily build system. However, I believe the point is made here. If you have an Agile project (actually any software project) and are not integrating and building your code every day, I recommend you do so. I was in charge of one project where when we added automated nightly processes, the change in team mindset and quality of committed code was earth shattering.

One closing comment on “build engineers”. Find a good one. Often times teams will assign members with less experience to be the “build engineers”. Having a solid build process is critical to the success of your project and should be staffed with the appropriate capabilities.


Agile Axiom #2 – Without automation it is mathematically impossible to stay releasable at the end of every iteration.

March 22, 2008

Based on my experience, without automated testing it is mathematically impossible to stay releasable at the end of each iteration. To prove this point, I will walk through an over-simplified example. The key take away here is as follows. Having an automated nightly build process and a functional automated testing strategy are prerequisites for staying “releasable” when executing even a small Agile project.

Assume the following…

  • You are executing an Agile project that will take 6 iterations to complete
  • You have to implement 20 user stories, for purposes of illustration assume they are all the exact same size
  • You will be design, building, and testing 4 user stories per iteration
  • There is one hardening iteration at the end
  • Your team is made up of 5 people – 3 developers and 2 quality assurance engineers
  • For simplicity in this example assume
    • each iteration is 2 weeks long
    • 6 ideal days of velocity each iteration for development
    • 4 ideal days of velocity each iteration for quality assurance
    • Each story takes 1.5 ideal days for development and .75 days for testing
    • Once built, each story requires .5 days to regression test in subsequent iterations

Iteration 1

4 stories are built taking all 6 IDDs for development and all 4 IDDs for QA

Iteration 2

4 more stories are built taking 6 IDDs for development and all 4 IDDs fro QA

Team absorbs the regression tests requiring two days to complete. The product remains releasable given the fact that the team is confident regression testing has been complete.

Iteration 3

The development of 4 more stories is complete, this is now a total of 12. The QA engineers have tested the 4 new features.

This time the team must absorb 2 days in order to execute regression tests and ensure the product is releasable. The quality of the regression testing becomes compromised given that the work required to complete the testing for the current iteration requires all available velocity.

Iteration 4 and 5

The story is the same. The completion of user stories continues and iteration demos look good. However, the quality is questionable given the lack of velocity spent on regression testing.

Iteration 6

Full regression testing now requires 10 days of QA velocity. The developers are not available to perform the testing because their time is spent fixing bugs. Each fix that goes into the code must be retested and more regression tests must be run. It is likely the team will enter into a series of mini (test, fix, retest) cycles during this iteration. The developers are challenged because many of the problems that were found in hardening are in features that were complete over a month ago. Fixing them takes time. At this point, either the schedule will slip or the quality of the release will be compromised.

The Bottom Line

While this example is extremely over-simplified, the point is the same. The more stories that are developed, the more time is required to perform regression tests. There are two ways to address this.

  1. Acknowlege during release planning that velocity will shrink as the iteration progress. In this scenario, you would simply plan fewer stroies in the later iterations. This approach does not optimize the productivity of the team
  2. Have a good automated test strategy which enables the team to run automated regression tests every day without requiring the team to waste their precious velocity executing repetitive regression tests. In this scenario, the teams would adopt criteria that includes (Design + Build + Test + Automate) before a user story is “accepted”.

It is true that good development techniques which secure the stability and reduce the turmoil of the code (object oriented programming) as it is developed can reduce the risk caused by the problem identified above. However, these techniques combined with a successful automation strategy will enable teams to deliver high-quality, feature rich, code on time.


Agile Axiom #1 – Agile development actually requires more discipline that traditional waterfall methods.

March 8, 2008

Recently, I was browsing the Rally database for one of the Agile teams I manage. Rally is the tool from Rally Development we use to track the work we do as we move through the development iterations of our projects. Much to my surprise, the team had not been taking the time to keep Rally up to date. Looking at the database, it was not possible to tell which requirements had been completed, which ones had been tested, and what work was remaining. It was already the third iteration of a seven iteration project and all we had was a list of stories which had been elaborated from the requirements.

As a manager this is quite alarming. When discussing with the scrum master, I asked the simple question “how releasable are we after the first two iterations?”. The response was we had tested the code but would not be certain of the quality until we reached the two hardening iterations at the end. My response was the trouble with that is we are now attempting to execute a waterfall style QA cycle in two weeks. In waterfall, this cycle would take up to six months. Essentially, if we do not address the issue, we will significantly jeopardize the quality of the product.

In this example, it is my belief the team had actually been doing the testing and the code developed within each iteration was releasable. However, because we had not taken the time and exercised the discipline to do the housekeeping on the stories, it was impossible to be confident in the quality.

We should have been doing the following within the iteration…

  • defining stories for the iteration,
  • developing the code for the stories
  • testing the stories
  • automating the tests
  • demonstrating the functions
  • accepting the stories
  • pushing the stories that were not completed to the next iteration

Without doing this and being disciplined about it, it is impossible to tell progress and quality of the work that has been completed. Why is this discipline more important with Agile than it is with waterfall? Agile simply does not provide the end of cycle evaluation of engineering discipline found in waterfall. In Agile, this evaluation and discipline must occur throughout the iterations. You cannot procrastinate the discipline to the end of the release.


Agile Axioms

March 8, 2008

According to most dictionaries, an Axiom is defined as “a self-evident truth that requires no proof” or “a universally accepted principle or rule”. What a perfect name for the forthcoming series of blog entries on the simple rules and principles one must follow to be successful with Agile. Beginning this weekend you will see special purpose posts called “Agile Axioms” . The intent is to share basic rules and principles I believe must be followed for an agile project to be successful.