Sunday 28 September 2008

What is The Role of QA?

Zero Defects!

What would you think of a QA who told you that they had not found a single defect in the last month?

  • Lazy?
  • Unimaginative?
  • Been on holiday?
  • An accomplished QA?
The answer to this question depends solely on how one views the role of QA in the development process. Let's consider two hugely contrasting views of the role of QA in the context of two very different styles of development.

Team Foo

Team Foo work in a waterfall manner where each function of development: requirements, analysis, design, coding and QA are performed by different groups, in series. Communication among the different groups is achieved through documentation, with many members of the various teams having never met in person.

After a period of development, QA receive a "completed" system and have to answer the following question, often presented by management: Is the developed system fit for purpose, or in other words can we ship? This is a huge responsibility.

The sad reality for QAs working within this process is that they play no part in defect prevention to assist in ensuring the desired quality. They are only able to either detect the absence of quality through the identification of defects, or acknowledge that the system is of sufficient quality to be released. QAs therefore embark on a quest to find as many defects a possible. After all who wants to to be responsible for "signing off" a defect ridden product into production?

QAs adopt a destructive mindset and actively attempt to break the system using usage scenarios that may or may not be realistic; after all a shared understanding of the acceptance criteria for each feature has not been established. Bug reports are entered into the bug tracking system, assigned to development and the code and fix cycle begins. Bug fixes introduce new defects resulting in rising tensions and frustration between developers and QA and ultimately a late delivery.

Anyone has has worked in similar team setup will tell you that defects are common place. To make matters worse development and QA often engage in debates about whether raised bugs are in fact defects or a misinterpretation of the requirements.

Defects are expected in this environment and in some cases might be used as a measure of quality - "we have found and fixed 89 defects - we have a quality product now". Any claim of finding zero defects would almost certainly be frowned upon and may be used as a metric to suggest poor performance.

Team Bar

Team Bar form a cross functional team comprised of business people, business analysts, developers and QAs sitting on the same floor, within earshot of one another. The team work collaboratively toward a common goal set by the business who actively work with technical people to ensure that they understand the risks and opportunities provided by the project.

QA are heavily involved in the analysis of requirements and work closely with business analysts to define the acceptance criteria that features must fulfill to be deemed complete. Prior to starting work on a story, developers engage in a conversation with QAs to ensure that the acceptance criteria is understood. During this conversation it is not uncommon for developers to say something like: "We seemed to have missed the timeout scenario. What shall we do in this case?" The QA may reply "Oh yes, I didn't think of that, let's retry for a maximum of three times".

Upon completion of a feature, developers provide a demonstration to both QAs and business analysts to verify that their work fulfills the acceptance criteria defined for the feature. Any defects or missing features identified at this stage can be resolved efficiently by the original developer (or developers if pairing).

The goal for QA is to ensure that quality is built into the product from the beginning. The acceptance criteria used to judge the product's quality is clearly communicated to the whole team to ensure that the correct product is built. QA will still independently verify that the acceptance criteria for each story has been fulfilled.

A zero defect rate would be celebrated and considered to be a result of close collaboration between QAs, business analysts and developers both prior to and throughout development of features. QAs will have worked hard to identify realistic scenarios prior to features being developed and will have clearly communicated the acceptance criteria by which features will be deemed complete.

Changing Opinions on the focus of QA

It is very interesting to note that QA communities, predating the Agile and Lean movements, acknowledge that the focus of QA has changed considerably as the discipline has matured and developed over the past fifty years.

In the paper, The Growth of Software Testing (1988) , the shifting focus of QA is categorized as follows:


























PeriodFocus
1956
Debugging - Programs are written and then tested by the programmer until they are satisfied that any bugs have been removed.
1957 - 1978
Demonstration - Testing demonstrates that the system does what it is supposed to do.
1979 - 1982
Destruction - The focus of testing changes from proving the system does what is supposed to do, to the identification of defects.
1983 - 1987
Evaluation - Testing becomes an activity throughout the development life cycle.
1988
Prevention - The focus is on defect prevention. Tests were written to demonstrate that software satisfies its specification, to detect faults and to prevent faults.

Perhaps Test Driven Development is not so extreme after all?

Zero Defects - Really?

I have known of several projects that fit the profile of the Bar team. Did they achieve zero defects? The honest answer is no. They did, however, reduce defects to a manageable level. Unpredictable, demoralising cycles of code and fix have been long forgotten on these teams. Where a defect is found it is followed up with a root cause analysis to determine how the defect was introduced so that it can be avoided in the future.

Note that while QAs in the Bar team place heavy emphasis on defect prevention they still ensure that the behaviour required of the system is present and correct according to the specified acceptance criteria.

Summary

In both teams the goal of QA is to ensure that the system is fit for purpose and provides the features agreed with the customer. We have seen two contrasting styles of development and the different roles that QA plays in each. Team Foo focus on the identification of defects and bug reporting whereas Team Bar focus on preventing defects.

The Poppendieck's have it right when they describe a process that regularly results in defects being found as a broken process. Defects should be a rarity rather than the norm. If identification of defects is commonplace in your organisation then you have a problem.

Software development has suffered for too long as a result of poor collaboration between QA and development. What can you do to encourage collaboration between these two groups? You could try starting with the following statement: As a company we value defect prevention over defect identification.

2 comments:

Domingos Neto said...

Hi,

Nice article, it helps a lot to have the QA team working together with the devs.

iBut It seems to me that some activities you describe as responsibility of the QA should be the BA's. Like for instance:

"Oh yes, I didn't think of that, let's retry for a maximum of three times".

cialis said...

Hi, well be sensible, well-all described