Professional Documents
Culture Documents
Agile Process Model 2
Agile Process Model 2
Ian Sommerville,
Software Engineering, 9th Edition
Pearson Education, Addison-Wesley
1
Extreme programming
Perhaps best-known and most widely used agile
method.
Extreme Programming (XP) takes an ‘extreme’
approach to iterative development.
several new versions of a system may be developed
by different programmers, integrated and tested
frequently.
Increments are delivered to customers every 2
weeks;
2
Extreme programming
All tests must be run for every build (version) and
build is only accepted if tests run successfully, and
this may be the basis for iteration.
Release deadlines are never slipped.
if there are development problems, customer is
consulted and functionality is removed from planned
release, if needed.
3
XP and agile principles
6
Extreme programming practices (b)
Pair programming Developers work in pairs, checking each other’s work and
providing the support to always do a good job.
Collective ownership The pairs of developers work on all areas of the system, so that
no single expertise develop and all the developers take
responsibility for all of the code. Anyone can change anything.
Continuous integration As soon as the work on a task is complete, it is integrated into
the whole system. After any such integration, all the unit tests in
the system must pass.
Sustainable pace Large amounts of overtime are not considered acceptable as
the net effect is often to reduce code quality and medium term
productivity
On-site customer A representative of the end-user of the system (the customer)
should be available full time for the use of the XP team. In an
extreme programming process, the customer is a member of
the development team and is responsible for bringing system
requirements to the team for implementation.
7
Requirements scenarios
8
A ‘prescribing medication’ story
9
Requirements scenarios
11
Extreme programming release cycle
12
XP and agile principles
13
XP and agile principles
14
XP and agile principles
15
XP and agile principles
16
XP and change
A general problem with incremental development is
that it tends to degrade software structure, so
changes to software become harder and harder to
implement.
During change code might get duplicated, parts of
software are reused in inappropriate ways, and
overall structure degrades as code is added to
system.
Extreme programming tackles this problem by
constantly refactoring software.
17
What is software Refactoring?
18
Example: software Refactoring?
19
Example: software Refactoring?
In practice, many companies that have adopted XP do
not use all of XP practices listed.
They choose according to their local ways of working.
(Example, some companies find pair programming
helpful;
others prefer to use individual programming and
reviews.
some programmers don’t do refactoring parts they did
not develop.
However, many have adopted an XP variant use small
releases, test-first development, and continuous
integration principles) 20
Testing in XP
21
Testing in XP
22
Test-first development
Writing tests before code is writing to clarify
requirements to be implemented.
This means you can run test as code is being written
and discover problems during development.
23
Test-first development
Task implementers have to thoroughly understand
specification so that they can write tests for system.
Ambiguities and omissions in specification can be
clarified before implementation begins.
It also avoids problem of ‘test-lag’.
(This may happen when developer of system works at
a faster pace than tester. Implementation gets
further and further ahead of testing and there is a
tendency to skip tests, to maintain development
schedule.)
24
Test case description for dose
checking
25
Customer involvement
26
Customer involvement
27
Test automation
Test automation means tests are written as
executable components before task is implemented
These testing components should be stand-alone,
should simulate submission of input to be tested
and should check that result meets output
specification.
An automated test framework (e.g. Junit) is a
system that makes it easy to write executable
tests and submit a set of tests for execution.
28
Test automation
As testing is automated, there is always a set of
tests that can be quickly and easily executed
Whenever any functionality is added to system,
tests can be run and problems that new code has
introduced can be caught immediately.
29
XP testing difficulties
31
Advantages of pair programming
32
Advantages of pair programming
34
General comments: pair programming
35
General comments: pair programming
36
General comments: pair programming
37