The Art of Software Testing
Chapter 9: Testing In The Agile Environment
Glen Myers
Wiley
Third Edition, 2012
The twenty-first century customer demands a quality application delivered almost immediately
In 2001 a group of developers met to discuss the state of lightweight (not too many rigorous rules) and rapid development methodologies
They created the "Manifesto for Agile Software Development," a document that became the cornerstone of the Agile movement
We are uncovering better ways of developing
software by doing it and helping others do it
Through this work we have come to value:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on
the right, we value the items on the left more
Agile is a philosophy that focuses on customers and employees, in lieu of rigid approaches and hierarchies
Features of Agile Development
Agile development promotes iterative and incremental development, with
significant testing, that is customer-centric and welcomes change during
the process
Knowing their interaction is welcomed helps customers build satisfaction
and confidence in the end product and in the development team
Many rapid development approaches may be considered Agile
They rely on
customer involvement, mandate significant testing, and have short, iterative
development cycles
The two most popular are Scrum and eXtreme Programming (XP)
Almost identical except...
1. Scrum teams typically work in iterations (called Sprints) that are from two weeks to one month long
XP teams typically work in iterations that are one or two weeks long
2. Scrum teams do not allow changes during their Sprints
Once the Sprint Planning Meeting is completed and a commitment made to delivering a set of product backlog items,
that set of items remains unchanged through the end of the Sprint
XP teams are much more amenable to change within their iterations
3. eXtreme Programming (XP) teams work in a strict priority order
Features to be developed are prioritized by the customer (Scrum's Product Owner)
The team is required to work on them in that order
Scrum Product owner prioritizes the product backlog but the team
determines the sequence in which they will develop the backlog items
Agile Testing
Collaborative testing
Everyone is involved in the process through design, implementation, and execution of the test plan
This requires a lot of communication and collaboration
As with most aspects of Agile development, Agile testing necessitates
engaging the customer as early as possible and throughout the development
cycle
Developers run unit tests for every incremental
code change, no matter how small, to ensure that the code base still
meets its requirements
Agile Programming Basics
Avoids the large-scale project syndrome in which the customer and the
programming team meet to design every detail of the application before
coding begins
Customer requirements
constantly change to reflect new business situations or marketplace conditions
Traditional
software development models suggest you code first and create testing
interfaces later
In Agile, you must create the unit tests first, and then write
the code to pass the tests
Agile Planning
Planning in Agile focuses on identifying your customer's application
requirements and designing use cases (and user stories derived from
them)
Customer employs the user stories
when performing acceptance tests at the end of a release cycle
Pair programming
Two programmers work together, at the
same machine, to create the code
This allows for
real-time code review, which dramatically facilitates bug
detection and resolution
Agile Testing
Constant
testing leads to the intangible benefit that the programmers and customers have confidence that the code
is of high quality
Agile mandates creating tests before coding begins, not after
If you create the unit tests before coding, you must understand the
requirements
It forces you to understand the requirements and to resolve
ambiguities before you begin coding
Agile Acceptance Testing
You and the customer create the acceptance tests during the design/planning phases
Create the acceptance tests from user stories
Customers, not programmers,
conduct the acceptance tests
In this
manner, customers provide the unbiased verification that the application
meets their needs
After you correct the bugs, or after any change,
the customer reruns the acceptance tests
In this manner, the acceptance
tests also become a form of regression testing