Agile testing


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Agile testing

  1. 1. Agile TestingWhat is it? Can it work?bret@pettichord.comwww.pettichord.comCopyright © 2002 Bret Pettichord. All rights reserved.October 2002
  2. 2. The Agile Alliance Values“We have come to value:Individuals and interactions over processes and toolsWorking software over comprehensive documentationCustomer collaboration over contract negotiationResponding to change over following a planThat is, while there is value in the items onthe right, we value the items on the left more."
  3. 3. What is Agile Testing?1. Testing practice that follows the agilemanifesto, treating development as thecustomer of testing! In this light the context-driven manifesto providesa set of principles for agile testing.2. Testing practice for projects using agilemethodologies.! What is the role of the tester on an agile project?
  4. 4. Context-Driven Principles1. The value of any practice depends on its context.2. There are good practices in context, but there are no bestpractices.3. People, working together, are the most important part of anyproject’s context.4. Projects unfold over time in ways that are often notpredictable.5. The product is a solution. If the problem isn’t solved, theproduct doesn’t work.6. Good software testing is a challenging intellectual process.7. Only through judgment and skill, exercised cooperativelythroughout the entire project, are we able to do the rightthings at the right times to effectively test our
  5. 5. Agile Development MethodologiesExtreme Programming (XP)CrystalAdaptive Software Development (ASD)ScrumFeature Driven Development (FDD)Dynamic Systems Development Method(DSDM)XBreed
  6. 6. XP PracticesTest-First ProgrammingPair ProgrammingShort Iterations & ReleasesRefactoring“User Stories"Acceptance Testing
  7. 7. The Role of TestingTesting is the headlights of the project! Where are you now? Where do you headed?Testing provides information to the team! This allows the team to make informed decisionsA “bug” is anything that could bug a user! Testers don’t make the final callTesting 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 onmistakes
  8. 8. Test-First ProgrammingDevelopers write unit tests before coding.! Motivates coding! Improves design (reducing coupling and improvingcohesion)! Supports refactoringMany open-source test tools have beendeveloped to support this! xUnit
  9. 9. Refactoring: Improving theDesign of Existing Code“Changing a software system in such a way thatit does not alter the external behavior of thecode yet improves its internal structure”Make the simplest design that will work.Add complexity only when needed.Refactor as necessary.Refactoring requires unit tests to ensure thatdesign changes (refactorings) don’t breakexisting code.
  10. 10. Acceptance TestingUser stories are short descriptions offeatures that need to be coded.Acceptance tests verify the completionof user stories.Ideally they are written before coding.
  11. 11. Should Testers Go Along with This?Some say that XP is an invitation to poorquality and an excuse for hacking.I think that XP is exciting and will improve thepractice of testing in the industry.! XP developers are writing unit tests and unittesting tools! Kent Beck’s next book is Test-Driven Development! XP projects are finding new ways to build intestability and support automated tests.Testers Should Embrace Agile Programming
  12. 12. A Practice for Agile TestingConversational Test CreationCoaching TestsProviding Test InterfacesExploratory Learning
  13. 13. Conversational Test CreationWho should write tests?! Customers are often too busy.Defining tests is a key activity thatshould include programmers andcustomer representatives.Dont do it alone.
  14. 14. Coaching TestsA way of thinking about Acceptance Tests.Turn user stories into tests.Tests provide:! Goals and guidance! Instant feedback! Progress measurementTests are specified in a format:! That is clear enough that users/customers canunderstand! That is specific enough that it can be executedSpecification by Example
  15. 15. Providing Test InterfacesDevelopers are responsible for providingthe fixtures that automate coaching testsIn most cases XP teams are adding testinterfaces to their products, rather thanusing external test tools
  16. 16. Test Interaction ModelHumanTestersSoftwareProductAutomationFixturesManualTestingTestDescriptionsTestInterface
  17. 17. Exploratory LearningPlan to explore the product with eachiteration.Look for bugs, missing features andopportunities for improvement.We don’t understand software until wehave used it.
  18. 18. Further StudyLessons Learned in Software Testing! www.testinglessons.comWard Cunningham’s acceptance testingframework! fit.c2.comAgile Testing Papers!!