Putting Testing First CS 4501 / 6501 Software Testing

Slides:



Advertisements
Similar presentations
Agile Planning Dealing with Reality. Reality Basic agile principle – don’t expect static plans to hold, be flexible and expect changes.
Advertisements

Why Use Test Driven Development (TDD)?.  Why the need to change to TDD.  Talk about what TDD is.  Talk about the expectations of TDD.
Copyright  2002, Medical Present Value, Inc. All rights reserved. Copyright © 2010 Texas Education Agency. All rights reserved. TEA confidential and proprietary.
Agile development By Sam Chamberlain. First a bit of history..
Agile Requirements Methods CSSE 371 Software Requirements and Specification Mark Ardis, Rose-Hulman Institute October 26, 2004.
Michael Burnside Blog: Software Quality Assurance, Quality Engineering, and Web and Mobile Test.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
System Analysis and Design
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
Testing Challenges in an Agile Environment Biraj Nakarja Sogeti UK 28 th October 2009.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
© 2007 by Prentice Hall 1 Introduction to databases.
Managing Change 1. Why Do Requirements Change?  External Factors – those change agents over which the project team has little or no control.  Internal.
Introduction to Software Testing (2nd edition) Chapter 4 Putting Testing First Paul Ammann & Jeff Offutt August.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Chapter 16 Maintaining Information Systems. Objectives:  Explain and contrast four types of system maintenance.  Describe factors affecting maintenance.
What is a software? Computer Software, or just Software, is the collection of computer programs and related data that provide the instructions telling.
Testing under the Agile Method CSCI 521 Software Project Management based on the book Testing Extreme Programming by Lisa Crispin and Tip House.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Software Testing History, Trends, Perspectives – a Brief Overview.
Chapter 3 Agile software development 1 Chapter 3 – Agile Software Development.
CS223: Software Engineering
Software Development.
Paul Ammann & Jeff Offutt
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
IL Marking Get out your CPU / Memory answers Swap with someone else
Software Configuration Management
Software Project Configuration Management
CIS 375 Bruce R. Maxim UM-Dearborn
Regression Testing with its types
Software Engineering (CSI 321)
Game Design, Development, and Technology
421 Review Questions Does software engineering add documentation that slows down the project? Is there one software process that is better than the others.
Integrate Agile Testing into the Process
Chapter 18 Maintaining Information Systems
Putting Testing First CS 4501 / 6501 Software Testing
Mobile Application Test Case Automation
Integrating Quality Activities in the Project Life Cycle
CS 5150 Software Engineering
Chapter 8 – Software Testing
Paul Ammann & Jeff Offutt
Information Technology Project Management – Fifth Edition
Chapter 2 SW Process Models
Applied Software Implementation & Testing
Johanna Rothman Create Technical Excellence Chapter 9
X in [Integration, Delivery, Deployment]
Johanna Rothman Agile Team Measurements Chapter 12
Paul Ammann The Agile Heresy: What Drives Traditional Software Engineering, and Why Agile Turns it Upside Down Paul Ammann.
Paul Ammann & Jeff Offutt
Strategies For Software Test Documentation
Software Quality Engineering
Chapter 2 Software Processes
Design and Programming
Lecture 09:Software Testing
Test Driven Lasse Koskela Chapter 9: Acceptance TDD Explained
Process Models Coming up: Prescriptive Models.
Software Testing and Maintenance Maintenance and Evolution Overview
Software & Systems Quality Conferences United Kingdom 2006
Test Automation CS 4501 / 6501 Software Testing
Introducing ISTQB Agile Foundation Extending the ISTQB Program’s Support Further Presented by Rex Black, CTAL Copyright © 2014 ASTQB 1.
Chapter 3 – Agile Software Development
Project Management Process Groups
Software Engineering: A Practitioner’s Approach, 6/e Chapter 3 Prescriptive Process Models copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Software Verification, Validation, and Acceptance Testing
CS310 Software Engineering Lecturer Dr.Doaa Sami
Test Driven Lasse Koskela Chapter 9: Acceptance TDD Explained
Move from Scripted Manual Testing to Scenario-Based Testing
Software Engineering: A Practitioner’s Approach, 6/e Chapter 3 Prescriptive Process Models copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Extreme Programming (and Pair Programming)
Chapter 1: Software and Software Engineering
Presentation transcript:

Putting Testing First CS 4501 / 6501 Software Testing [Ammann and Offutt, “Introduction to Software Testing”]

Software Crisis Programmers just programmed Result was ad hoc structure Code eventually became hard to maintain Managing complexity was challenging The tendency towards irreducible number of errors Most software development faced Overdue schedule Exceeding initial budget Inadequate software quality High software maintenance cost

Traditional Cost-of-Change Curve Traditional software development methods Focus: extensive modeling and up front analysis Goal: reveal problems and changes as early as possible Delta Time Cost More work must be revised Root problem is harder to find Original Revision [AO, p.55]

Increased Emphasis on Testing If high-quality testing is not centrally and deeply embedded in your development process, your project is at high risk for failure Fail in the technical sense Lose control of what the code actually does Fail in the business sense Your competitors roll out better functionality faster

Traditional Assumptions Modeling and analysis can identify potential problems early in development Saving implied by the cost-of-change curve justify the cost of modeling and analysis over the life of the project These assumptions are true if the requirements are always complete and current In reality, customers keep changing their mind Changes reflect the requirements

Supporting Evolutionary Design Traditional design advice says to anticipate changes Designers often anticipate changes that don’t happen Both anticipated and unanticipated changes affect design Evolving Design Unanticipated Change Anticipated change that doesn’t happen [AO, Agile Test]

Agile Methods Agile methods start by recognizing that neither assumption is valid for many current software projects Software engineers are not good at developing requirements We do not anticipate many changes Many of the changes we do anticipate are not needed Requirements (and other non-executable artifacts) tend to go out of date very quickly We seldom take time to update them Many current software projects change continuously [AO, Agile Test]

Defect Discovery: Traditional vs. Agile

Managing the Cost Curve Test harness as guardian (Near) Instant feedback on changes (or mistakes) An hour? Ten minutes? Less? Something is executable from the very beginning Role of continuous integration Effective communication mechanisms De-emphasize non executable artifacts If it doesn’t execute, it’s not checkable Avoid anticipating future needs YAGNI: You Ain’t Gonna Need It

Test Harness as Guardian What is correctness? Traditional: universal Agile: existential Limit view of correctness Traditional: define all correct behavior completely at the beginning Agile: define correctness of some behavior with specific tests If the software behaves correctly on the tests, it is correct Even as the software (including the test cases) evolve, the correctness of the system at any single point in time is subject to immediate verification by running the test set.

Test Harness Verify Correctness Tests must be automated Every test must include a test oracle (mechanism that can evaluate whether that test passes or fails) Tests (executable artifacts) replace the requirements (non-executable artifacts) Tests must be high quality and must run quickly Tests must be run every time changes are made to the software Test harness runs all automated tests efficiently and reports results to the developers

Activity: Agile Airplane Air shows have become popular spectator events. Air shows across the country have placed orders for planes, we need to fulfill them. Everyone here is part of the “Awesome Agile Aviation” Company and can coordinate in any way. Roles: QA/testers: Need 7 QAs/testers to evaluate the product after each Sprint Developers: Form 7 teams. Each team has $40 in the bank. Economics: The company has a fixed cost (burn rate) of $12 per team per Sprint, and revenue from accepted orders Coverage criteria: “Done” criteria Test harness: appearance matches the picture, color coding in place, fly 6ft (or 2m) over table 3 Sprints. After each Sprint, QA/testers will evaluate the airplanes each team produces – “accept” or “reject” [Adapted from Agile Airplane Game, by John Heintz, GistLabs]

Agile Airplane – Sprint 1 Sprint 1 (5 minutes) Developers: Use the provided supplies, follow the production instruction#1 to produce airplanes You have 1 minute to plan Sprint You have 4 minutes to run Sprint End of Sprint 1 (2-4 minutes) Demonstrate to QA/testers QA/testers: If the airplanes pass the tests, accept the planes, group batches of “done” planes If the airplanes fail the tests, tell the teams about acceptance criteria and reject the planes (“rip”) them Pay $20 for every complete delivery of 15 airplanes (i.e., add $20 to the team financial chart) Update the team financial chart with $12 burn rate

Agile Airplane – Sprint 2 Sprint 2 (5 minutes) Developers: Use the provided supplies, follow the production instruction#2 to produce airplanes You have 1 minute to reflect and plan You have 4 minutes to run Sprint End of Sprint 2 (2-4 minutes) Demonstrate to QA/testers QA/testers: If the airplanes pass the tests, accept the planes, group batches of “done” planes If the airplanes fail the tests, tell the teams about acceptance criteria and reject the planes (“rip”) them Pay $30 for every complete delivery of 10 airplanes (i.e., add $30 to the team financial chart) Update the team financial chart with $12 burn rate

Agile Airplane – Sprint 3 Sprint 3: High value / High risk (5 minutes) Developers: Use the provided supplies, follow the production instruction#3 to produce airplanes You have 1 minute to reflect and plan You have 4 minutes to run Sprint End of Sprint 3 (2-4 minutes) Demonstrate to QA/testers QA/testers: If the airplanes pass the tests, accept the planes, group batches of “done” planes If the airplanes fail the tests, tell the teams about acceptance criteria and reject the planes (“rip”) them Pay $40 for every complete delivery of 5 airplanes (i.e., add $40 to the team financial chart) Update the team financial chart with $12 burn rate

Activity: Wrap-up What aspects were applied? How were test harnesses used? How were criteria applied? How were acceptance tests applied? How likely had the quality been improved from Sprint to Sprint?

Testing as Central Activity [image from http://www.twilightsoftwares.com]

Testing as Central Activity: TDD [More TDD and exercise .. Later]

Continuous Integration Agile methods work best when the current version of the software can be run against all tests at all time

Continuous Integration A Continuous integration server rebuilds the system, returns, and re-verifies tests whenever any update is checked into the repository Other developers are aware of changes early The rebuild and re-verify must happen as soon as possible (tests need to execute quickly) A continuous integration server doesn’t just run tests, it decides if a modified system is still correct Mistakes are caught earlier

System Tests in Agile Methods Traditional testers often design system tests from requirements What if there are no traditional requirement documents? Requirements ? System tests

User Stories A few sentences that captures what a user will do with the software In the language of the end user Usually small in scale with few details Not archived Agent sees a list of today’s interview applicants Withdraw money from checking account Support technician sees customer’s history on demand

Acceptance Tests in Agile Methods User Story Acceptance Test (Failing) TDD Test 1 Change software & Refactor Tests archived Acceptance Test (Passing) TDD Test 2 Continue adding TDD tests until acceptance test passes Change software & Refactor Refactoring avoids maintenance debt [AO, p.60]

Wrap-up More companies are putting testing first This can decrease cost and increase quality The definition of “Correctness” becomes restricted but practical We embrace evolutionary design We use test harness as guardian To facilitate the testing process, sometimes we need test doubles. What’s Next? Test automation