Documente Academic
Documente Profesional
Documente Cultură
Manchester , UK
21 - 24 November 2011
Test Strategies in
Agile Projects
2011
Anders Claesson
anders.claesson@enea.com
Contents
1. Introduction 2
2. Experiences 3
3. Workflow 3
3.5 Release 42
4. Biography 45
5. References 46
1
PAGE
Abstract
Agile development methods are becoming more and more common in our projects. The
objective is to achieve higher quality and shorter lead times with a minimum of overhead.
With frequent deliveries, close cooperation within the agile teams and the customer,
continuous integration, short feedback loops and frequent changes of the design creates
new challenges but also new opportunities for testing.
A well defined agile test strategy guides you through the common obstacles with a clear
view of how to evaluate the system. Testing starts with the exploration of the requirements
and what the customer really wants. By elaborating on the User Stories from different
perspectives, both efficient and effective test ideas can be created. Testing becomes a
continuous and integrated process where all parties in the project are involved.
w w w. e u ro s t a rc o n f e re n c e s . c o m
Test Strategies in Agile Projects
5. Release
Experiencing writing test charters instead
is such a relief from what I did in the old
days. Now it is possible to actually do
some productive testing work. The methods On page 4 there is a short overview of the
described in this document have evolved different steps in the Agile development
over a long period of time, also inspired by process where the testing strategies are
a number of people leading the evolution of included:
testing practices in the direction of becoming
more of a science than an art. 1 - Project Initiation
Find out what the goals with the system
By using the cumulative testing knowledge are, who the customer and users are and
from the whole testing community without what problems the customer and user want
too much bias towards only one school of to solve with the system. Identify all the
thought, but with an open mind, a lot of new requirements for the system.
insights can spread over several directions.
Test Strategies in Agile Projects
2 - Release Planning
Decide contents and dates for all releases 3.1 Project Initiation
and demos for the customer.
In Scrum there are three main roles to be
3 - Sprint Iterations defined at the start of the project.
Identify all design and testing tasks.
Estimate what and how much testing is > The Product Owner identifies and
required. Perform structural, functional and prioritizes the features to be included in
characteristics testing. Make a demo for the the Sprints.
customer at the end of the Sprint. Have a
retrospective meeting afterwards to evaluate > The Scrum Master is responsible to
how the work was carried out. Learn from ensure that the Sprint stays on course.
both good and bad experiences. Use what Also to facilitate the Sprint planning and
you learned in the next iteration. that everyone follows the Scrum rules
and practices.
4 - End Game
Perform a complete regression test of all
> The Team is responsible for developing
delivered functionality. No new features are
(to analyze, design, code, integrate, test
allowed at this stage. Test the most important
characteristics in a complete environment, and document) the required functionality
such as (final testing of) performance, and characteristics. Teams are self-
reliability, stability, security, scalability, etc. managing, self-organizing and cross-
Perform a user acceptance test. functional.
4
To be able to start on any test strategy work
PAGE
5 - Release
Check against the release criteria that you need to understand what the project is
everything has been done and is ready all about. Therefore you need to ask some
for release. Release the system to the relevant questions. The following list is
customer and hand it over to your support based on [Cagan -06].
and maintenance organization. Finish with a
project retrospective. 1) Why are we doing this project?
2) Exactly what problem will this solve?
(value proposition)
3) For whom do we solve that problem?
TWEETABLE (target market)
4) How will we measure success?
The most common (and difficult)
(business metrics)
problem when specifying 5) What alternatives are out there?
the requirements is missing (competitive landscape)
information. The purpose of 6) Why are we best suited to pursue this?
an Agile way of working is to (our differentiator)
gradually fill in the missing parts 7) Why now? (market window)
while the development progress 8) How will we deploy this? (deployment
strategy)
is in each Sprint.
9) What is the preliminary estimated cost?
(small/medium/large)
10) What factors are critical to success?
(solution requirements)
owner should answer before launching the robustness, scalability, maintainability, etc.
project.
Risks: What problems may occur?
This is also important to understand from Consider potential risk areas and where
a testing point of view, both as a motivator, you and the developers think there might
and to get the bigger picture of the project. be problems. Analyze potential problems
The success factors should be guiding the regarding the operation of the system,
test strategy to assure they are verified and failure mode handling difficulties, instability,
accomplished regarding the product and its inconsistencies, incorrect functional
quality. behaviour, insufficient characteristics, weak
specifications, complex areas and faulty
The product owner produces a so called areas.
product back log at the start of the project,
which includes the high level requirements Elaborating and discussing the three
for the project. The product backlog is the perspectives described above will give
main input for the initial (pre-) planning valuable input on how to start forming the
conducted by the team. test strategy. At an early stage it might not
be possible to answer all of these questions,
Pre-planning tasks: but they can be used to guide the following
- Make an overall estimation and discussions in the team about the direction
prioritization of the included backlog of where, what and how to test in different
items. areas.
5 - Identify impediments, and plan for how
to remove them. It is also very important to find out as early as
PAGE
- Identify lessons learned from previous possible what the customer values the most
releases or iterations that the team wants regarding the quality attributes of the system.
to incorporate in this release. Typical quality attributes are performance,
- Review and revise the team’s standards availability, reliability, etc. [ISO/IEC 9126-
and practices. 1], [Testeye -10], [Al-Qutaish -10], [Ganesh
- Make an initial technical risk analysis. -10], [Wikipedia1 -11] (there are more
than 50 quality characteristics of a typical
To gain a better understanding of what is to software system). These are often forgotten
be developed it is useful to view the system or neglected in rapid development projects,
from three different perspectives [Claesson3 but nevertheless very important for the
-04]: customer, the user and the supplier.
User: What does the user want to do with For each quality attribute:
the system? - Identify how important it is for the user/
Analyze the requirements, features, needs, customer by a relative weight in percent
expectations, usage profiles, user data, (100 % is divided among the quality
operational scenarios, User Stories, attributes the customer identifies as
interoperability, usability, safety, compatibility important).
and customer values. - Identify how satisfied the user/customer
is with the current version of your system
System: What should the system be capable in operation (if there already exists any
of doing? previous versions of the software in
Analyze the functions, system service).
characteristics, interfaces/interactions,
operational environment, availability, A relative value is given (by asking a selected
Test Strategies in Agile Projects
(what is the probability of this specific quality 2) As a [normal user], I should get [new
aspect failing in operation and what are the screens to appear within one second
consequences, e.g. if the system response or less in 90% of the transactions,
time would be 10 minutes instead of less where the maximum response time for
than a second). a new screen to appear is less than 8
seconds], so I can [use all features
By knowing more about what the customer without any longer delays that would
and users value about your product will help otherwise disturb me in the use of the
a lot, both in design and testing. Consider application].
which attributes are most important from a (A performance requirement. These kind
customers’ point of view and a suppliers’ of requirements usually “disappear” or
point of view (e.g. maintainability, portability). are not included at all because they are
Not so important attributes may be tested more difficult to specify – Not a good
less but still covered to some extent. idea! Performance needs to be carefully
specified because it affects the whole
As soon as the product backlog is defined system architecture)
the refinement of each high level requirement
can begin. In Scrum so called “User Stories” 3) As a [normal user], I do not want [any
are used to define the requirements. A “User single point of failure in the application
Story” is a software system requirement to cause any loss of data], so that I
formulated as one or two sentences in the would need [to retype it again].
everyday or business language of the user. (A reliability requirement. This is actually
The purpose of writing User Stories is to a negative User Story of things I do not
make the requirements easier to understand want to happen)
and discuss.
Test Strategies in Agile Projects
4) As a [customer], I want to [quickly find on one side and the confirmation on the
and purchase an item with a minimum back of the card [Jeffries -01], [Marekj -08],
number of steps] so that I can [continue [Kelly -08].
shopping for the next item or leave the
website]. Card: Short description of the story, “as a
(A usability requirement. Unverifiable user, I want...”
phrases may need to be elaborated and
if possible quantified - what would Conversation: Notes and/or an illustration
“quickly” mean for a typical user with explanations
customer?)
Confirmation: Acceptance criteria. The
5) As a [normal user], I want to [be able tests that must pass in order to validate that
to write a letter], so that I can [read and the User Story has been delivered and works
edit it on all versions of Windows from as intended.
Windows XP and Office 2003 to
Windows 7 and Office 2010]. Stories for characteristics need to be
(A compatibility requirement. This could quantified (as complete as possible) to be
be very important for a normal user if testable. Example:
he/she works as a consultant for “As a user I should get a response from the
example, using different computers system on any request within one second
with different versions and platforms for or less in 95% of all cases (up to 85% of
word processing when writing on the the system capacity regarding processor
same document). utilization and 90% RAM memory usage),
where no response takes longer than 8
7
The User Stories are the main input for all seconds.” If the system load exceeds the
PAGE
testing. The tester’s role is to question what maximum limit regarding resource usage
is written in order to clarify it. Also to assure and response times an error message should
the acceptance criteria is complete enough. be sent for any new requests which are also
noted in the system log (can be included in
The user perspective can be evaluated on the acceptance criteria).
a continuous basis since you involve the
user/customer during the design. Generally, More details may also be expressed as
software requirements are a communication additional User Stories.
problem.
Example of a more complete specification
User Stories may be written on cards with of a User Story. The example is based on
the story and conversations for clarification (Kelly -08):
Card:
As a registered user, I want to log in, so I can access subscriber content
Conversation:
User Login
Confirmation:
Success Valid user logged in and referred to the home page
a) Valid user name and password
b) “Remember me” ticked – Store cookie/automatic login next time
c) “Remember me” not ticked – Manual login next time
d) Password forgotten and a correct one is sent via email
Failure Display message:
a) “Email address in wrong format”
b) “Unrecognized user name, please try again”
c) “Incorrect password, please try again”
d) “Service unavailable, please try again”
e) Account has expired – refer to account renewal sales page
Both the conversation and the confirmation represents a single path through a sequence
are part of the requirement, i.e. the of related User Stories, using a defined set
acceptance criteria also becomes part of of input data.
the specification of how it should work. Note
that “b” and “c” under “Failure” are invalid Business rules
error messages since the system should Certain user classes that can only perform an
never respond to which one of the password activity under certain conditions. Functional
or user name was incorrect separately for requirements may be derived from the
security reasons (this is a defect which business rules to enforce the rules. Business
becomes visible here when the User Story rules might be that a certain calculation
is specified, if detected before the designer method should be used.
8
starts with the implementation).
PAGE
External interfaces
When analyzing the User Stories, make sure Describe the connections between your
all types of requirements are covered. The system and the outside world. Divide the
following lists is based on [Wiegers -03], external interfaces into different types (user
[Wiegers -10]. interface, interface to other systems, etc.).
Sprint. Both discussions within the team and 12) What are the most common and critical
the customer representative may provide parts of the functionality from the users
clarity when in doubt. But you need to know point of view?
what to ask for. Below are some examples 13) Are there any performance
of information that is usually needed, but not requirements included?
defined: 14) What is an acceptable response time
- Missing boundaries of input or output for the users?
values. 15) How tolerant should the system be to
- Characteristics which are difficult to faulty input or user actions?
quantify or even specify. 16) What are the limitations in the software
- Missing actors and interfaces. and/or hardware regarding
- Undefined exceptions and error handling. characteristics, features, functions,
- Undefined system limits (e.g. data, time and space? Which
performance limitations, configuration exceptions are assumed directly and/or
limitations, number of users, etc.). indirectly?
17) Is the description complete enough
The next step in the process is to make a to proceed and decide how to design,
test analysis to assure all User Stories are implement and test the requirement,
testable and complete. Then it is possible involved features and the system as a
to evaluate the function, characteristic or whole?
system by the use of any known and available 18) Which problems and risks may be
test method, test technique and/or test tool, associated with these requirements?
9 at a reasonable cost and effort to achieve a
good enough quality assessment. Based on the given answers from the above
PAGE
11
A Test Goal is something that somebody wants to
PAGE
performance, stability, load, security, etc. means the designers are doing
something fundamentally wrong in their
4. To cover all system parts, i.e. sub- design process.
systems or other systems, or interfaces, 3. At the release date there shall be no
both user and system interfaces. unsolved high priority risks or critical
Incident Reports open. Planned test
5. To cover each code unit to a level coverage should have been achieved.
decided by the risk analysis and any
safety regulations, i.e. 100% statement 4. Characteristics measurements should
coverage, 100% branch coverage. be within defined limits in, for example,
response times for a defined set of users
6. To cover all documentation either by and configurations.
inspection or by using the
documentation, i.e. to use all parts of the 5. The pass rate for the acceptance tests
user’s manual. should ideally be 100%, but exceptions
may be accepted depending on the
7. To cover all high priority risks. severity of the found faults.
1. To reach an acceptable limit of remaining 1. The planned completion date has been
faults and severity level, for example: reached.
12 No blocking faults, one major and only a 2. The burn down chart deviations
few minor ones as long as the compared to the planned curve is within
PAGE
Test Strategies
limits regarding time, scope/contents of Some basic principles for Agile testing
the Product Backlog, Sprint Backlog and [Claesson4 -11]:
the set of features delivered compared to
initial plans. Also consider whether the > Testing is performed early and often.
velocity of the team is sustainable and
predictable. > Testers are included in a cross functional
development team.
Agile testing can be divided into four different
quadrants to show different aspects of > “User Stories” are tested.
testing and purpose, [Gregory -10]. The Agile
Testing Quadrants was originally created > Close cooperation with developers and
by Brian Marick [http://www.exampler. customers.
com/]. The following description is based on
[Crispin - 09]. > Continuous integration and regression
tests.
Q1 Represents a Test Driven Development
practice. Unit tests verify the > All test results are logged.
functionality of a small subset of the
system, such as an object or method. > Defects are reported.
Component tests verify a larger part of
the system, such as a group of classes
TWEETABLE
that provide some service. Both types
13 of tests are usually automated. To ensure high quality is
delivered from the developers,
PAGE
Q2 Represents tests that support the work it is important that the criteria
of the development team at a higher in the Definition of Done, clearly
level. These business-facing tests, also defines when a feature is ready
called customer-facing tests define
for testing.
external quality and features the
customer wants. Tests are oriented
toward illustrating and confirming
desired system behavior at a higher Useful methods and techniques:
level.
Requirements Based Testing
Q3 Represents business-facing examples Cover all requirements with Tests. To avoid
to help the team to design the desired the risk of testing only the normal/positive
product. When the programmers write cases you may benefit from using tools
code that makes the business-facing like [http://www.glocksoft.com/resource_
tests pass, they might not deliver what viewer.htm] to extract all fault codes that
the customer really wants. The focus the programmer actually has inserted into
is to test how a real user would use the the code (but “forgot” to mention in the user
product. manual).
TWEETABLE
Error Guessing
Anticipation of defects in certain areas based A Test Goal could be a
on experience. measurable test objective to
be reached (considering the
Taxonomy Based Testing constraints of the project).
Classification of defect types. Used as a
14 basis of what common problems to look for
when testing. Definition of Done
PAGE
Structure based testing and Input partitioning testing made for all
- 100% Software Design and Module input data.
Specifications covered. - All combinations of input and output
- 100% Statement Coverage of the source parameters and values covered (pair-
code. If 100% is not wise coverage).
possible to reach, a desk check can be
performed for the remaining parts. System testing
If you are testing a safety critical system - End-to-End tests covered including all
you may need higher levels of code features and functions.
coverage, such as branch coverage (level - Scenarios with the most common, most
B) or Modified Condition/Decision used and most critical paths covered.
Coverage (for level A software according Also less frequent and common failure
to DO178b safety standard for Avionics cases covered to some extent.
software). - The most important characteristics of the
- Boundary Value Analysis Testing system covered.
performed. - Testing is done in a complete (customer/
- Equivalence Classes and Input production like) environment with all HW
Partitioning Testing performed. and SW included (as much as possible).
- All Tests passed and no remaining faults - All system interfaces (also with other
to be corrected. systems) covered.
- All code reviewed. - All high priority risks relating to system
- Known weaknesses described. level issues covered.
15 - Component testing reported (including
obtained test coverage).
PAGE
covered. The extent of the required coverage functions, features and system parts (for
is determined by what is new/changed and example third party products) needs to
the associated risks of failure. be identified. The objective is to be able
to demonstrate everything that has been
Quality developed within the Sprint at the Sprint
Testing should stop when the probability of demo. Ideally each feature should be as
remaining faults is reduced to a level that independent of other features as possible.
can be accepted by the customer/user
[Beizer -90]. When integrating the system the order in
To evaluate the quality the following should which functions and features are developed is
be considered: very important. To visualize the dependencies
- The fault intensity (i.e. how many faults a system anatomy map can be used to plan
are found per week). and control the interrelationships between
- The fault density (the number of faults all functions and features in the project.
found compared to the number of
functional requirements, functional parts, The anatomy shows all features/functions
complexity, scenarios and characteristics and their dependencies to other features
are tested). and functions in a hierarchical and logical
- The consequences of found faults (what way. Ideally functions/features should be
is the severity level and system impact integrated up to a level where there is a test
for the user/customer). interface (or real interface) to access the
- The current risk level (is it within feature. It is of little use if designers deliver
16 acceptable limits?). features impossible to reach until the last
- The error trend (what predictions can be increment when the project usually is in a
PAGE
made regarding how many faults that very tight time schedule and there is little
could remain in the system?). time left to do any testing.
Feature 5 2 Feature 4
Feature 3
Feature 2 1
Feature 1
The analyzed risk level per feature can also together to allow the system testers to start
be shown in the anatomy map to make evaluating the performance and end-to-end
designers, integrators and testers prepared scenarios as soon as possible. Otherwise
for possible upcoming problems. The higher that will not happen until the last sprint or
risk on the feature the earlier it should be the last week before the final acceptance
delivered to have enough time to evaluate and delivery to the customer (which is far
17 and correct the problems. too late if serious performance issues show
up that need to be corrected).
PAGE
> Keep the system anatomy under documentation) and move around the
configuration control. features until you find the most optimal
solution.
> When negotiating the contents of the
anatomy use yellow sticky notes (one > Log issues and problems during the
function or feature per note) on flip anatomy negotiation.
chart sheets (to be able to bring back for
The need for test coordination increase design and test. Anything outside the team’s
18 with the size of the project and the level area of development (features, functions
of short term planning. In Scrum and Agile or sub-system) may be forgotten, unless
PAGE
development the idea is to plan only one or someone enforces the team to be part of the
two sprints ahead, with some exceptions for overall system design and system testing.
system related parts and structures. Many If there is no one appointed to lead these
projects have more than one Scrum team. In activities they may be missed (or done with
some cases Scrum teams are also located/ poor results).
outsourced to other countries.
The role of the Scrum Master includes to
In agile projects the teams are cross coach the team and facilitate the sprint
functional. The following three main planning. Then also make sure the teams
problems may occur with cross functional communicate with each other. There should
teams [Hazrati -10]: be one full time Scrum Master per team
(when team size is 5 – 9 persons) to be able
> Sub-optimization at the project level. to support all aspects needed regarding
communication and coordination.
> Inefficiencies due to lack of coordination
across the project. In addition to the Scrum Master, a system
design coordinator and a system test
> Reduced expertise because of limited coordinator may be needed. The system
knowledge sharing across specialists. design coordinator leads the system design
(act as the lead architect of the system).
One example of sub-optimization is when The system test coordinator plans and
the project believes the teams will take care coordinates all the system testing activities
of all testing and coordination themselves. and the system test team (if there is a
This does not happen because each team separate system test team in the project).
is only responsible for their own planning,
Test Strategies in Agile Projects
Test coordination may include the following when a system test environment is to be
activities: ordered/built, which may include
prototype hardware (can take long time
> To plan, control, coordinate and follow to deliver) or other equipment, installation
up on all test activities that span across and configuration.
the teams. It may include any end-to-end
or scenario tests with features developed > To assure any purchase of test tools, test
in several teams. It could also be any environments or any other parts needed
characteristics or other system level for testing is aligned to get a good price
tests (e.g. performance, stability, from the tool vendors and a common test
installation, security, reliability, integrity, configuration. Otherwise it will be
etc). difficult/expensive to maintain if all teams
The test coordinator ensures common have their own tools and environments.
test activities are included in each
teams sprint planning. The test
coordinator participates in the Scrum of
TWEETABLE
Scrum meetings or separate test
coordination meetings to follow up on During the release planning stage,
the system test and cross functional you should start to define the
testing. overall testing goals, strategies
and follow up procedures to
> To prepare the system anatomy showing
19 guide the project and the team
the dependencies among the features in
in the right direction towards
PAGE
support from the (third party) tool vendors where you purchased or downloaded the tools (if
you use freeware).
For characteristics, specialized tools may be The relative size of a User Story is calculated
needed for a more thorough testing, which in so called Story Points. It is used to
are usually recommended and used by the measure the effort required to implement
experts in their various fields of expertise. a story (including all testing required). The
number tells the team how much effort the
Estimation story takes to develop. Each story should be
The general approach to estimating in agile possible to fit into a Sprint.
development is based on the experience of
the team by using functional analysis. The A typical story point range could be:
following description of how to estimate in 1,2,4,8,16 or X Small, Small, Medium, Large,
Scrum is based on [Cohn -05]. Extra Large.
Test Strategies in Agile Projects
Story Points are relative and do not directly Each estimator selects a card representing
co-relate to actual hours [Cohn -10]. Since his or her estimate. Cards are not shown
Story Points have no relevance to actual until each estimator has made a selection.
hours, it makes it easier for the Scrum teams All cards are simultaneously turned over.
to think abstractly about the effort required
to complete a story. The estimates may differ significantly in the
first round. When they differ, the high and low
A method that is used in agile development is estimators should explain their estimates.
called planning poker [Poker -10]. Planning They may have different solutions in their
poker is a consensus-based estimation mind when thinking about how much effort
technique for estimating effort or relative is required.
size of tasks based on the Delphi method
[Delphi -10]. The group can discuss the User Story and
the estimates for a few more minutes. The
When estimating, don’t forget to include moderator can take any notes that may be
the characteristics the system needs to helpful when programming and testing later
fulfill. If you have missed specifying the on.
characteristics in User Stories, you need
to point it out and consider how it should After the discussion, each participant makes
be applied for the User Stories you already a new estimation by selecting a card. Usually
have (or create new ones). For example, the estimates will start to converge by the
how much effort would it take to assure second round. If they have not, continue
22 the performance of the system results, in repeating the process. The goal is to agree
response times of less than one second, on an estimate that can be used for the
PAGE
when the user interacts with the different development of the story.
features in the system?
When everyone is involved in the estimation
Participants in planning poker includes the accuracy will increase, since more
everyone in the team (programmers, discussions and elaboration of possible
testers, database engineers, analysts, solutions are made (compared to if only one
user interaction designers, and so on). The person did the planning and estimation).
number of planning participants should
not exceed ten people (otherwise split the With many small User Stories it may be more
planning session into two or more). practical to group them together instead of
estimating each one separately.
At the start of planning poker, each estimator
is given a deck of cards. The cards are The Risk Analysis
numbered in the following way: 0, 1, 2, 3, 5,
8, 13, 20, 40, and 100. The risk level of the software and system is
one of the most important factors regarding
The moderator for the planning session how much test effort is needed. The following
reads the description for each User Story factors may be considered. The list is based
to be estimated. The moderator is usually on [Schaefer -05]:
the product owner or a system analyst. The
product owner may answer any questions 1. Identify and analyze missing, ambiguous
during the meeting for clarification. The goal or vague parts of the specifications (User
in planning poker is to derive an estimate Stories) for the system.
that is good enough with a minimal amount
of effort.
Test Strategies in Agile Projects
2. Analyze the use of the system within its 8. Identify areas using new technology,
overall environment. Analyze the ways solutions or methods.
the system might fail. Analyze possible
costs and consequences of the different 9. Identify the number of people involved
failure modes. in the design and implementation of the
different areas of the system. The more
3. Identify areas where many users will see people on the same task, the larger the
and experience a failure if something overhead is for the communication, the
goes wrong. Also consider how tolerable chance increase that things go wrong.
the user is to the failure.
10. Identify areas where the developers
4. Identify the functions that may be used have been replaced during the course
frequently, and the functions used only a of the project.
few times. Some functions may be used
by many users and some by few. 11. Identify areas of the system that have
been developed by designers/teams
5. Identify the areas of the system critical with a long distance between each
for the business processes and the other. The level of communication
business for the user/customer. Also between developers decreases by
consider the costs of failure and the distance.
usage frequency of the business
critical parts. 12. Identify areas of the system that have
23
been developed under high time
PAGE
(depending on when the risk analysis is 16. Identify to what extent the system and
performed in the project lifecycle). its functions have been used in a
previous release. Completely new
functional areas are most defect prone.
3 Remote The risk is likely to occur sometime in the lifecycle of the product (once
PAGE
per 10 years).
2 Improbable The risk is unlikely to occur but possible (once per 100 years).
1 Incredible The risk is extremely unlikely to occur (once per 1000 years).
2 Minor A failure that does not prevent a system achieving its specified
performance.
1 Insignificant A failure of no significance regarding intended usage or characteristics.
example, there might be more critical The risk level of the software
levels than what is shown in the table, and system is one of the most
e.g. catastrophic consequences, but this important factors regarding how
example is just to show the principles and
much test effort is needed.
methods of doing the risk assessment and
No known method exists to evaluate the risk, or it is far too
Testability 4 Impossible
how to present the results. expensive/difficult to set up and perform a test.
It is difficult to test. It requires a lot of resources to set up and do the test
3 Hard
and it takes considerable time.
It requires a reasonable amount of resources, time and effort to do the
a- does not cause
specified level. a delay or cost greater than the minimum threshold
specified for a significant failure
A service failure that:
2 Minor -Amust
failure
bethat does for
rectified notthe
prevent a system
system achieving
to achieve its specified
its specified performance
Test Strategies in Agile
3 Projects
Major performance.
and
1 Insignificant -Adoes notofcause
failure a delay orregarding
no significance cost greater than the
intended minimum
usage threshold
or characteristics.
specified for a significant failure
To determine 2theMinor
testability of eachthat
A failure risk
does not evaluate
prevent aitsystem
or notachieving
in testing (to a reasonable
its specified
performance.
might be beneficial to see if it is possible to cost). Otherwise the team needs to focus on
Insignificant
use any known1 methods A failure of notosignificance
or techniques otherregarding
mitigationintended usage or
strategies characteristics.
instead.
The above example is from a safety critical assessments. You can always get inspired
application (train signalling system). In your and find good ideas you may incorporate in
case you may want to simplify it to suit your your own process (since they have probably
needs of assessment, in case you develop spent a significant amount of time thinking
less critical applications. It is however always about how and what to look for regarding
a good idea to learn from how they do in possible problems in their systems).
more critical applications, when making risk
TWEETABLE TWEETABLE
When doing Risk Based Testing [Claesson1 Requirement: In release 2 the system shall
-02] to explore the risks, it might look support train speeds up to 160 km/h. The
something like this (the example is taken axle counter system shall only need to
from testing an Axle Counting system in a support 160 km/h for wheel sizes down to
train signaling system): 335 mm diameter and 75 km/h down to 318
mm diameter, all operating on rail sections
UIC54 or larger.
Probability *
Prio Risk description Actions
consequence
1 Risk_1: Wrong values 4 * 4 = 16 Risk reduction and evaluation strategy: Perform a
regarding number of passed requirements validation with the customer and/or the
Testability = 3
axles received from the axle product management.
counting system.
Perform a lot of boundary, domain and negative Test
Cause: Incomplete Cases to evaluate the “real” limits of the axle counter
requirements. Unknown system. Also consider which parameter values are the
behavior of the system most common and which ones we know exists that
outside specified boundaries. exceed the specified limits.
Incorrect system boundaries Test object: Axle counter test.
implemented regarding
Test cases: - Test of individual parameters and
acceptable wheel size and
combinations thereof. Select Test
speed for the axle counting to
Cases based on the boundaries
be accurate.
indicated in the domain analysis.
26 Effect: The consequence may
- Test outside of the parameter
be that the signaling system
boundaries.
PAGE
Note that doing risk analyzes is not part One example of a costly risk is performance
of the “standard” Scrum methods in Agile problems. If you have developed a .NET
development, since it is assumed the risks solution when creating a Client/Server
are taken care of “on the fly” by the team. But system and start to experience slow response
if you put in “doing a risk analysis” as a task times when accessing the database, it may
in your Sprint plan, it can be fitted into the be an indication that you have created an
Scrum way of working and you will benefit a inefficient architecture with costly solutions
lot from looking at what problems you might when accessing the database (costly for the
run into in advance, so you are able to avoid system performance resulting in a high load
them instead of realizing the consequences for the processor in the application server).
and having to correct it later on (which may
slow down the progress significantly).
Test Strategies in Agile Projects
As you can see from the previous examples, > Update priorities in the product backlog.
the risk assessments will have a major
27 impact on how to make an efficient and > Calculate resource availability.
effective test strategy.
PAGE
> Clarify User Stories if needed. The testers contribute in all parts of the
Sprint planning and assure all of the testing
> Define the definition of ”done” (DoD) for related tasks are planned for and included in
the Sprint. the Sprint backlog.
> Define how the Sprint demo should be After the sprint planning meeting and your
performed. initial sprint test planning, you need to be
more specific how you are going to test
> Break apart or combine User Stories. what has been included in the Sprint.
considering what the user wants, needs possible) [Lambert -10]. That could
and expects. include activities where users
interacting with a database, using
3) Use exploratory testing. network communications, or interacting
Exploratory testing seeks to find out with other hardware, applications
how the software actually works, and or systems.
to ask questions about how it will
handle both difficult and easy 8) Use scenario based testing.
situations. The quality of the testing is Scenario testing is a specification
dependent on the tester’s skill of based test design technique in which
creating tests and finding defects. test cases are designed to execute
While the software is being tested, user scenarios. The scenarios could be
the tester learns things that together based on the underlying business
with experience and creativity generate process in which your application will
new good tests to run. Exploratory operate, and hopefully solve the
testing has always been performed by problem that the customer and user
skilled testers [Bach2 -01], [Bach3 -03]. wants to solve with your system, in an
efficient and effective way.
4) Build tests incrementally.
Incremental test design is when test 9) Use automation for test data
cases/charters are gradually built from generation and execution.
a basis of User Stories or other input. Tools can be used to generate large
Test cases are incrementally made amounts of test data (like the tool
starting from a simple case to more Perlclip), or to generate test cases for
complex tests. combinatorial testing. Test automation
Test Strategies in Agile Projects
is also beneficial for regression testing solve the problem faster. Otherwise
to assure a new build from the they may need to come back to you
developers work (basic functionality, and ask for more information which you
also called smoke tests) and that might not be able to give to them
previously corrected faults have not anymore because the state of the
come back because of problems with system changed since the problem was
your CM-process where old versions of discovered and critical system
some modules reappear again. variables have been overwritten by the
continuing events in the system.
10) Perform frequent regression testing.
As mentioned above, regression testing Now it is time to gather the team to find
is an important activity to ensure that a good test ideas for the functions and
previously tested program, which has characteristics included in the current Sprint.
been modified due to functional This is the most difficult part, regardless of
changes or defect corrections, has development method, what to test within
not introduced any side effects (new a very limited time frame, limited test
bugs), as a result of the changes made. environment, limited data and configuration/
Regression tests should be performed setup compared to what could happen in
as soon as the software or its real life system operation.
environment is changed.
Nowadays there are tools that support this
11) Test all documentation. process. By using the tool Session Tester
One definition of documentation (mentioned earlier in the tools section), both
29 is “Any written or pictorial information test questions and test ideas can be written
describing, defining, specifying, and linked to each other. Session Tester is
PAGE
12) Log everything you do. To find good ideas about what to test is to ask
Logging is especially important when yourself (and your colleagues): What is most
performing exploratory testing. Test important to find out about this system?
ideas and the concurrent test design (Based on previous test analyzes where you
can be backtracked when defects are hopefully got a good understanding about
found and the test coverage can also what the system is supposed to do).
be determined.
Example of questions to start off your
When you write incident reports include brainstorming session:
the recorded sequence when the fault
occurred, as an attachment. In that way 1) What happens if .........………………..?
you do not need to describe so much
on what happened and the designer 2) What should happen when …………..?
can see for himself what you did.
3) Will the system be able to fulfill all its
Before you start testing it is also a good requirements?
idea to ask your designers which
system log files and system variable 4) What are the expectations and needs
readings they would need, to be able to from the customer?
Test Strategies in Agile Projects
5) In what way may the system fail? to ask to explore a component or system
under test to find out how it really works and
6) What problems were found in the if its behavior may be considered correct/
previous release? acceptable or not. The point of running the
test is to gain information. The tests may or
7) Are the requirements and the input may not be specified in great detail, which is
specifications possible to understand ok, as long as it is clear what the idea of the
and test? test is and how to apply that idea to some
specific aspect of the product.
8) Will the system be reliable and resist
failure in all situations? Tests can be of the following categories:
and the initial system state, e.g. a start menu are performed as described above under
should appear on the screen with login Activities, e.g. another super user logs on
fields). to the system trying to manipulate the same
data as the first is working on, or the network
Priority connection suddenly fails.
The importance of these tests.
High/low, based on what the priority of the
requirements is, or other considerations (risk TWEETABLE
level). Agile testing can be divided into
four different quadrants to show
Reference
Specifications (e.g. Requirements different aspects of testing and
Specification), risks or other information purpose.
sources.
Data TWEETABLE
Whatever data is needed to perform the
Testing should stop when the
described activities.
References to data files with input data that probability of remaining faults
is needed, e.g. an Excel sheet. Variations of is reduced to a level that can be
data to be made, based on the initial data accepted by the customer/user
can also be specified, e.g. use boundary [Beizer -90].
values of valid and invalid input data for all
parameters. Use pair-wise techniques to
generate input data to catch combinatorial
problems.
Test Strategies in Agile Projects
environments with backtracking and a lot of 3) Form hypothesis (this might happen….
distractions. when..).
> Patterns.
Execution
What is the most efficient way to run the
> Resulting system state after your test is
tests?
finished, including uninspected outputs.
Logistics
> Impacts on connected devices/system
What environment is needed to support the
resources.
test execution?
> Output to other cooperating processes,
Oracle
clients or servers.
How do you tell if a test result is correct or
not (the oracle problem)?
A system can fail in many ways. Inattentional
blindness is a common phenomenon where
Reporting
humans (often) don’t see what they don’t
How to replicate a failure and report it
pay attention to. Therefore it is important to
effectively?
monitor all important events in the system.
Consider your test environment’s level of
Documentation
controllability and observability, i.e. how
What test documentation do we need?
much can you actually control and see what
is going on when you test?
Measurement
What metrics are usable and applicable for
While testing, you need to log everything
our testing?
you do (see suggested tools earlier in the
document), or at least know what steps you
Stopping
took while testing. Otherwise you cannot
How to decide when to stop testing?
backtrack what you have done, especially
Test Strategies in Agile Projects
if you find a fault you need to report (use 1.6 Analyze parts - whole relationships
the time stamps in your logging tool). Also In this section you make models out of
take notes regarding your observations in the object you analyze. For example,
a testing logbook to show your reasoning state diagrams, system anatomy maps,
while testing [Jo.Bach - 00]. functional decomposition diagrams, system
architecture and interfaces, usage scenarios,
Since software testing primarily is a learning characteristics, etc.
and evaluation process you need to look
at what your reasoning structure looks
like. Most people have an ad-hoc way of 2 - Enquiry
reasoning. This doesn’t work very well when
testing complex systems where you need to 2.1 Test conclusions and improve ideas
have both a backward and forward looking Generating test ideas to prove or disprove
ability in several steps, as well as a way what you think, how the system is supposed
to analyze what you see and how you are to work.
going to act in the following steps in your
evaluation/testing of the system. 2.2 Ask relevant questions
Use Critical, creative, scientific and lateral
To help, you may use a reasoning map to thinking [Kaner2 -04], [Wikipedia2 -11],
enhance your ability to sort information [DeBono -99].
and make better test decisions. With some
practice you can become a very skilled tester 2.3 Predict and anticipate
in a quite short amount of time. Based on your experiences ask yourself “in
36 what way may the system fail?”.
PAGE
4.1 Judge value There is also a simpler model you can use
Would a “normal” user of your product called the Deming PDCA cycle when testing
consider the provided features usable and or planning your tests [Wikipedia3 -11].
valuable, or not?
Plan
4.2 Evaluate information Collect information, analyze, define goals
Make customer reviews and look at the and strategies, decide and plan actions.
results. Evaluate the information you have
about the system and what the customer Do
considers important. Evaluate the outcome Prepare and execute the actions in your
of your tests. plan.
Area area
Test 1 Low Needed test Low
Initial Low Current None
Current W 1 W 2 W 3 W
Test Strategies in Agile Projects
The result of your tests can be
Risk effort riskpresented
test on a so called “lo
from the original format created by James Bach [Bach5 -9
Level level effort
A column stating obtained test coverage too much disturbances. This often happens
could also be added or included in the late in the project when there is not much
weekly status of the tested area: testing time left (or time to correct faults,
which may even impact the architecture of
0 We have no good information about the whole system).
this area.
1 Sanity Check: Major functions & simple For characteristics testing a so called Goal-
data. Question-Metrics model may be used [GQM
1+ More than sanity, but many functions -10]. GQM may not capture everything that
not tested. is important because many aspects of the
2 Common Cases: All functions touched; characteristics evaluation are not measurable
common & critical tests executed. (e.g. usability, security). A scientific approach
2+ Some data, state, or error coverage is also useful [Claesson2 -02].
beyond level 2.
3 Corner Cases: Strong data, state, error, GQM is a top-down approach to establish a
or stress testing. goal-driven measurement system in software
development. It is very useful when testing
Level 1 and 2 focus on functional requirements characteristics which often include some
and capabilities: can this product work at sort of measurements.
all?
Level 2 may obtain a 50 – 90% code A GQM model is a hierarchical structure
coverage. starting with a goal specifying the purpose
Level 2 and 3 focus on information to judge (e.g. to improve the call handling process) of
performance, reliability, compatibility and the measurement, the object to be measured
other “ilities”: Will this product work under (e.g. the current call handling process), the
Test Strategies in Agile Projects
issue to be measured (e.g. the call setup Make a table to find Equivalence Classes,
time), and the viewpoint (e.g. from the users’ Boundary Values and Domains. Depending
point of view) from which the measure is on the type of characteristic, determine what
taken. values to select based on the goal and the
questions. Also make sure the main goal is
The goal is refined into several questions in line with the test goals, product/customer
(e.g. What is the current call setup time?). needs, and the overall R&D and Business
Goals for your company.
Each question is then refined into objective
metrics. The same metric can be used in Performance testing is one of the most
order to answer different questions under common and important characteristics
tests applicable for all systems. Below is
the same goal. Examples:
an example of how to practically conduct a
- Average call setup time.
simple test (which too many projects tend to
- Standard deviation.
“forget”).
- % of cases outside of the upper limit.
Example:
Example from a telecom application:
1) Start the test execution as soon as a
Goal stable release with enough functionality
The system should be able to handle traffic has been received.
with at least 1000 simultaneous users active
in the system. If no requirement exists, make 2) Prepare the load generation tool.
40 a reasonable assumption based on similar
or older versions of the system currently in
PAGE
product? products.
> Learnability: The operation of the product > Operating System: The product works
can be rapidly mastered by the intended with a particular operating system.
user. > Hardware: The product works with
> Operability: The product can be operated particular hardware components and
with a minimum of effort. configurations.
> Accessibility: The product meets relevant > Backward: The products work with earlier
accessibility standards and works with versions of itself.
O/S accessibility features. > Resource Usage: The product doesn’t
use more memory, storage, or other
Security system resources than necessary.
How well is the product protected against
unauthorized use or intrusion? When testing is coming close to an end
> Authentication: The ways in which the it is important to look at your current risk
system verifies that a user is who she list again. The risks should be looked at in
says she is. every sprint on a continuous basis to keep
> Authorization: The rights that are granted them up to date.
to authenticated users at varying
privilege levels. The purpose of the risk evaluation is to:
> Privacy: The ways in which customer or
employee data is protected from > Evaluate the testing results against the
unauthorized people. current list of the most important risks.
> Security holes: The ways in which the
system cannot enforce security (e.g. > Keep track of the most serious faults
social engineering vulnerabilities). found.
Test Strategies in Agile Projects
> Update the list of current system risks. Identify the root cause of the most
serious faults
> Change priority or put in new risks in - List all possible causes (e.g. design rules
the risk list as a result of the current test not followed).
results. - Identify the associated effects (failures).
- Identify cause and effect relationships.
> Give input for changes of the test
strategy if needed. Add fault categories and types to your
fault catalog or taxonomy. A fault/defect
> Give input for changes of the test case, taxonomy is used to get ideas about what to
or test idea selection methods. test, based on previously found problems.
It is also a good idea to analyze the faults your product the following should be
you have found so far to be able to draw considered (also in conjunction with your
any conclusions about the current quality previously defined test goals, the Definition
and any systematic problems that need to of Done and the customer acceptance
be addressed. criteria):
Example: Coverage
Divide the faults found > All planned test charters have been
- Group faults into categories of how executed.
serious they are.
- Prioritize the faults according to severity > Sufficient test coverage has been
and occurrence. obtained.
- Make a top 10 list of the worst faults
found to date. Quality
- Group faults into functional area and/or > The probability of remaining faults
characteristics. has been reduced to a level that can be
accepted by the customer.
Where were faults introduced
- In which phase of the development did > The number of executed failure free tests
the faults originate and why. indicates that a sufficient reliability has
- Which specific activity (e.g. interface been reached.
design).
> All risks, hazards and safety issues have
been evaluated to an acceptable/agreed
level of confidence.
Test Strategies in Agile Projects
Time
> The deadline/ship date has been > All User Acceptance Tests performed
reached. and passed.
fulfilling the required characteristics of you learned during the project. The following
the system. description of a project retrospective is
based on [Stevens -08].
> All code must compile and build for all
platforms. Look at:
> What happened?
> No high priority bugs remain to be
corrected. > What did we do well?
> For all open bugs, documentation in the > What could be improved?
release notes is included with
workarounds (for the most important/ > Who has jurisdiction?
serious bugs, if possible).
> What is top priority?
> All planned tests run and passed.
A retrospective or lessons learned is normally
> The number of open defects has been performed at the end of each Sprint and at
decreasing for last three weeks. the end of the project. The Scrum master is
the moderator for the meeting.
> Feature x unit tested by developers,
system tested by testers, verified with The result of the retrospective is two
customers A, B before release. prioritized lists of action items of how to
improve the productivity in the project. The
> All open defects evaluated across all first list contains actions that the team can
involved teams. perform on its own authority. Items from
Test Strategies in Agile Projects
the second list require agreement from Also look at how efficient your testing were:
somebody ‘outside’, e.g. Management, the
Customer, another department, etc. 1) Test coverage.
What level of test coverage was
By asking what happened, you build a possible to obtain for the tested User
common understanding of the project. Just Stories, Features and Characteristics?
by getting people together, giving them a What level would have been needed
chance to talk, and have them listen to each considering size, complexity, and risk?
other helps to reduce conflicts.
2) Test efficiency.
By asking what the team is doing well How efficient was the testing in finding
you may encourage and make sure good defects and execute tests? How much
practices are kept by recognizing them. time was spent on debugging/adapting
the test environment, test scripts or
By asking the team what and how to tools used?
improve, you get a list of short and medium
term action items which will make visible 3) Confidence level in the test results.
improvements in the state of the project. What was the confidence in the test
results? Can they be trusted given the
For the suggested actions, make sure they way the tests were performed? Is it
are well described with sufficient detail to be easy to go back and check log files?
able to determine if they were achieved or Are there notes and time stamps to
44
not when doing the next retrospective. make backtracking possible?
PAGE
You may use the SMART concept (Specific- 4) Failure rate, predictions and actual
what, why, how, Measurable, Attainable, results.
Realistic, Timely - a clear target) or just a clear What was the actual failure rate, i.e.
direction of how to change to improve. number of defects found per hour of
testing?
By determining who has jurisdiction, you can
identify which items the team can do itself 5) Defect detection percentage.
and for which items help or negotiations What was the defect detection
are needed from the outside. For the ideas percentage at different types of testing
the team are able to implement themselves, (requirements review, unit, function and
start with the improvements that give the system testing)?
most effect and are easiest to implement
within the shortest time frame. For the rest, 6) Reasoning structure.
start with the top priority items and try to get How did the questioning and test ideas
them approved. work? Were they efficient and did they
reveal many problems?
The team may have enough ideas to
keep busy for a couple of months, so you 7) Test goals and strategies.
will probably need to focus on just a few To what extent were the test goals
items so that the team can continue to do achieved? Were the test strategies
productive work. Less important items can defined in the initiation of the project
be postponed to the next retrospective. used and efficient? Were many
additional test strategies added along
the way?
Test Strategies in Agile Projects
TWEETABLE
9) Planning precision (hit rate).
What was the planning precision in The need for test coordination
each sprint, considering planned increases with the size of the
versus delivered User Stories, tested project and the level of short
and passed demonstration and term planning.
acceptance with the stakeholders?
TWEETABLE
10) Documentation and reporting.
A Test Charter consists of test
How did the test reporting work out?
Did it create enough clarity for decision objectives, and test ideas used
making regarding the quality of what for exploratory testing.
was tested?
5. References
[Al-Qutaish -10] Quality Models in Software Engineering
http://www.jofamericanscience.org/journals/amsci/
am0603/22_2208_Qutaish_am0603_166_175.pdf
[Bach1 -99] Risk and Requirements-Based Testing
http://www.cdainfo.com/Down/5-Test/Requirements.pdf
[Bach2 -01] What is Exploratory Testing?
http://www.satisfice.com/articles/what_is_et.shtml
[Bach3 -03] Exploratory Testing Explained
http://www.satisfice.com/articles/et-article.pdf
[Bach4 -10] Rapid Software Testing Appendices
http://www.satisfice.com/rst-appendices.pdf
[Bach5 -99] A Low-Tech Testing Dashboard
http://www.satisfice.com/presentations/dashboard.pdf
[Bach6 -10] Rapid Software Testing - Course Material
http://www.satisfice.com/rst.pdf
[Beizer -90] Software Testing Techniques, second edition ISBN 0-442-20672-0
[Cagan -06] Assessing Product Opportunities
http://www.svproduct.com/assessing-product-opportunities/
[Claesson1 -02] A risk based testing process (QWE -02)
46 [Claesson2 -02] How to use scientific methods in software testing (QWE -02)
[Claesson3 -04] How to define efficient test goals and strategies (Eurostar -04)
PAGE
w w w. e u r o s t a r c o n f e r e n c e s . c o m