• No results found

Agile Testing and Extreme Programming

N/A
N/A
Protected

Academic year: 2021

Share "Agile Testing and Extreme Programming"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

Agile Testing and

Extreme Programming

bret@pettichord.com www.pettichord.com

Copyright © 2003 Bret Pettichord. All rights reserved.

March 2003

(2)

The Agile Alliance Values

“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."

www.agilemanifesto.org

(3)

Agile Development Methodologies

Extreme Programming (XP) Scrum

Crystal

Adaptive Software Development (ASD) Feature Driven Development (FDD)

Dynamic Systems Development Method (DSDM)

XBreed (XP + Scrum)

(4)

Context-Driven Testing

Principles

1. The value of a practice depends on context.

2. Practices may be good in context, but there are no best practices.

3. People, working together, are the most important part of any project’s context.

4. Projects unfold are often not predictable.

5. The product is a solution. If the problem isn’t solved, the product doesn’t work.

6. Good software testing is a challenging intellectual process.

7. Only through judgment and skill, exercised cooperatively throughout the entire project, are we able to do the right things at the right times to effectively test our products.

Context-driven testing is

an agile approach to testing

regardless of whether development is agile.

www.context-driven-testing.com

(5)

The Role of Testing

Testing is the headlights of the project

! Where are you now? Where are you headed?

Testing provides information to the team

! This allows the team to make informed decisions

A “bug” is anything that could bug a user

! Testers don’t make the final call

Testing does not assure quality

! The team does (or doesn’t)

Testing is not a game of “gotcha”

! Find ways to set goals, rather than focus on mistakes

(6)

Extreme Programming Practices

Test-Driven Development Pair Programming

Short Iterations & Releases Refactoring

“User Stories"

Acceptance Testing

Team Code Ownership

(7)

Test-Driven Development

Developers write unit tests before coding.

! Motivates coding

! Improves design (reducing coupling and improving cohesion)

! Supports refactoring

Many open-source test tools have been developed to support this

! xUnit

(8)

Refactoring

Improving the Design of Existing Code

“Changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure”

Make the simplest design that will work.

Add complexity only when needed

! Quickly make a test pass

! Bad design (duplication, etc) is OK!

Refactor to improve the design.

Run tests to ensure that refactoring didn’t break anything.

(9)

Acceptance Tests

User stories are short descriptions of features that need to be coded.

Acceptance tests verify the completion of user stories.

Also need to be written before coding!

(10)

Should Testers Go Along with This?

Some say XP is an excuse for hacking and an invitation to poor quality.

I think XP is exciting and will improve the practice of testing in the industry.

! Unit testing is now very popular.

! Open source frameworks for acceptance testing are having a major impact.

(11)

Concerns for Testers

Acceptance testing has not been well adhered to by XP teams

Only verifying stories focuses on success rather than risk

Clumsy story definition impacts testing more than development

Need to iterate testing too

(12)

How Testers Can Prove Their Value

Demonstrate a helpful perspective in defining software expectations.

Provide information. Don’t act like a gatekeeper.

Adapt to changing project goals.

Work with what you have, ask for what you need to know, document what you can.

(13)

4 Practices for Agile Testing

Conversational Test Creation Coaching Tests

Providing Test Interfaces Exploratory Learning

Jointly developed with Brian Marick

(14)

Conversational Test Creation

Who should write tests?

! Customers are often too busy.

Defining tests is a key activity that should include programmers and customer representatives.

Don't do it alone.

Testers facilitate the conversation.

(15)

Coaching Tests

Use acceptance tests to drive development Tests provide:

! Goals and guidance

! Instant feedback

! Progress measurement

Tests are specified in a format:

! Clear – so any one can understand

! Specific – so it can be executed

Testers help analyze the business

(16)

Coaching Tests

Specification By Example

Defining requirements is difficult

! Often ambiguous

! Often harder to specify requirements than design

! Easy to become out of date

Defining them by example is incremental, and easier

! Concrete

! Run them to see if they are current

Examples…

! Ground concepts

! Define expectations

! Demonstrate progress & conformance

(17)

FIT tests

Scrape tests

from HTML docs Keep

requirements &

tests together Check

automatically Browse results online

Understandable by everyone

(18)

Providing Test Interfaces

Programmers

provide fixtures that automate coaching tests

Human Testers

Software Product

Automation Fixtures Manual

Testing

Test Descriptions

Test Interface

(19)

Exploratory Learning

Plan to explore the product with each iteration.

Look for bugs, missing features and opportunities for improvement.

We don’t understand software until we have used it.

(20)

Lessons for All

Test automation is easiest with close collaboration between testers and

programmers.

Agile testers are valuable to any project.

(21)

Further Study

Lessons Learned in Software Testing

! www.testinglessons.com

Agile Testing Papers

! www.testing.com/agile

! Testers Should Embrace Agile Programming,

www.io.com/~wazmo/papers/embrace_agile_programming.html

! Where are the Testers in XP?

www.stickyminds.com/s.asp?F=S6217_COL_2

Test-Driven Development

! Test-Driven Development: by Example, Kent Beck

! Refactoring, Martin Fowler

! “Test Infected,” Beck and Gamma

! “Learning to Love Unit Testing,” Thomas and Hunt

Fit

! fit.c2.com

References

Related documents

Owner’s Manual For Duoseal® Vacuum Pumps Models: 1400 OWNERS MANUAL FOR DUOSEAL VACUUM PUMPS MODELS: 1400, 1405, 1402, 1376, 1397, 1374, 1399, 1380, 1392 Contents:

At 12 months postoperatively, this patient, with ⫺14 ⫺4 ⫻97 preoperative refraction, had no postoperative cylin- der and demonstrated an improvement of 1 line of BSCVA to 20/16 and

While I have been able to address the relationship between personal and artistic photography of the dead, and demonstrated that the artists present the dead within

The XP software development method uses two forms of automated testing -- white box unit tests that support the TDD practice and black box acceptance tests. In this chapter,

• Ideally acceptance tests should be automated, either using a unit testing framework, or a separate acceptance testing

These strategies include (1) problematising tasks by inserting obstacles to the solution, limiting problem information or requiring students to use particular representations

The low values ob- tained from ARIES are not consistent with values observed in the 165-MOD-AST emissivity libraries (see also section 4c), leading to two possible explanations:

This research is about human resource planning in telecom sector, and find out different ways how can help to increase the organizational performance of